Can't build Android after upgrading to RN 0.69
Hello, I have upgraded my project to use the latest version of React Native 0.69 While I can make a debug build without issue, I'm facing an error I cannot resolve when I make a production build on Android
Execution failed for task ':iterable_react-native-sdk:verifyReleaseResources'.
> A failure occurred while executing com.android.build.gradle.tasks.VerifyLibraryResourcesTask$Action
> Android resource linking failed
ERROR:/Users/Alexis/.gradle/caches/transforms-3/c5bd231533bac8afd0a3a300eabfc673/transformed/core-1.7.0/res/values/values.xml:105:5-114:25: AAPT: error: resource android:attr/lStar not found.
I have the same issue with my local machine and the CI. Removing the iterable dependency from my project allows me to build. I've tried different versions of iterable, including the latest version 1.3.6.
I've also tried to use different versions of kotlinVersion and androidXCore but it's still failing.
How to reproduce?
Initialise a new React-Native project - will be 0.69.4 as of today
npx react-native init AwesomeProject
Install iterable sdk
npm install @iterable/react-native-sdk
Create an android release build
cd ./android
./gradlew assembleRelease
Thanks for reporting @alexmngn. What is your Android app's targetSDK version? Have you tried updating it?
This is my gradle config which is the same one as RN 0.69
buildToolsVersion = "31.0.0"
minSdkVersion = 21
compileSdkVersion = 31
targetSdkVersion = 31
Hi @alexmngn ,
Have you tried this?
./gradlew app:assembleRelease
Let me know if that helps... Reference: https://stackoverflow.com/a/61932616/6059451
@Ayyanchira I have just tried to use this command and yes, it does build properly. That's a workaround I can use for now until the versions of the iterable sdk get more in sync with the latest RN. Thanks for this!
@Ayyanchira I was working on fixing this error and just found this answer, thanks bro.
Ayyanchira
it work for me, thanks
Hi @alexmngn , Have you tried this?
./gradlew app:assembleReleaseLet me know if that helps... Reference: https://stackoverflow.com/a/61932616/6059451
nice this also work for me