Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/redis/2.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
无法在android 4.4.2上调试构建应用程序,但它可以在android 6.0.1上运行_Android_Exception_Proguard - Fatal编程技术网

无法在android 4.4.2上调试构建应用程序,但它可以在android 6.0.1上运行

无法在android 4.4.2上调试构建应用程序,但它可以在android 6.0.1上运行,android,exception,proguard,Android,Exception,Proguard,我得到的错误是:(这是一个大项目) Gradle有一个很大的日志输出,我知道我最终必须清理proguard-rules.pro,但为什么它能在android 6.0.1上工作而不能在android 4.4.2上工作呢。日志以“Build failed with a exception”结尾,我尝试“Run with--stacktrace”,但看不到异常,我解决了它。 原因是应用程序内部构建gradle我使用的是play services 11.4.0和firebase 11.4.2。 不知何故

我得到的错误是:(这是一个大项目)

Gradle有一个很大的日志输出,我知道我最终必须清理proguard-rules.pro,但为什么它能在android 6.0.1上工作而不能在android 4.4.2上工作呢。日志以“Build failed with a exception”结尾,我尝试“Run with--stacktrace”,但看不到异常,我解决了它。 原因是应用程序内部构建gradle我使用的是play services 11.4.0和firebase 11.4.2。
不知何故,我错过了同步它们以使用相同的版本。

你说的
在android 6.0.1上工作而不是在android 4.4.2上工作是什么意思?如果您的代码需要SDK 23进行编译,并且将
compileSdkVersion
设置为较低的值,则会缺少类。问题是,为什么要降低
编译dkversion
?也许你想改成
targetSdkVersion
minSdkVersion
。我的应用程序版本为'compileSdkVersion 26,buildToolsVersion“25.0.3”,minSdkVersion 16,targetSdkVersion 26`我可以在android 6.0.1 Marshmallow api 23上运行应用程序,但不能在4.4.2上运行。这可能是因为您的项目中有太多的方法引用,而android 4无法开箱即用地运行此类应用程序。你可以,但是你应该现在就开始优化那些proguard规则,因为这样对性能更好。谢谢,当然我会优化的。关于multidex,我没有看到任何构建错误表明我的应用程序已经达到Android构建架构的极限,并且它确实在api 23上运行
Note: there were 10 references to unknown classes.
      You should check your configuration for typos.
      (http://proguard.sourceforge.net/manual/troubleshooting.html#unknownclass)
Note: there were 239 unkept descriptor classes in kept class members.
      You should consider explicitly keeping the mentioned classes
      (using '-keep').
      (http://proguard.sourceforge.net/manual/troubleshooting.html#descriptorclass)
Note: there were 27 unresolved dynamic references to classes or interfaces.
      You should check if you need to specify additional program jars.
      (http://proguard.sourceforge.net/manual/troubleshooting.html#dynamicalclass)

Warning: there were 2292 unresolved references to classes or interfaces.
         You may need to add missing library jars or update their versions.
         If your code works fine without the missing classes, you can suppress
         the warnings with '-dontwarn' options.
         (http://proguard.sourceforge.net/manual/troubleshooting.html#unresolvedclass)
Warning: there were 241 unresolved references to program class members.
         Your input classes appear to be inconsistent.
         You may need to recompile the code.
         (http://proguard.sourceforge.net/manual/troubleshooting.html#unresolvedprogramclassmember)

Warning: Exception while processing task java.io.IOException: Please correct the above warnings first.
:app:transformClassesAndResourcesWithProguardForDebug FAILED

FAILURE: Build failed with an exception.