React Native ~ Troubleshooting ~ Android - rohit120582sharma/Documentation GitHub Wiki

Android Studio : Configuration

Error

Configuration 'compile' is obsolete and has been replaced with 'implementation'. It will be removed at the end of 2018

I got this error after an update of Android Gradle plugin and Android Studio.

Solution

  • Go to the build.gradle(module app)
  • In the dependencies
  • Now you have to ONLY replace the compile with implementation and testCompile with testImplementation

Reference link for details.


Missing third party library linking

react-native link react-native-navigation
react-native link react-native-vector-icons
react-native link react-native-splash-screen
react-native link react-native-device-info
react-native link react-native-linear-gradient
react-native link react-native-cookies
react-native unlink react-native-global-props

Can't find symbol: NavigationReactPackage

  • Resolved this issue by changing the import in MainApplication.java
  • Previous: import com.reactnativenavigation.NavigationReactPackage;
  • New: import com.reactnativenavigation.bridge.NavigationReactPackage

Could not find com.android.tools.build:gradle:3.0.1

Reference link for more details.


'adb not found' error

You might get the error “adb not found” when trying to run the app on an Android simulator or device.

adb stands for Android Debug Bridge and you may need to manually add it to your system PATH variable to ensure that you can run the command from anywhere on your system.

Mac/ Linux

Please check the following thread to find detailed instructions on how to add adb as a globally available command: https://stackoverflow.com/questions/10303639/adb-command-not-found

⚠️ **GitHub.com Fallback** ⚠️