-1

导出 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 中添加一些额外的东西???谢谢

4

1 回答 1

0

此字段和此方法仅在 android-11 或更高版本中可用,因此您应该针对目标 android-11 或更高版本进行构建。仍然可以在您的 AndroidManifest.xml 文件中指定不同的 targetSdkVersion。

于 2013-09-13T23:46:09.207 回答