Getting error when trying to run new project in Android Studio 2.2.1

Check your android build tools dependencies. In your build.gradle if its something like:

classpath "com.android.tools.build:gradle:+"

It has likely downloaded the alpha of 2.2 and that can cause the error you are seeing.

Try

classpath "com.android.tools.build:gradle:2.1.0"

If you are already using the right build tools version but keep getting this error, maybe one of the third party Android libraries you are using is causing the problem due to the same reason. You can force the dependency version to be used (including transitive) by changing

classpath "com.android.tools.build:gradle:2.1.0"

to

classpath('com.android.tools.build:gradle:2.1.0') {
        force = true
    }

Documentation: gist and official gradle docs.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)