Sto provando a sviluppare la mia prima app react-nativeAndroid
. Quando eseguoReact Native: target con stringa hash 'android-X' non trovata
sudo react-native run-android
ottengo il seguente errore
JS server already running.
Building and installing the app on the device (cd android && ./gradlew installDebug)...
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring project ':app'.
> failed to find target with hash string 'android-23' in: /usr/local/Cellar/android-sdk
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 4.981 secs
Could not install the app on the device, see the error above.
ho 24.3.3
sotto /usr/local/Cellar/android-sdk
con tutte le API-23 pacchetti installati
mio android/app/build.gradle
dice
compileSdkVersion 23
buildToolsVersion "23.0.0"
defaultConfig {
applicationId "com.awesomeandroid"
minSdkVersion 16
targetSdkVersion 23
versionCode 1
versionName "1.0"
ndk {
abiFilters "armeabi-v7a", "x86"
}
}
Quando provo $ANDROID_HOME
, si dice -bash: /usr/local/Cellar/android-sdk/24.3.3: is a directory
.
Ho anche aggiunto local.properties
sotto android/app/
e ha aggiunto sdk.dir=/usr/local/Cellar/android-sdk/24.3.3
mi sto perdendo qualcosa?
Potresti per favore approfondire come farlo? Sto avendo lo stesso identico problema e ho provato tutto senza successo. Si prega di dare un'occhiata al mio post [qui] (http://stackoverflow.com/questions/36778085/unable-to-build-react-native-app-on-android-device-failed-to-find-target-with -h) e aiuto se puoi. – Frosty619