问题描述
当我尝试使用以下方法构建Ionic 5应用程序时:
ionic cordova build android
我收到此错误:
platforms\android\build.gradle
[ERROR] An error occurred while running subprocess cordova.
cordova.cmd build android exited with exit code 1.
Re-running this command with the --verbose flag may provide more information.
-
当我卸载FCM插件时,此问题消失了,但我需要FCM。
-
我还在config.xml中将此android-minSdkVersion从19更改为22,但它没有解决。
-
我删除了平台并重新添加了平台,然后删除了所有插件并重新安装它们。
-
我使用以下命令安装了FCM:
ionic cordova插件添加cordova-plugin-fcm-with-dependecy-updated npm安装@ ionic-native / fcm
-
在FCMPlugin.gradle文件中,我看到版本是19。
def ANDROID_FCM_VERSION = System.getenv('ANDROID_FCM_VERSION')?:rootProject.hasProperty('ANDROID_FCM_VERSION')? rootProject.ext.ANDROID_FCM_VERSION:PLUGIN_CONFIG.hasProperty(“ ANDROID_FCM_VERSION”)吗? PLUGIN_CONFIG.ANDROID_FCM_VERSION:null?:'19 .0.0'
-
在我的config.xml中,版本为19:
<preference name="android-minSdkVersion" value="19" />
-
我的离子信息是:
Ionic: Ionic CLI : 5.3.0 (D:\Imad\Projects\node_modules\ionic) Ionic Framework : @ionic/angular 5.3.2 @angular-devkit/build-angular : 0.901.12 @angular-devkit/schematics : 9.1.12 @angular/cli : 9.1.12 @ionic/angular-toolkit : 2.3.3
科尔多瓦:
Cordova CLI : 10.0.0 Cordova Platforms : android 9.0.0 Cordova Plugins : cordova-plugin-ionic-keyboard 2.2.0,cordova-plugin-ionic-webview 4.2.1,(and 9 other plugins)
实用程序:
cordova-res : 0.6.0 (update available: 0.8.1) native-run : 0.2.8 (update available: 0.2.9)
系统:
Android SDK Tools : 26.1.1 (D:\Android\Sdk) NodeJS : v10.16.3 (C:\Program Files\nodejs\node.exe) npm : 6.11.3 OS : Windows 10
请告知。
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)