android - The project 'My Application' may be using a version of Gradle that does not contain the method -
i use android studio 2.1.1 . follow tutorial: http://www.androidhive.info/2016/05/android-working-with-card-view-and-recycler-view/
this file build.gradle
:
// top-level build file can add configuration options common sub-projects/modules. buildscript { repositories { jcenter() } dependencies { classpath 'com.android.tools.build:gradle:2.1.0' compile 'com.android.support:cardview-v7:23.3.+' // note: not place application dependencies here; belong // in individual module build.gradle files } } allprojects { repositories { jcenter() } } task clean(type: delete) { delete rootproject.builddir }
then android studio notice:
the project 'my application' may using version of gradle not contain method
i can't build project. me resolve problem.
remove line:
compile 'com.android.support:cardview-v7:23.3.+'
from project level build.gradle
file , paste in application level build.gradle
file.
your application level build.gradle
file should like:
apply plugin: 'com.android.application' android { //... } dependencies { compile 'com.android.support:cardview-v7:23.3.0' compile 'com.android.support:recyclerview-v7:23.3.0' //... }
Comments
Post a Comment