android - 无法构建android(因为重复的依赖?)
问题描述
你好我想问一下android错误信息,我想知道如何解决这个问题。我用 react native 开发它,我想知道它是什么意思以及如何解决它。你可以在下面看到错误
home/.gradle/caches/transforms-1/files-1.1/appcompat-v7-27.0.2.aar/588cc028d2e630da3036f4ad87f9dbb3/res/values/values.xml:252:5-69: AAPT: Attribute "aspectRatio" already defined with incompatible format.
home/.gradle/caches/transforms-1/files-1.1/appcompat-v7-27.0.2.aar/588cc028d2e630da3036f4ad87f9dbb3/res/values/values.xml:252:5-69: AAPT: Original attribute defined here.
project/node_modules/react-native-camera/android/build/intermediates/bundles/debug/res/values/values.xml:20:5-26:13: AAPT: String types not allowed (at 'aspectRatio' with value '4:3').
warning: string 'title_payment_failed' has no default translation.
Failed to generate resource table for split ''
project/android/app/build/intermediates/res/merged/debug/values/values.xml:477: error: Attribute "aspectRatio" already defined with incompatible format.
project/android/app/build/intermediates/res/merged/debug/values/values.xml:462: Original attribute defined here.
project/HGC-datacomm/android/app/build/intermediates/res/merged/debug/values/values.xml:3636: error: Error: String types not allowed (at 'aspectRatio' with value '4:3').
> Task :app:processDebugResources FAILED
Failed to execute aapt
com.android.ide.common.process.ProcessException: Failed to execute aapt
提前致谢
PS。我已经将 android.enableAapt2 设置为 false
编辑:我找到了如何重现这个错误
compile ('com.midtrans:uikit:1.20.3-PRODUCTION')
compile ('com.midtrans:uikit:1.20.3')
compile project(':react-native-camera')
// midtrans repositories
maven { url "http://dl.bintray.com/pt-midtrans/maven" }
maven { url "https://jitpack.io" }
我怀疑依赖项存在冲突,因为当我评论其中一个包时,它的工作没有问题,但我不知道如何解决它。也许老手android可以帮助我如何解决它?提前致谢
解决方案
推荐阅读
- excel - 将字符串的一部分设置为百分比
- typescript - 如何在 Preact X 和 Typescript 中使用 styled-components?
- c# - 在其他应用 IIS 中部署应用时出现应用服务器错误。X 型存在于 A 和 B 中
- python - 如何替换不同文件中动态的一段文本?
- postgresql - 多列上的 trigram 索引是否会使搜索更快以及如何正确进行此类搜索?
- javascript - 返回 Promise 的有条件的 Promise
- r - 从数据框中提取名称作为R中的单独数据
- javascript - javascript数组中的多个小值
- javascript - 无法注册网络工作者
- typescript - 扩展 tsconfig.json 文件似乎没有扩展任何东西