The solution was to open /node_modules/react-native-custom-tabs/android/src/main/java/com/github/droibit/android/reactnative/customtabs/CustomTabsModule.java and delete the line:
I got the idea looking at the Android documentation page for CustomTabsIntent, which notes that it is deprecated in favor of AndroidX. This is the documentation page for the AndroidX custom tabs package I used.
My questions:
Why does this fix work?
Is this repo still maintained? If so, would you all like a PR for this fix? I ask because I don't know if this fix is a good idea (I don't know why it works!)
Hello,
I have been struggling with a bug. I found a solution, but I am not sure why it works.
When I would run
./gradlew bundleRelease
, I would get an error:TabsModule.java:9: error: cannot find symbol import android.support.customtabs.CustomTabsIntent;
My
android/gradle.properties
looked like:`android.useAndroidX=true
android.enableJetifier=true
MYAPP_UPLOAD_STORE_FILE={{keystore_here}}
MYAPP_UPLOAD_KEY_ALIAS={{alias_here}}
MYAPP_UPLOAD_STORE_PASSWORD={{password_here}}
MYAPP_UPLOAD_KEY_PASSWORD={{password_here}}
org.gradle.jvmargs=-XX\:MaxHeapSize\=512m -Xmx512m`
The solution was to open
/node_modules/react-native-custom-tabs/android/src/main/java/com/github/droibit/android/reactnative/customtabs/CustomTabsModule.java
and delete the line:import android.support.customtabs.CustomTabsIntent;
and replace it with:
import androidx.browser.customtabs.CustomTabsIntent;
I got the idea looking at the Android documentation page for CustomTabsIntent, which notes that it is deprecated in favor of AndroidX. This is the documentation page for the AndroidX custom tabs package I used.
My questions: