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

前端 未结 6 940
孤街浪徒
孤街浪徒 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 00:59

    this because your classpath build tools in build.gradle root project is deprecated update like this for new android studio 3.1.2

    buildscript {
        repositories {
            jcenter()
        }
        dependencies {
            classpath 'com.android.tools.build:gradle:3.1.2'
        }
    }
    

    and after that update your minimum sdk and build tools to latest and no problem again

提交回复
热议问题