Angularjs   发布时间:2022-04-20  发布网站:大佬教程  code.js-code.com
大佬教程收集整理的这篇文章主要介绍了ionic打包报错Execution failed for task ':compileDebugJavaWithJavac'.大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。

添加ionic插件cordova-plugin-file可能会遇到如下报错

:processDebugresources
:generateDebugsources
:compileDebugJava
apache/cordova/filetransfer/FileTransfer.java:59: error: package org.apache.cordova.file does not exist
import org.apache.cordova.file.FileUtils;
                              ^
apache/cordova/filetransfer/FileTransfer.java:912: error: cAnnot find symbol
                        FileUtils filePlugin = (FileUtils) pm.getPlugin("File");
                        ^
  symbol: class FileUtils
cordova/filetransfer/FileTransfer.java:912: error: cAnnot find symbol
                        FileUtils filePlugin = (FileUtils) pm.getPlugin("File");
                        
 :compileDebugJavaWithJavac Failed



FAILURE: Build Failed with an exception.


* what went wrong:
Execution Failed for task ':compileDebugJavaWithJavac'.

> Compilation Failed; see the compiler error output for details.



* Try:

Run with --stacktrace option to get the stack trace. Run with --info or --debugoption to get more log output.


BUILD Failed



@R_249_10586@l time: 6 mins 51.314 secs

如果你在ionic cordova platform add android时,有注意到cordova-plugin-file是需要cordova-android版本大于等于6.3.0

所以只需要运行命令ionic cordova platform remove android ionic cordova platform add android@6.3.0这样就在运行ionic build就能打包成功了

大佬总结

以上是大佬教程为你收集整理的ionic打包报错Execution failed for task ':compileDebugJavaWithJavac'.全部内容,希望文章能够帮你解决ionic打包报错Execution failed for task ':compileDebugJavaWithJavac'.所遇到的程序开发问题。

如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。