Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/349.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 启动后立即关闭应用程序 我的应用程序在成功构建并加载到我的设备后立即关闭_Java_Android_Code Injection_Dagger 2_Butterknife - Fatal编程技术网

Java 启动后立即关闭应用程序 我的应用程序在成功构建并加载到我的设备后立即关闭

Java 启动后立即关闭应用程序 我的应用程序在成功构建并加载到我的设备后立即关闭,java,android,code-injection,dagger-2,butterknife,Java,Android,Code Injection,Dagger 2,Butterknife,实际上,它是完整堆栈跟踪: /? I/art: Late-enabling -Xcheck:jni W/System: ClassLoader referenced unknown path: /data/app/com.akadream.musicplayer.MOCK-1/lib/arm64 I/HwCust: Constructor found for class android.app.HwCustHwWallpaperManagerImpl W/art: Before Android

实际上,它是完整堆栈跟踪:

/? I/art: Late-enabling -Xcheck:jni
W/System: ClassLoader referenced unknown path: /data/app/com.akadream.musicplayer.MOCK-1/lib/arm64
I/HwCust: Constructor found for class android.app.HwCustHwWallpaperManagerImpl
W/art: Before Android 4.1, method android.graphics.PorterDuffColorFilter android.support.graphics.drawable.VectorDrawableCompat.updateTintFilter(android.graphics.PorterDuffColorFilter, android.content.res.ColorStateList, android.graphics.PorterDuff$Mode) would have incorrectly overridden the package-private method in android.graphics.drawable.Drawable
I/Process: Sending signal. PID: 30693 SIG: 9
编辑:
  • 项目中目前唯一配置的是使用Dagger进行注入,所有内容都可以正确编译
    • 我找到了解决办法

      在应用程序类中,我有一个抛出异常的cast

      无法将应用程序强制转换为CustomApplication


      我只是忘了在清单中添加
      android:name=“.CustomApplication”

      清除您的构建并重新构建。已经尝试过多次,我也尝试过多次使缓存无效并重新启动。我尝试使用断点进行调试,但应用程序甚至没有启动@davidawson的可能副本。我发布了解决方案,发现它不是完整的堆栈跟踪。您需要关闭过滤器才能看到这一点。