jmi*_*rrr 5 android build firebase ionic-framework
好吧,我正在为 Android 开发一个 ionic 应用程序,本周我更新了插件、cordova 和 ionic,它不会再构建 apk 了。我知道问题出在 firebase 插件上,但我不知道如何修复它。
我创建了一个新的 ionic 项目,安装了 cordova 最新版本并构建了 apk,它可以工作。我添加了 firebase 插件(ionic cordova 插件 add cordova-plugin-firebase + npm install @ionic-native/firebase)并尝试构建 apk,但出现以下错误:
BUILD FAILED in 1s
C:\Users\jmir\goInstall\platforms\android\gradlew: Command failed with
exit code 1 Error output:
FAILURE: Build failed with an exception.
* What went wrong:
Failed to capture fingerprint of input files for task ':app:preDebugBuild' property 'compileManifests' during up-to-date check.
> The library com.google.android.gms:play-services-measurement-base is being requested by various other libraries at [[17.0.0,17.0.0], [17.2.0,17.2.0]], but resolves to 17.2.0. Disable the plugin and check your dependencies tree using ./gradlew :app:dependencies.
* 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 1s
[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.
Run Code Online (Sandbox Code Playgroud)
我无法向您展示一些代码,因为我确实没有更改任何内容,只是添加了我需要的插件。
我尝试过旧版本的 ionic、cordova 和 firebase,仍然遇到相同的错误。
小智 2
Ionic 无法在最新检查期间捕获任务 ':app:preDebugBuild' 属性 'compileManifests' 的输入文件指纹出现此问题是由于 fcm 所以
1).first 删除平台
离子科尔多瓦平台 rm android
2).删除fcm
cordova 插件 rm cordova-plugin-firebase-lib
3).添加平台
ionic cordova 平台添加 android@latest
4).添加fcm
ionic cordova插件添加cordova-plugin-fcm-with-dependecy-updated
npm install @ionic-native/fcm
5)ionic cordova构建android
| 归档时间: |
|
| 查看次数: |
2342 次 |
| 最近记录: |