2
私はAndroidスタジオ2.1.1を使用しています。 http://www.androidhive.info/2016/05/android-working-with-card-view-and-recycler-view/「My Application」プロジェクトは、メソッドが含まれていないバージョンのGradleを使用している可能性があります。
これはファイルbuild.gradle
です:私はこのチュートリアルに従う
// Top-level build file where you can add configuration options common to all 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: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
その後のAndroidスタジオ予告:
プロジェクト 'マイアプリケーション' がないことのGradleのバージョンを使用することができます方法が含まれています
プロジェクトをビルドできません。私は問題を解決するのに役立ちます。プロジェクトレベルbuild.gradle
ファイルから
compile 'com.android.support:cardview-v7:23.3.+'
し、アプリケーションレベルbuild.gradle
ファイルに貼り付けます。
ポストモジュール 'ここbuild.gradle'ファイル:
アプリケーションレベル
build.gradle
ファイルは次のようになります。 – Ironman