问题1:
A problem occurred configuring root project 'sxtbdemo2'. Could not resolve all files for configuration ':classpath'. Could not find com.android.tools.build:gradle:3.0.1. Searched in the following locations: https://jcenter.bintray.com/com/android/tools/build/gradle/3.0.1/gradle-3.0.1.pom https://jcenter.bintray.com/com/android/tools/build/gradle/3.0.1/gradle-3.0.1.jar Required by: project : Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Get more help at https://help.gradle.org
解决方案:
// 更改android/build.gradle buildscript { repositories { mavenLocal() // new add google() // new add jcenter() } dependencies { classpath 'com.android.tools.build:gradle:3.0.1' } }
问题二:
Error:The SDK directory '/Users/AhmadMusa/Desktop/[PROJECT PATH]/D:\Android\sdk' does not exist. Please fix the 'sdk.dir' property in the local.properties file.
解决方案:
Just open your local.property file if your project is used in mac before, so the sdk path will be something likesdk.dir=/Users/siddharthyadav/Library/Android/ Now if you are trying to use that in windows so just edit and put your sdk location: Example:sdk.dir=D:\software\android-sdk\android-sdk