diff --git a/templates/android.js b/templates/android.js index fa7e4c3..e22b577 100644 --- a/templates/android.js +++ b/templates/android.js @@ -7,7 +7,9 @@ buildscript { } dependencies { - classpath 'com.android.tools.build:gradle:1.3.1' + // Matches the RN Hello World template + // https://github.com/facebook/react-native/blob/1e8f3b11027fe0a7514b4fc97d0798d3c64bc895/local-cli/templates/HelloWorld/android/build.gradle#L8 + classpath 'com.android.tools.build:gradle:2.2.3' } } @@ -29,6 +31,12 @@ android { } repositories { + maven { + // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm + // Matches the RN Hello World template + // https://github.com/facebook/react-native/blob/1e8f3b11027fe0a7514b4fc97d0798d3c64bc895/local-cli/templates/HelloWorld/android/build.gradle#L21 + url "$projectDir/../node_modules/react-native/android" + } mavenCentral() }