android - Error: Android dependency has different version for the compile and runtime classpath
问题描述
I have a ionic cordova project. I use the following command to build my app:
ionic cordova build android -- --xwalk64bit --release
I get this error:
Android dependency dependencyName
has different version for the compile Vx
and runtime Vy
classpath.
I tried these solutions:
Android dependency has different version for the compile and runtime
The only solution that half works is adding implementation to the dependencies. However when i launch the build command cordova replaces the name and version of my packages by 27.+:
implementation "com.android.support:support-v4:27.1.1"
implementation "com.android.support:support-fragment:26.1.0"
implementation "com.android.support:support-core-ui:26.1.0"
implementation "com.android.support:support-core-utils:26.1.0"
implementation "com.android.support:support-media-compat:26.1.0"
implementation "com.android.support:support-compat:26.1.0"
by
implementation27.+"
implementation27.+"
implementation27.+"
implementation27.+"
implementation27.+"
implementation27.+"
Then the build fails with a parsing error.
Using:
allprojects {
//...
configurations.all {
resolutionStrategy.force "com.android.support:support-v4:27.1.1"
// etc.
}
}
doesn't work. Using:
configurations.all {
resolutionStrategy.eachDependency { details ->
if (details.requested.group == 'com.android.support'
&& !details.requested.name.contains('multidex') ) {
details.useVersion "26.1.0"
}
}
}
doesn't work either.
Help appreciated.
解决方案
推荐阅读
- mongodb - 原型 GraphQL、MongoDB——无模式?
- c# - C#从数据库中检索传递数据
- cmd - ImageMagick 通过 CMD 提示追加递归子目录
- python - 根据另一个数组将numpy数组填充到位置
- ios - 快速捕捉实况照片
- ruby-on-rails - 如何将具有范围的搜索过滤器添加到 Searchkick?(轨道 5)
- java - 如何在android中检查日期在10天内
- android - 带有 listview 错误结果的 searchview
- r - 使用 R 重塑数据(也许很容易,也许不简单)
- python - 如何使用 jira-python API 标记 Jira TC 执行状态失败或通过?