Android studio开发中遇到的一些异常

1、Gradle: A problem occurred configuring project

Weird error message:

?View Code ERROR
1
2
3
4
5
6
Gradle: A problem occurred configuring project ':App'.
> Failed to notify project evaluation listener.
   > Could not resolve all dependencies for configuration ':App:_DefaultFlavorDebugCompile'.
      > Could not find any version that matches com.android.support:appcompat-v7:+.
        Required by:
            MyApplication:App:unspecified

If this happens, just go to Tools -> Android -> Android SDK Manager, then check “Android Support Repository” and “Android Support Library” under “Extra” and install them. That should take care of the error.


2、Warning:Gradle version 2.10 is required. Current version is 2.8. If using the gradle wrapper, try editing the distributionUrl in C:\Users\blahblah\myproject\gradle\wrapper\gradle-wrapper.properties to gradle-2.10-all.zip


  1. Go "File" and click "Project structure".

  2. Then select "Project" from left menu and then change "Gradle version" to the version your sdk manager has installed. In my case it is 2.10 so i change version to 2.10 and then click on "Ok". And then android studio automatically do gradle sync again and error was fixed.



你可能感兴趣的:(Android,studio)