gpt4 book ai didi

android - Redmi Note 4 不运行来自 Android Studio 的应用程序

转载 作者:行者123 更新时间:2023-11-29 15:37:36 24 4
gpt4 key购买 nike

我最近购买了小米 Redmi Note 4,并尝试将其用作从 Android studio 运行应用程序的设备。

第一次,它运行正常,但之后,它崩溃了,它说应用程序有问题,无法运行。代码正确!

我成为开发人员并通过 USB 启用 USB 调试和安装,但是当我尝试启用 USB 调试(安全)时,它会弹出一条消息“我临时限制的设备”...

我的设备中弹出的消息是:

java.lang.RuntimeException: Unable to create application com.android.tools.fd.runtime.BootstrapApplication: java.lang.IllegalStateException: java.lang.NoSuchFieldException: No field mAssets in class Landroid/content/res/MiuiResourcesImpl; (declaration of 'android.content.res.MiuiResourcesImpl' appears in /system/framework/framework.jar) at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5431) at android.app.ActivityThread.-wrap2(ActivityThread.java) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1563) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:154) at android.app.ActivityThread.main(ActivityThread.java:6195) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:874) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:764) Caused by: java.lang.IllegalStateException: java.lang.NoSuchFieldException: No field mAssets in class Landroid/content/res/MiuiResourcesImpl; (declaration of 'android.content.res.MiuiResourcesImpl' appears in /system/framework/framework.jar) at com.android.tools.fd.runtime.MonkeyPatcher.monkeyPatchExistingResources(MonkeyPatcher.java:442) at com.android.tools.fd.runtime.BootstrapApplication.onCreate(BootstrapApplication.java:308) at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1025) at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5428) ... 8 more Caused by: java.lang.NoSuchFieldException: No field mAssets in class Landroid/content/res/MiuiResourcesImpl; (declaration of 'android.content.res.MiuiResourcesImpl' appears in /system/framework/framework.jar) at java.lang.Class.getDeclaredField(Native Method) at com.android.tools.fd.runtime.MonkeyPatcher.monkeyPatchExistingResources(MonkeyPatcher.java:433) ... 11 more

有没有人可以帮助我?谢谢!

最佳答案

Redmi Note 4 智能手机出现问题。以下说明适用于 PC 和 Mac。

转到设置 > 其他设置(在系统和设备下)> 开发人员选项

  1. 滚动到页面底部并禁用开启 MIUI 优化
  2. 启用USB 调试
  3. 启用通过 USB 安装
  4. 启用USB 调试(安全设置)

关于android - Redmi Note 4 不运行来自 Android Studio 的应用程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46706743/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com