好了,我正在为android开发一个ionic应用程序,这周我更新了插件cordova和ionic,它不会再构建apk了。我知道问题出在firebase插件上,但我不知道如何解决它。
我创建了一个新的ionic项目,安装了cordova最新版本,并构建了apk,它可以工作。我添加了firebase插件(ionic cordova plugin add cordova- plugin -firebase + npm install @I 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.我不能给你看一些代码,因为我真的没有改变任何东西,只是添加了我需要的插件。
我尝试了旧版本的ionic,cordova和firebase,仍然得到相同的错误。
发布于 2019-11-19 14:36:19
Ionic无法在最新检查期间捕获任务':app:preDebugBuild‘属性'compileManifests’的输入文件指纹。出现此问题是由于
1).first移除平台
ionic cordova platform rm android
2).Remove fcm
cordova插件rm cordova- plugin -firebase-lib
3).Add平台
ionic cordova平台添加android@latest
4).Add fcm
ionic cordova插件添加cordova- plugin -fcm-with-dependecy-updated
npm install @ionic native/fcm
5)ionic cordova构建android
https://stackoverflow.com/questions/57822612
复制相似问题