Reputation: 305
I'm a newbie in React-native. In the first project. I init react project with command line react-native init <project name>
This environment:
nodejs: v4.5.0, npm: 4.1.2 and ANDROID_HOME.
When I run adb device
But when I run project react-native run-android
I try run command line adb reverse tcp:8081 tcp:8081
but it not working.
Who can tell me fix this error. Thanks
Upvotes: 1
Views: 342
Reputation: 5352
Install Android SDK v23
should resolve your problem.
Update answer:
Android API 23 I installed but when I install Android SDK Build-tool 23.0.1 it's working while Android SDK Build-tool 23.0.2 or 23.0.3 not working
Because 23.0.1
is the default SDK version for a React Native project. I don't know how to modify this but if you want to see the build version, checkout this file android/app/build.gradle
. You would see a section with following content:
android {
compileSdkVersion 23
buildToolsVersion "23.0.1"
}
Upvotes: 2
Reputation: 15616
You need to install the Android build tools via Android Studio.
You should then be able to build onto the device.
Upvotes: 0
Reputation: 2214
Did you enable developer options on your phone? if not check this line: enable developer options on android device
Upvotes: 0