app-clip-instant-app-react-native
app-clip-instant-app-react-native copied to clipboard
Instant App: error when duplicate app folder, open in Android Studio and automatically build
I followed all the AppClip guide and it works fine. Now I'm trying to develop an Instant App as well, let me explain all the steps to reproduce the error:
- I tried with the latest sdk and node version as well as with the versions suggested by the guide
- I followed all the steps then I created a new react native project as the guide suggest
- Then I copied the app folder located into the generated android folder and I rename it as appInstant
- I opened the android folder into Android Studio (with all the required setup) and when it starts to build (the build phase starts automatically) I got this error:
Build file '/My/Path/To/RNProject/TestAndroidV3/android/appInstant/build.gradle' line: 3
A problem occurred evaluating project ':appInstant'.
Failed to apply plugin 'com.facebook.react'. The value for property 'languageVersion' is final and cannot be changed any further.
If I try it without creating the appInstant folder it works properly on simulator Idk if it may be useful but with react-native doctors everything is fine.
This is the build --scan: https://scans.gradle.com/s/q37z3zw5dwkko
Any suggestions to how to fix this and let it work?
experienced same issue, couldn't find any solution for now, i am starting to think it is impossible to integrate instant apps in react native anymore
Tbh I found out an half solution that works on empty project until u don’t use some libraries like react-native-navigation (not sure about the right name now) but I honestly don’t like it:
https://github.com/facebook/react-native/issues/41580
I think this plugin does not support when you call expo prebuild multiple times. Try to call it always as a clean setup.
expo prebuild --clean
I’m not using expo since this guide doesn’t use it, so I don’t think this can help, did u do everything with expo and instant app?
I am sorry. I made a mistake by not fully reading the issue. I used this https://github.com/bndkt/react-native-app-clip on iOS.
Yea I know that guide, but it’s only iOS, and here iOS works fine, we have problems with Android instant app :(
I'm facing the same issue, I manually removed the typical configs Android Studio adds when you "instant enabled" your app. That way I have a bundle with the installed app and if I want to build the instant version I add the configs again.