Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/233.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构建因cordova发布而失败_Android_Cordova_Android Proguard - Fatal编程技术网

Android构建因cordova发布而失败

Android构建因cordova发布而失败,android,cordova,android-proguard,Android,Cordova,Android Proguard,当我运行cordova build--release Android-debug命令时,我的Android构建失败。我能够生成正常的构建。我正在使用cordova v7.0.0 BUILD FAILED Total time: 1 mins 39.667 secs FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':transformClassesAndResourc

当我运行
cordova build--release Android-debug
命令时,我的Android构建失败。我能够生成正常的构建。我正在使用cordova v7.0.0

BUILD FAILED

Total time: 1 mins 39.667 secs

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.
Error: cmd: 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: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: E:\Worklight Mobile App\MFP8.0\mfp-ws\2FileUI\platforms\android\src\org\apache\cordova\file\AssetFilesystem.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked 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文件中添加了以下行,错误消失了:

-dontwarn okhttp3.internal.huc.**

我在proguard文件中添加了以下行,错误消失了:

-dontwarn okhttp3.internal.huc.**