Could not find androidsdk.modules
In my case i just replaced my dependency with
implementation 'com.facebook.android:facebook-android-sdk:5.15.3'
and it worked.
We can config 3 thing about the facebook SDK to a react native Android app:
- Version lib in
package.json
. - Dependency on
android/app/build.gradle
- Facebook sdk version on
android/build.gradle
.
This errors is probably a bug: https://github.com/facebook/react-native-fbsdk/issues/701
For me work this config:
"react-native-fbsdk": "1.1.2",
in package.jsonimplementation 'com.facebook.android:facebook-android-sdk:[5,5.11.1)'
on android/app/build.gradle.facebookSdkVersion = '5.15.3'
in android/build.gradle
I should have mentioned that this solution works for React Native. Rob's solution is best for native Android.
I just now had the same problem and here's what worked for me. Add facebookSdkVersion = "5.15.3"
to
android
|--build.gradle
buildscript {
ext {
buildToolsVersion = "28.0.3"
minSdkVersion = 18
compileSdkVersion = 28
targetSdkVersion = 28
...
// This is a temporary fix for react-native-fbsdk v1.1.2
facebookSdkVersion = "5.15.3"
}
}
References:
- https://github.com/facebook/facebook-android-sdk/issues/673
- https://github.com/facebook/react-native-fbsdk/issues/701
This fixed it for me. Only started happening today.
implementation 'com.facebook.android:facebook-android-sdk:5.15.3'