Didn't find class "com.android.tools.fd.runtime.BootstrapApplication"

来源:互联网 发布:儿童编程软件下载 编辑:程序博客网 时间:2024/05/22 12:03

         在部分机器上开启开启Instantrun,出现“ClassNotFoundException: Didn't find class"com.android.tools.fd.runtime.BootstrapApplication" on path:DexPathList”问题,可以通过下面的方式解决,在“AndroidManifest.xml”中配置的自定义Application,添加默认构造函数:

         1)AndroidManifest.xml中的Application配置:

<application
   
android:name=".MyApplication"
   
android:allowBackup="true"
   
android:icon="@mipmap/ic_launcher"
   
android:label="@string/app_name"
   
android:supportsRtl="true"
   
android:theme="@style/AppTheme">

         2)MyApplication中添加默认构造函数:

public MyApplication() {
   
super();
}

0 0