Error: Could not initialize class com.android.sdklib.repository.AndroidSdkHandler

前端 未结 6 934
孤街浪徒
孤街浪徒 2020-12-14 00:13

I\'ve setup the environment for react native on Windows. But when I run the command

react-native run-android

I get the following errors -<

6条回答
  •  离开以前
    2020-12-14 01:09

    Fixed the error by adding the following in .bash_profile

     export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_171.jdk/Contents/Home
    export PATH=$PATH:$JAVA_HOME/bin
    export ANDROID_HOME=/Users/saif-ams/MyFiles/applications/androidsdk
    export PATH=$PATH:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools
    

提交回复
热议问题