Issue
Here is my build.gradle file:
// 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:1.0.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
}
}
I am trying to run a sample app but when I click on run I am getting errors:
/home/admin/AndroidStudioProjects/MyApplication/app/build/intermediates/exploded-aar/com.android.support/appcompat-v7/21.0.3/res/values-v14/values.xml
Error:(6, 21) No resource found that matches the given name: attr 'android:actionModeCopyDrawable'.
Error:(5, 21) No resource found that matches the given name: attr 'android:actionModeCutDrawable'.
Error:(7, 21) No resource found that matches the given name: attr 'android:actionModePasteDrawable'.
Error:(8, 21) No resource found that matches the given name: attr 'android:actionModeSelectAllDrawable'.
/home/admin/AndroidStudioProjects/MyApplication/app/build/intermediates/exploded-aar/com.android.support/appcompat-v7/21.0.3/res/values-v11/values.xml
similarly 175 total errors. Why I am getting this error. How to resolve it?
I followed this but since my build.gradle does't include android so I can't follow the steps.
Solution
A native Android Studio project will put your application code in an app
module (a.k.a., sub-project). To make that work, there are two build.gradle
files:
The one in the project root directory, which contains the sort of thing you see in the question. You will need to modify this file when you want to upgrade your Gradle for Android plugin (
com.android.tools.build:gradle:1.0.0
) to a newer version. If you elect to add other modules, you can use this top-levelbuild.gradle
file for setting up things that are in common across all your modules.The one in the
app
module directory, which contains the configuration details for building that specific module. For simple one-module Android Studio projects, most of yourbuild.gradle
work will be in thisbuild.gradle
file, not the top-level one.
Answered By - CommonsWare
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.