diff --git a/android/app/build.gradle b/android/app/build.gradle index 28ef7b0..cfbef20 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -94,13 +94,13 @@ def enableSeparateBuildPerCPUArchitecture = false def enableProguardInReleaseBuilds = false android { - compileSdkVersion 25 - buildToolsVersion "25.0.1" + compileSdkVersion 27 + buildToolsVersion '27.0.3' defaultConfig { applicationId "com.reduxforreactnativedemo" minSdkVersion 16 - targetSdkVersion 22 + targetSdkVersion 27 versionCode 1 versionName "1.0" ndk { @@ -138,7 +138,8 @@ android { dependencies { compile fileTree(dir: "libs", include: ["*.jar"]) - compile "com.android.support:appcompat-v7:23.0.1" + compile 'com.android.support:design:27.1.1' + compile "com.android.support:appcompat-v7:27.1.1" compile "com.facebook.react:react-native:+" // From node_modules compile project(':react-native-navigation') } diff --git a/android/app/src/main/java/com/reduxforreactnativedemo/MainActivity.java b/android/app/src/main/java/com/reduxforreactnativedemo/MainActivity.java index 43e464f..2a4d558 100644 --- a/android/app/src/main/java/com/reduxforreactnativedemo/MainActivity.java +++ b/android/app/src/main/java/com/reduxforreactnativedemo/MainActivity.java @@ -1,16 +1,7 @@ package com.reduxforreactnativedemo; -import com.facebook.react.ReactActivity; import com.reactnativenavigation.controllers.SplashActivity; public class MainActivity extends SplashActivity { - /** - * Returns the name of the main component registered from JavaScript. - * This is used to schedule rendering of the component. - */ - @Override - protected String getMainComponentName() { - return "ReduxForReactNativeDemo"; - } } diff --git a/android/app/src/main/java/com/reduxforreactnativedemo/MainApplication.java b/android/app/src/main/java/com/reduxforreactnativedemo/MainApplication.java index 58e13f5..a72f211 100644 --- a/android/app/src/main/java/com/reduxforreactnativedemo/MainApplication.java +++ b/android/app/src/main/java/com/reduxforreactnativedemo/MainApplication.java @@ -1,43 +1,29 @@ package com.reduxforreactnativedemo; -import android.app.Application; - -import com.facebook.react.ReactApplication; -import com.reactnativenavigation.NavigationReactPackage; -import com.facebook.react.ReactNativeHost; import com.facebook.react.ReactPackage; -import com.facebook.react.shell.MainReactPackage; -import com.facebook.soloader.SoLoader; import java.util.Arrays; import java.util.List; import com.reactnativenavigation.NavigationApplication; - public class MainApplication extends NavigationApplication { - - @Override - public boolean isDebug() { - // Make sure you are using BuildConfig from your own application - return BuildConfig.DEBUG; - } - - protected List getPackages() { - // Add additional packages you require here - // No need to add RnnPackage and MainReactPackage - return Arrays.asList( - new MainReactPackage(), - new NavigationReactPackage() - ); - } - - @Override - public List createAdditionalReactPackages() { - return getPackages(); - } - - @Override - public String getJSMainModuleName() { - return "index"; - } - } +public class MainApplication extends NavigationApplication { + @Override + public boolean isDebug() { + return BuildConfig.DEBUG; + } + + + @Override + public List createAdditionalReactPackages() { + return Arrays.asList( + // + ); + } + + @Override + public String getJSMainModuleName() { + return "index"; + } +} + diff --git a/android/build.gradle b/android/build.gradle index eed9972..4269f23 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -16,9 +16,23 @@ allprojects { repositories { mavenLocal() jcenter() + maven { + url 'https://maven.google.com' + } maven { // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm url "$rootDir/../node_modules/react-native/android" } } } + +subprojects { + afterEvaluate { + project -> if (project.hasProperty("android")) { + android { + compileSdkVersion 27 + buildToolsVersion '27.0.3' + } + } + } + } \ No newline at end of file