美文网首页
Android Studio错误集锦

Android Studio错误集锦

作者: beatzcs | 来源:发表于2018-06-24 00:00 被阅读0次

    1.Instant Run Error(Android Studio项目用真机跑时提示错误如下):
    Instant Run requires that the platform corresponding to your target device (Android 7.0 (Nougat)) is installed.
    即时运行在手机上需要有已安装的和目标设备相匹配的sdk platform版本。点击Install and Run,就会下载安装到sdk的platform文件夹中。

    2.ClassNotFoundException:"com.android.tools.fd.runtime.BootstrapApplication"

    即时运行错误:
    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)
    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)
    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)

    解决方法:

    image.png
    参考链接

    3.Unable to inflate view tag without class attribute.


    inflate error.png

    错误原因是布局文件写错,有一处使用View标签的地方写成了view(注意大小写)。

    相关文章

      网友评论

          本文标题:Android Studio错误集锦

          本文链接:https://www.haomeiwen.com/subject/mjtjyftx.html