[英]Ionic v1 Build Failed in android
I have an ionic v1 app, when I tried to produce apk using ionic cordova build android
it failed to build the app. 我有一个ionic v1应用程序,当我尝试使用
ionic cordova build android
生成apk时,无法构建该应用程序。
I already change the DistibutionURL on my .js file to 4.xx
but every time I build the apps it detects that I have gradle 3.xx. 我已经将
DistibutionURL on my .js file to 4.xx
的DistibutionURL on my .js file to 4.xx
更改DistibutionURL on my .js file to 4.xx
但是每次构建应用程序时,它都会检测到我抓到了3.xx。 Why is this? 为什么是这样?
You edited the correct file? 您编辑了正确的文件? It's not a js file.
这不是一个js文件。
ionic-project/platforms/android/gradle/wrapper/gradle-wrapper.properties 离子项目/平台/安卓/ gradle产出/包装/ gradle-wrapper.properties
You will see 你会看见
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip
Change to 改成
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip
If this doesn't work try to install another cordova android platform: 如果这样不起作用,请尝试安装另一个cordova android平台:
cordova platform rm android
科尔多瓦平台rm android
cordova platform add android@7.1.1
科尔多瓦平台添加android@7.1.1
Or with 7.0.0 version, I recommend the 6.3.0 for legacy compatible. 或使用7.0.0版本,我建议使用6.3.0以兼容旧版。
The answer was to remove all installed platforms and delete plugin and platform folder. 答案是删除所有已安装的平台,并删除插件和平台文件夹。 Re-add platform.
重新添加平台。 Thanks to @Guillem Perez.
感谢@Guillem Perez。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.