Closed azamiya closed 5 years ago
You can read me about autolinking here.
Did you update from the previous version of RN or is it a new project?
I have this problem as well, I hav ethis problem since RN 0.59, so I upgraded to 0.60 thinking it would solve the problem, but didn't.
I tried to remove build, clean project and caches, but still nothing.
Autolinking works on Android by changing the way it's requiring the Native packages. Have a look at RN 0.60 MainApplication.java
.
@jakuubzmeko Any more details? 0.59 do have autolinking feature - you have to do it through CLI or manually.
@Krizzu I have RN 0.65,
I don't know whether I should see these packages in android studio, should I ?
I linked the libraries manualy, async-storage, gesture-handler and google-sign-in, and it works fine. Either they dont support autolinking, or autolinking doesn't work at my project
Do you have to be linked to run this library ?? isn't it for react-native@0.60.5 no need to link ?? if I error in IOS
@Jakuubzmeko What's the content of your MainApplication.java
?
@Krizzu It was the same, so I wanted to show you, so I unlinked them again, and edited the MainApplication.java
then I ran it and it works just fine.
What I think happend, that i did not unlink them properly before by react-native unlink, but just removed references from build.gradle
and MainApplication.java
. So maybe linking and unlinking helped. Still wandering what happened.
Got the same error. Doing a cd android/ && ./gradlew clean
before run-android
fixed autolinking for me.
Show add new AsyncStoragePackage());
in MainApplication.java
https://github.com/react-native-community/async-storage/blob/LEGACY/docs/Linking.md#android
Current behavior
yarn add @react-native-community/async-storage
andreact-native run-andoid
and this error is shown.
Hint
When I link it manually, https://github.com/react-native-community/async-storage/blob/LEGACY/docs/Linking.md#android
it works fine.
but this error is shown on the console.
Expected behavior
autolinking works.
Repro steps
yarn add @react-native-community/async-storage
react-native run-andoid
Environment