React Native : target with hash string 'android-X' not found

前端 未结 8 1551
[愿得一人]
[愿得一人] 2021-02-01 14:56

I am trying to develop my first react-native Android app. When I run

sudo react-native run-android

I get the following error

相关标签:
8条回答
  • 2021-02-01 15:26

    What I did was to change the target my application was compiled against. To do this edit the file android/app/build.gradle on your project and modify the following:

    compileSdkVersion 24
    buildToolsVersion "24.0.2"
    

    This should match whatever you have installed without requiring to download another API version.

    0 讨论(0)
  • 2021-02-01 15:28

    I followed the React Native Getting Started instructions and my ANDROID_HOME and PATH was right but I was still getting this error.

    The solution was to install "Android 6.0 (Marshmallow)" from this screen (without clicking "Show Package Details"):

    0 讨论(0)
提交回复
热议问题