Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Instant App: error when duplicate app folder, open in Android Studio and automatically build #3

Open
darthgween opened this issue Jun 13, 2024 · 7 comments

Comments

@darthgween
Copy link

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?

@ouzkagan
Copy link

ouzkagan commented Aug 1, 2024

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

@darthgween
Copy link
Author

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:

facebook/react-native#41580

@RobertSasak
Copy link

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

@darthgween
Copy link
Author

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?

@RobertSasak
Copy link

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.

@darthgween
Copy link
Author

Yea I know that guide, but it’s only iOS, and here iOS works fine, we have problems with Android instant app :(

@RomuloDevelop
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants