当前位置:   article > 正文

Android 14模拟器闪退_android14模拟器

android14模拟器

场景

Android 14模拟器,运行项目,第一次安装不会崩溃,当修改代码之后点击运行就会闪退。

  1. Attempt to load writable dex file: /data/data/com.kt.ktmddemo/code_cache/.overlay/base.apk/classes3.dex
  2. FATAL EXCEPTION: main
  3. Process: com.kt.ktmddemo, PID: 22042
  4. java.lang.SecurityException: Writable dex file '/data/data/com.kt.ktmddemo/code_cache/.overlay/base.apk/classes3.dex' is not allowed.
  5. at dalvik.system.DexFile.openDexFileNative(Native Method)
  6. at dalvik.system.DexFile.openDexFile(DexFile.java:406)
  7. at dalvik.system.DexFile.<init>(DexFile.java:128)
  8. at dalvik.system.DexFile.<init>(DexFile.java:101)
  9. at dalvik.system.DexPathList.loadDexFile(DexPathList.java:438)
  10. at dalvik.system.DexPathList.makeDexElements(DexPathList.java:387)
  11. at dalvik.system.DexPathList.<init>(DexPathList.java:166)
  12. at dalvik.system.BaseDexClassLoader.<init>(BaseDexClassLoader.java:160)
  13. at dalvik.system.BaseDexClassLoader.<init>(BaseDexClassLoader.java:130)
  14. at dalvik.system.PathClassLoader.<init>(PathClassLoader.java:146)
  15. at com.android.internal.os.ClassLoaderFactory.createClassLoader(ClassLoaderFactory.java:93)
  16. at com.android.internal.os.ClassLoaderFactory.createClassLoader(ClassLoaderFactory.java:134)
  17. at android.app.ApplicationLoaders.getClassLoader(ApplicationLoaders.java:126)
  18. at android.app.ApplicationLoaders.getClassLoaderWithSharedLibraries(ApplicationLoaders.java:61)
  19. at android.app.LoadedApk.createOrUpdateClassLoaderLocked(LoadedApk.java:1034)
  20. at android.app.LoadedApk.getClassLoader(LoadedApk.java:1126)
  21. at android.app.LoadedApk.getResources(LoadedApk.java:1374)
  22. at android.app.ContextImpl.createAppContext(ContextImpl.java:3324)
  23. at android.app.ContextImpl.createAppContext(ContextImpl.java:3316)
  24. at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6879)
  25. at android.app.ActivityThread.-$$Nest$mhandleBindApplication(Unknown Source:0)
  26. at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2236)
  27. at android.os.Handler.dispatchMessage(Handler.java:106)
  28. at android.os.Looper.loopOnce(Looper.java:205)
  29. at android.os.Looper.loop(Looper.java:294)
  30. at android.app.ActivityThread.main(ActivityThread.java:8177)
  31. at java.lang.reflect.Method.invoke(Native Method)
  32. at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:552)
  33. at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:971)
  34. ---------------------------- PROCESS ENDED (22042) for package com.kt.ktmddemo ----------------------------
  35. Could not remove dir '/data/data/com.kt.ktmddemo/code_cache/.ll/': No such file or directory

解决方法

1.每次修改完代码卸载重装即可。

        xml文件不需要卸载重重装。

2.修改配置

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/2023面试高手/article/detail/402184
推荐阅读
相关标签
  

闽ICP备14008679号