导出android app和proguard时出错。没有使用proguard,应用程序可以正常工作。我的代码中有com.commonsware.cwac.endless.EndlessAdapter库作为第三方,proguard在导出项目时抛出该错误...
Proguard returned with error code 1. See console
Warning: com.commonsware.cwac.endless.EndlessAdapter: can't find referenced field 'java.util.concurrent.Executor THREAD_POOL_EXECUTOR' in class android.os.AsyncTask
Warning: com.commonsware.cwac.endless.EndlessAdapter: can't find referenced method 'android.os.AsyncTask executeOnExecutor(java.util.concurrent.Executor,java.lang.Object[])' in class android.os.AsyncTask
You should check if you need to specify additional program jars.
Warning: there were 2 unresolved references to program class members.
Your input classes appear to be inconsistent.
You may need to recompile them and try again.
Alternatively, you may have to specify the option '-dontskipnonpubliclibraryclassmembers'.
java.io.IOException: Please correct the above warnings first.
at proguard.Initializer.execute(Initializer.java:321)
at proguard.ProGuard.initialize(ProGuard.java:211)
at proguard.ProGuard.execute(ProGuard.java:86)
at proguard.ProGuard.main(ProGuard.java:492)
有什么想法吗?在我的proguard-project.txt中添加一些额外的东西??? Thankssss
答案 0 :(得分:0)
此字段和此方法仅在android-11或更高版本中可用,因此您应该针对目标android-11或更高版本构建。仍然可以在AndroidManifest.xml文件中指定不同的targetSdkVersion。