build.gradle in android/ did not specify the Android Gradle plugin, making it impossible to build or open the folder in isolation.
Note that the plugin is only required when opening the project stand-alone (not when used as a dependency from an app project). Therefore, it has been wrapped in a project == rootProject statement).
In addition to that, several other related issues were present in that folder, all of which have been fixed in this PR:
android.iml file should not be in source control (already part of .gitignore, removed file)
repositories was missing the relative path to the react-native dependency, incorrectly pulling an ancient version from mvncentral
The react-native dependency was declared as api - This is not necessary, since app project bring their own version of react-native. Changed it to the default implementation, since there is no need to expose this downstream
Removed a redundant dependency on appcompat (already provided by react-native)
Fixes #669
Test Plan:
Use Android Studio and open android/. ("Build" ->) "Make Project".
or
Generate Gradle wrapper on command line:
gradle wrapper --gradle-version 5.4.1 --distribution-type all
build.gradle
inandroid/
did not specify the Android Gradle plugin, making it impossible to build or open the folder in isolation.Note that the plugin is only required when opening the project stand-alone (not when used as a dependency from an app project). Therefore, it has been wrapped in a
project == rootProject
statement).In addition to that, several other related issues were present in that folder, all of which have been fixed in this PR:
android.iml
file should not be in source control (already part of .gitignore, removed file)repositories
was missing the relative path to thereact-native
dependency, incorrectly pulling an ancient version from mvncentralreact-native
dependency was declared asapi
- This is not necessary, since app project bring their own version ofreact-native
. Changed it to the defaultimplementation
, since there is no need to expose this downstreamappcompat
(already provided byreact-native
)Fixes #669
Test Plan:
Use Android Studio and open
android/
. ("Build" ->) "Make Project".or
gradle wrapper --gradle-version 5.4.1 --distribution-type all
./gradlew build