Android Studio提示:Failed to instantiate one or more classes AppcompatTextView

本文介绍了一种解决Android开发中资源不同步问题的有效方法。在尝试了常见的rebuild和clean操作后,问题仍未解决。最终,在styles.xml文件中,通过将主题从Theme.AppCompat.Light.DarkActionBar更改为Base.Theme.AppCompat.Light.DarkActionBar成功解决了问题。

说资源不同步,rebuild一下,或者clean一下,并没有毛用。

方法是在Stack overflow上看到的,

styles.xml中, 将主题从Theme.AppCompat.Light.DarkActionBar更改为Base.Theme.AppCompat.Light.DarkActionBar已经为我工作。

Error creating bean with name 'webMvcConfigure' defined in file [E:\art-design-pro-java\target\classes\com\iboot\studio\common\config\WebMvcConfigure.class]: Unsatisfied dependency expressed through constructor parameter 1: Error creating bean with name 'saPermissionInterceptor' defined in file [E:\art-design-pro-java\target\classes\com\iboot\studio\infrastructure\integration\satoken\SaPermissionInterceptor.class]: Unsatisfied dependency expressed through constructor parameter 0: Error creating bean with name 'saPermissionProcessor' defined in file [E:\art-design-pro-java\target\classes\com\iboot\studio\infrastructure\integration\satoken\SaPermissionProcessor.class]: Unsatisfied dependency expressed through constructor parameter 1: Error creating bean with name 'userServiceImpl' defined in file [E:\art-design-pro-java\target\classes\com\iboot\studio\service\impl\UserServiceImpl.class]: Unsatisfied dependency expressed through constructor parameter 0: Error creating bean with name 'userRepository' defined in file [E:\art-design-pro-java\target\classes\com\iboot\studio\infrastructure\persistence\repository\UserRepository.class]: Unsatisfied dependency expressed through bean property 'sqlSessionFactory': Error creating bean with name 'sqlSessionFactory' defined in class path resource [com/baomidou/mybatisplus/autoconfigure/MybatisPlusAutoConfiguration.class]: Unsatisfied dependency expressed through method 'sqlSessionFactory' parameter 0: Error creating bean with name 'dataSource' defined in class path resource [org/springframework/boot/autoconfigure/jdbc/DataSourceConfiguration$Generic.class]: Failed to instantiate [javax.sql.DataSource]: Factory method 'dataSource' threw exception with message: Failed to determine a suitable driver class 2025-07-10 11:54:44.846 INFO 19364 --- [ main] o.a.c.c.StandardService : Stopping service [Tomcat]
07-11
11-14 19:49:01.512245 16348 16348 E AndroidRuntime: FATAL EXCEPTION: main Process: com.neowizgames.game.browndust2, PID: 16348 java.lang.RuntimeException: Unable to instantiate receiver com.pmangplus.PPReceiver: java.lang.ClassNotFoundException: Didn't find class "com.pmangplus.PPReceiver" on path: DexPathList[[zip file "/data/app/~~N8PyZI5L_CTp55e2ng0A2A==/com.neowizgames.game.browndust2-cEzNvlkGL0Mk2jHwjWMAvQ==/base.apk", zip file "/data/app/~~N8PyZI5L_CTp55e2ng0A2A==/com.neowizgames.game.browndust2-cEzNvlkGL0Mk2jHwjWMAvQ==/split_base_assets.apk", zip file "/data/app/~~N8PyZI5L_CTp55e2ng0A2A==/com.neowizgames.game.browndust2-cEzNvlkGL0Mk2jHwjWMAvQ==/split_config.arm64_v8a.apk"],nativeLibraryDirectories=[/data/app/~~N8PyZI5L_CTp55e2ng0A2A==/com.neowizgames.game.browndust2-cEzNvlkGL0Mk2jHwjWMAvQ==/lib/arm64, /data/app/~~N8PyZI5L_CTp55e2ng0A2A==/com.neowizgames.game.browndust2-cEzNvlkGL0Mk2jHwjWMAvQ==/base.apk!/lib/arm64-v8a, /data/app/~~N8PyZI5L_CTp55e2ng0A2A==/com.neowizgames.game.browndust2-cEzNvlkGL0Mk2jHwjWMAvQ==/split_base_assets.apk!/lib/arm64-v8a, /data/app/~~N8PyZI5L_CTp55e2ng0A2A==/com.neowizgames.game.browndust2-cEzNvlkGL0Mk2jHwjWMAvQ==/split_config.arm64_v8a.apk!/lib/arm64-v8a, /system/lib64, /system_ext/lib64]] at android.app.ActivityThread.handleReceiver(ActivityThread.java:5375) at android.app.ActivityThread.-$$Nest$mhandleReceiver(Unknown Source:0) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2832) at android.os.Handler.dispatchMessage(Handler.java:115) at android.os.Looper.loopOnce(Looper.java:298) at android.os.Looper.loop(Looper.java:408) at android.app.ActivityThread.main(ActivityThread.java:9964) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:613) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1074) Caused by: java.lang.ClassNotFoundException: Didn't find class "com.pmangplus.PPReceiver" on path: DexPathList[[zip file "/data/app/~~N8PyZI5L_CTp55e2ng0A2A==/com.neowizgames.game.browndust2-cEzNvlkGL0Mk2jHwjWMAvQ==/base.apk", zip file "/data/app/~~N8PyZI5L_CTp55e2ng0A2A==/com.neowizgames.game.browndust2-cEzNvlkGL0Mk2jHwjWMAvQ==/split_base_assets.apk", zip file "/data/app/~~N8PyZI5L_CTp55e2ng0A2A==/com.neowizgames.game.browndust2-cEzNvlkGL0Mk2jHwjWMAvQ==/split_config.arm64_v8a.apk"],nativeLibraryDirectories=[/data/app/~~N8PyZI5L_CTp55e2ng0A2A==/com.neowizgames.game.browndust2-cEzNvlkGL0Mk2jHwjWMAvQ==/lib/arm64, /data/app/~~N8PyZI5L_CTp55e2ng0A2A==/com.neowizgames.game.browndust2-cEzNvlkGL0Mk2jHwjWMAvQ==/base.apk!/lib/arm64-v8a, /data/app/~~N8PyZI5L_CTp55e2ng0A2A==/com.neowizgames.game.browndust2-cEzNvlkGL0Mk2jHwjWMAvQ==/split_base_assets.apk!/lib/arm64-v8a, /data/app/~~N8PyZI5L_CTp55e2ng0A2A==/com.neowizgames.game.browndust2-cEzNvlkGL0Mk2jHwjWMAvQ==/split_config.arm64_v8a.apk!/lib/arm64-v8a, /system/lib64, /system_ext/lib64]] at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:259) at java.lang.ClassLoader.loadClass(ClassLoader.java:637) at java.lang.ClassLoader.loadClass(ClassLoader.java:573) at android.app.AppComponentFactory.instantiateReceiver(AppComponentFactory.java:110) at androidx.core.app.CoreComponentFactory.instantiateReceiver(CoreComponentFactory.java:60) at android.app.ActivityThread.handleReceiver(ActivityThread.java:5368) ... 9 more Suppressed: java.io.IOException: Failed to open dex files from /data/app/~~N8PyZI5L_CTp55e2ng0A2A==/com.neowizgames.game.browndust2-cEzNvlkGL0Mk2jHwjWMAvQ==/split_base_assets.apk because: Failed to find entry 'classes.dex': Entry not found at dalvik.system.DexFile.openDexFileNative(Native Method) at dalvik.system.DexFile.openDexFile(DexFile.java:406) at dalvik.system.DexFile.<init>(DexFile.java:128) at dalvik.system.DexFile.<init>(DexFile.java:101) at dalvik.system.DexPathList.loadDexFile(DexPathList.java:454) at dalvik.system.DexPathList.makeDexElements(DexPathList.java:413) at dalvik.system.DexPathList.<init>(DexPathList.java:166) 11-14 19:49:01.512386 16348 16348 E AndroidRuntime: at dalvik.system.BaseDexClassLoader.<init>(BaseDexClassLoader.java:160) at dalvik.system.BaseDexClassLoader.<init>(BaseDexClassLoader.java:130) at dalvik.system.PathClassLoader.<init>(PathClassLoader.java:146) at com.android.internal.os.ClassLoaderFactory.createClassLoader(ClassLoaderFactory.java:93) at com.android.internal.os.ClassLoaderFactory.createClassLoader(ClassLoaderFactory.java:134) at android.app.ApplicationLoaders.getClassLoader(ApplicationLoaders.java:131) at android.app.ApplicationLoaders.getClassLoaderWithSharedLibraries(ApplicationLoaders.java:64) at android.app.LoadedApk.createOrUpdateClassLoaderLocked(LoadedApk.java:1091) at android.app.LoadedApk.getClassLoader(LoadedApk.java:1194) at android.app.LoadedApk.getResources(LoadedApk.java:1446) at android.app.ContextImpl.createAppContext(ContextImpl.java:3579) at android.app.ContextImpl.createAppContext(ContextImpl.java:3570) at android.app.ActivityThread.handleBindApplication(ActivityThread.java:8480) at android.app.ActivityThread.-$$Nest$mhandleBindApplication(Unknown Source:0) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2798) ... 7 more Suppressed: java.io.IOException: Failed to open dex files from /data/app/~~N8PyZI5L_CTp55e2ng0A2A==/com.neowizgames.game.browndust2-cEzNvlkGL0Mk2jHwjWMAvQ==/split_config.arm64_v8a.apk because: Failed to find entry 'classes.dex': Entry not found at dalvik.system.DexFile.openDexFileNative(Native Method) at dalvik.system.DexFile.openDexFile(DexFile.java:406) at dalvik.system.DexFile.<init>(DexFile.java:128) at dalvik.system.DexFile.<init>(DexFile.java:101) at dalvik.system.DexPathList.loadDexFile(DexPathList.java:454) at dalvik.system.DexPathList.makeDexElements(DexPathList.java:413) at dalvik.system.DexPathList.<init>(DexPathList.java:166) at dalvik.system.BaseDexClassLoader.<init>(BaseDexClassLoader.java:160) at dalvik.system.BaseDexClassLoader.<init>(BaseDexClassLoader.java:130) at dalvik.system.PathClassLoader.<init>(PathClassLoader.java:146) at com.android.internal.os.ClassLoaderFactory.createClassLoader(ClassLoaderFactory.java:93) at com.android.internal.os.ClassLoaderFactory.createClassLoader(ClassLoaderFactory.java:134) at android.app.ApplicationLoaders.getClassLoader(ApplicationLoaders.java:131) at android.app.ApplicationLoaders.getClassLoaderWithSharedLibraries(ApplicationLoaders.java:64) at android.app.LoadedApk.createOrUpdateClassLoaderLocked(LoadedApk.java:1091) at android.app.LoadedApk.getClassLoader(LoadedApk.java:1194) at android.app.LoadedApk.getResources(LoadedApk.java:1446) at android.app.ContextImpl.createAppContext(ContextImpl.java:3579) at android.app.ContextImpl.createAppContext(ContextImpl.java:3570) at android.app.ActivityThread.handleBindApplication(ActivityThread.java:8480) at android.app.ActivityThread.-$$Nest$mhandleBindApplication(Unknown Source:0) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2798) ... 7 more 内销手机测外销游戏应用com.neowizgames.game.browndust2的crash的堆栈,分析一下原因和解决方案
最新发布
11-21
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值