簡體   English   中英

Cordova Mobilefirst Android平台無法導出APK二進制文件

[英]Cordova Mobilefirst Android platform not able to export sign in APK binary file

我正在使用基於Cordova應用程序的Mobilefirst平台8.0,我已經導出了簽名的APK文件,但無法生成。 我嘗試了android studio以及命令提示符/終端,請在下面的錯誤日志中找到我從android studio gradle build和命令提示符處獲得的錯誤日志。

操作系統:MAC OS Android Studio:2.3+ Cordova:6.5.0 Mobilefirst 8.0

Error: /Users/user1/Documents/Testapp/Push/platforms/android/gradlew: Command failed with exit code 1 Error output:
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: there were 7 duplicate class definitions.
      (http://proguard.sourceforge.net/manual/troubleshooting.html#duplicateclass)
Warning: okhttp3.internal.huc.DelegatingHttpsURLConnection: can't find referenced method 'long getContentLengthLong()' in library class java.net.HttpURLConnection
Warning: okhttp3.internal.huc.DelegatingHttpsURLConnection: can't find referenced method 'long getHeaderFieldLong(java.lang.String,long)' in library class java.net.HttpURLConnection
Warning: okhttp3.internal.huc.DelegatingHttpsURLConnection: can't find referenced class org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement
Warning: okhttp3.internal.huc.DelegatingHttpsURLConnection: can't find referenced class org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement
Warning: okhttp3.internal.huc.DelegatingHttpsURLConnection: can't find referenced class org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement
Warning: okhttp3.internal.huc.OkHttpsURLConnection: can't find referenced class org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement
Warning: okhttp3.internal.huc.OkHttpsURLConnection: can't find referenced class org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement
Warning: okhttp3.internal.huc.OkHttpsURLConnection: can't find referenced class org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement
Warning: there were 6 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 2 unresolved references to library class members.
         You probably need to update the library versions.
         (http://proguard.sourceforge.net/manual/troubleshooting.html#unresolvedlibraryclassmember)

FAILURE: Build failed with an exception.

*** What went wrong:
Execution failed for task ':transformClassesAndResourcesWithProguardForRelease'.
> Job failed, see logs for details**

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

最可能的原因是Proguard規則文件配置錯誤。 此處關注博客,以成功混淆您的Android項目。

嘗試在您的profuard-mfp.txt文件中添加以下行:

-dontwarn okhttp3.internal.**

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM