Reputation: 1703
How can I resolve this problem?
At first the problem was, I would like to use ActivityCompat class for ask permission. After it shown me the AdroidStudio, the class cannot be resolved to a type but, the Support Repository already installed...
I upgraded the AndroidStudio to 2.3 from 2.2 after show me: Error:(8, 0) Gradle DSL method not found: 'compile()' Currently here are the possible solutions by Android Studio:
What is the right solution for this? I tried each but not resolve the problem.
Here is the dependencies of build.gradle:
dependencies {
classpath 'com.android.tools.build:gradle:2.3.0'
compile "com.android.support:support-core-utils:25.2.0"
}
Upvotes: 1
Views: 5174
Reputation: 1006554
Move compile "com.android.support:support-core-utils:25.2.0"
out of your top-level build.gradle
file and into the module's build.gradle
file (e.g., app/build.gradle
) and its dependencies
closure.
Upvotes: 1