1

hello i want to ask about android error message and i want to know how to solve this issue. im develop it with react native, and i wanted to know what does it mean and how to solve it. you can see the error here bellow

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

thanks in advance

PS. i'm already set android.enableAapt2 into false

edit : i've found how to reproduce this error

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" }

im suspecting there is a conflict about the dependencies,because when im comment one of the package its working without an issue but i don't know how to solve it. perhaps veteran android can help me how to solve it ? thanks in advance

Hoho Haha
  • 11
  • 3
  • what is your Gradle version and and buildtools, sdk versions etc – Naveed Sheriffdeen Oct 29 '18 at 08:58
  • im using compileSdkVersion = 27, buildToolsVersion= "27.0.3",wrapper = gradle-4.6, build:gradle:3.0.0 – Hoho Haha Oct 29 '18 at 08:59
  • did you try building to project through android studio, open project and goto file and click invalidate cache and restart – Naveed Sheriffdeen Oct 29 '18 at 09:04
  • its still the same, i've tried it with terminal gradle and android studio. thanks – Hoho Haha Oct 29 '18 at 09:27
  • in your build.gradle add `google()` to your `buildscript repositories` and `allprojects repositories` right on the top and try another build also add ` maven { url 'https://plugins.gradle.org/m2/' }` to your `allprojects repositories – Naveed Sheriffdeen Oct 29 '18 at 09:32
  • i've done that too, and still the same, thanks – Hoho Haha Oct 29 '18 at 09:49
  • i found that there are multiple `aspectRatio` key. One inside react-native-camera `android/src/main/res/value/attrs.xml` which is ``, and the other inside midtrans uikit `uikit/src/main/res/values/attrs.xml` which is ``. The error occurred when they combined. I still doesn't know how to resolve this issue. I hope this information could help. – Bukhari Jan 29 '19 at 03:34

0 Answers0