2017-08-14 16 views
1

我正在使用基於Cordova應用程序的Mobilefirst平臺8.0,並且我已導出簽名APK文件,但無法生成。 我試過android工作室以及命令提示符/終端,請在下面找到錯誤日誌我從android工作室gradle構建和命令提示符也得到它。Cordova Mobilefirst Android平臺無法導出登錄APK二進制文件

操作系統:MAC OS 機器人工作室:2.3+ 科爾多瓦: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. 
+0

您可以提供您的build.gradle – Srik

+0

buildTypes {內容 發佈{ signingConfig signingConfigs.release } – karthik

+0

signingConfigs { 發佈{// 這些必須設置或搖籃會抱怨(即使它們被覆蓋) 。 keyAlias =「」 keyPassword =「__unset」//爲了將簽名步驟添加到任務圖中,必須將它們設置爲非空。 storeFile = null storePassword =「__unset」 } } – karthik

回答

0

最可能的原因是錯誤配置Proguard的規則文件。按照博客here,成功混淆你的Android項目。