简体   繁体   English

与依赖项'com.android.support:support-v4'冲突

[英]Conflict with dependency 'com.android.support:support-v4'

I'm developing a mobile application with Ionic 1. I tried to build it on build.phonegap but after the compilation I faced such an error in log file. 我正在使用Ionic 1开发一个移动应用程序。我试图在build.phonegap上构建它,但是在编译之后,我在日志文件中遇到了这样的错误。 Log file contains this error: 日志文件包含以下错误:

Command finished with error code 1: /project/gradlew cdvBuildDebug,-b,/project/build.gradle,-Dorg.gradle.daemon=true,-Dorg.gradle.jvmargs=-Xmx2048m,-Pandroid.useDeprecatedNdk=true Error: /project/gradlew: Command failed with exit code 1 Error output: Note: Some input files use or override a deprecated API. 命令以错误代码1结束:/ project / gradlew cdvBuildDebug,-b,/ project / build.gradle,-Dorg.gradle.daemon = true,-Dorg.gradle.jvmargs = -Xmx2048m,-Pandroid.useDeprecatedNdk = true错误: / project / gradlew:命令失败,退出代码为1错误输出:注意:某些输入文件使用或覆盖不推荐使用的API。 Note: Recompile with -Xlint:deprecation for details. 注意:有关详细信息,请使用-Xlint:deprecation重新编译。 Note: Some input files use or override a deprecated API. 注意:某些输入文件使用或覆盖不推荐使用的API。 Note: Recompile with -Xlint:deprecation for details. 注意:有关详细信息,请使用-Xlint:deprecation重新编译。 Conflict with dependency 'com.android.support:support-v4'. 与依赖项“ com.android.support:support-v4”冲突。 Resolved versions for compilation (25.4.0) and packaging (28.0.0-alpha3) differ. 编译(25.4.0)和打包(28.0.0-alpha3)的已解决版本不同。 This can generate runtime errors due to mismatched resources. 由于资源不匹配,这可能会生成运行时错误。

After this error I deleted this line; 发生此错误后,我删除了这一行;

<plugin name="de.appplant.cordova.plugin.local-notification" source="npm" />

from the config file inside the www folder, and the problem was solved. 从www文件夹内的配置文件中,问题已解决。 But at the end, I need this plugin in my application. 但是最后,我需要在应用程序中使用此插件。

PS: I searched this issue on many sources but because of phonegap I shouldn't solve this problem by changing the .gradle file. PS:我从许多来源搜索了此问题,但是由于phonegap的原因,我不应该通过更改.gradle文件来解决此问题。

This issue is caused by at least one other plugin in your project referencing a different version of the Android Support Library than de.appplant.cordova.plugin.local-notification . 此问题是由您项目中的至少一个其他插件所引用的Android支持库版本不同于de.appplant.cordova.plugin.local-notification

If you were building locally, you could, as you mentioned, edit the .gradle config files manually to resolve this. 如果您是在本地构建的,则可以如上所述,手动编辑.gradle配置文件以解决此问题。

Or you could use the cordova-android-support-gradle-release plugin to automatically align the support library versions. 或者,您可以使用cordova-android-support-gradle-release插件自动调整支持库的版本。 However, this plugin relies on Cordova hook scripts which are not supported by Phonegap Build . 但是,此插件依赖于Phonegap Build不支持的 Cordova挂钩脚本。

So to resolve this issue in the Phonegap Build environment, your only option as I see it is to fork the problematic plugins, manually align the support library versions referenced in their plugin.xml / .gradle files, and reference these forked plugins in your project's config.xml 因此,要在Phonegap Build环境中解决此问题,您看到的唯一选择是派生有问题的插件,手动对齐其plugin.xml / .gradle文件中引用的支持库版本,并在项目的目录中引用这些分叉的插件。 config.xml

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 将Connect SDK添加到Gradle文件时与依赖项&#39;com.android.support::support-v4&#39;发生冲突 - Conflict with dependency 'com.android.support::support-v4' when adding Connect SDK to gradle file Espresso错误:与依赖项“ com.android.support:support-v4”发生冲突。 应用(24.2.0)和测试应用(23.1.1)的已解决版本不同 - Espresso Error:Conflict with dependency 'com.android.support:support-v4'. Resolved versions for app (24.2.0) and test app (23.1.1) differ 错误:与项目&#39;:app&#39;中的依赖项&#39;com.android.support:support-v4&#39;发生冲突。 应用(25.3.1)和测试应用(23.1.1)的已解决版本不同 - Error:Conflict with dependency 'com.android.support:support-v4' in project ':app'. Resolved versions for app (25.3.1) and test app (23.1.1) differ Android依赖项&#39;com.android.support:support-v4&#39;具有不同的版本波动 - Android dependency 'com.android.support:support-v4' has different version flutter 无法解析:com.android.support:support-v4:23.0.0 - Failed to resolve: com.android.support:support-v4:23.0.0 找不到:com.android.support:support-v4:22.2.0 - Failed to find: com.android.support:support-v4:22.2.0 找不到com.android.support:support-v4:23.4.0 - Could not find com.android.support:support-v4:23.4.0 Android依赖项&#39;com.android.support:support-v4&#39;具有不同的版本 - Android dependency 'com.android.support:support-v4' has different version 无法解析com.android.support:support-v4:23.2.1 - failed to resolve com.android.support:support-v4:23.2.1 Google Dagger com.android.support:support-v4依赖版本 - Google Dagger com.android.support:support-v4 dependency versions
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM