According to the manual https://developer.android.com/training/material/lists-cards.html?hl=en
For the material cards to work, you must install the dependency in build.gradle. After adding dependencies, this file began to look like this:
// 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.0' // 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 } However, when compiled, it gives an error
Could not find method compile() for arguments [com.android.support:cardview-v7:23.3.0] on org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler_Decorated@6169f20c. How to solve this problem?
