Réagir Natif : la cible avec chaîne de hash 'android-X' ne trouve pas

Je suis en train de développer mon premier réagir indigènes Android app. Quand je lance

sudo react-native run-android

J'obtiens l'erreur suivante

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.

J'ai 24.3.3 sous /usr/local/Cellar/android-sdk avec toutes les API-23 packages installés

Réagir Natif : la cible avec chaîne de hash 'android-X' ne trouve pas

Mon android/app/build.gradle dit

compileSdkVersion 23
buildToolsVersion "23.0.0"

defaultConfig {
    applicationId "com.awesomeandroid"
    minSdkVersion 16
    targetSdkVersion 23
    versionCode 1
    versionName "1.0"
    ndk {
        abiFilters "armeabi-v7a", "x86"
    }
}

Quand j'essaie $ANDROID_HOME, il dit -bash: /usr/local/Cellar/android-sdk/24.3.3: is a directory.

J'ai également ajouté local.properties sous android/app/ et a ajouté sdk.dir=/usr/local/Cellar/android-sdk/24.3.3

Suis-je raté quelque chose?

  • Pourriez-vous nous dire comment faire cela? Je suis d'avoir exactement le même problème et qui ont tout essayé, sans succès. Veuillez jeter un oeil à mon post here et si vous le pouvez.
InformationsquelleAutor Jaseem Abbas | 2015-09-23