由于这个错误,我失去了一个星期的生命,如果有一个人可以为这个问题提供解决方案,我将非常感激
在我的Mac Catalina中,我无法在Android上构建Ionic 3应用程序
我迷失了方向,请注意!!!
> ionic cordova build android --prod
> ionic-app-scripts build --prod --target cordova --platform android
[21:20:07] ionic-app-scripts 3.2.2
[21:20:07] build prod started ...
[21:20:07] clean started ...
[21:20:07] clean finished in 4 ms
[21:20:07] copy started ...
[21:20:08] deeplinks started ...
[21:20:08] deeplinks finished in 19 ms
[21:20:08] ngc started ...
[21:20:21] ngc finished in 13.22 s
[21:20:21] preprocess started ...
[21:20:21] preprocess finished in 2 ms
[21:20:21] webpack started ...
[21:20:21] copy finished in 13.88 s
[21:20:46] webpack finished in 25.14 s
[21:20:46] uglify started ...
[21:20:46] sass started ...
[21:20:49] sass finished in 3.18 s
[21:20:49] cleancss started ...
[21:20:53] cleancss finished in 3.67 s
[21:21:04] uglify finished in 18.51 s
[21:21:04] postprocess started ...
[21:21:04] postprocess finished in 22 ms
[21:21:04] lint started ...
[21:21:04] build prod finished in 57.03 s
[21:21:12] lint finished in 7.06 s
> cordova build android
ANDROID_HOME=/Users/bruno/Library/Android/sdk
JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_221.jdk/Contents/Home
FAILURE: Build failed with an exception.
* What went wrong:
Could not read settings file '/Users/bruno/Desktop/TMT/Final/tutorial/platforms/android/settings.gradle' as it does not exist. // and Me I say it exists
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 3s
Error: /Users/bruno/.sdkman/candidates/gradle/5.6.3/bin/gradle: Command failed with exit code 1 Error output:
FAILURE: Build failed with an exception.
* What went wrong:
Could not read settings file '/Users/bruno/Desktop/TMT/Final/tutorial/platforms/android/settings.gradle' as it does not exist. // and Me I say it exists
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 3s
[ERROR] An error occurred while running subprocess cordova.
离子信息
Ionic:
Ionic CLI : 5.4.4 (/usr/local/lib/node_modules/ionic)
Ionic Framework : ionic-angular 3.9.5
@ionic/app-scripts : 3.2.2
Cordova:
Cordova CLI : 7.1.0
Cordova Platforms : android 6.3.0
Cordova Plugins : cordova-plugin-ionic-keyboard 2.2.0, cordova-plugin-ionic-webview 4.1.2, (and 4 other plugins)
Utility:
cordova-res : 0.8.0
native-run : not installed
System:
Android SDK Tools : 26.1.1 (/Users/bruno/Library/Android/sdk)
NodeJS : v10.16.3 (/usr/local/bin/node)
npm : 6.9.0
OS : macOS Catalina
有关更多信息,当我将cordova更新为8并删除平台并再次添加时,执行失败并显示相同错误:
我尝试使用添加平台android@6.4.0以及@ 6.3.0,但始终存在此类问题。