This is not really a huge issue, as my project still builds and runs correctly (using gradle), but I\'m having trouble getting Android Studio to recognize the application co
I changed from:
classpath 'com.android.tools.build:gradle:+'
to:
classpath 'com.android.tools.build:gradle:2.2.3'
and now it's working!
I know i replied late, but this answer might help futures visitors.
Change from Gradle 0.12.+
to 0.12.1
and it will works.
classpath 'com.android.tools.build:gradle:0.12.1'
Don't add the library to the Java Build Path, add the library (as a project) in Settings>Android>Libraries>Add Library.
I had this same issue. Sounds like you have the V7 jar file compiling fine but you are probably missing the xml resource needed.You need to manually include the 'Theme.xml' provided with the V7 package. Here is what I did to fix it.
Look under:Adding libraries with resources http://developer.android.com/tools/support-library/setup.html
The directions provided here aren't very clear because it doesn't tell you to bring any resources in. (maybe a bug in Android Studio?)
Here is what I did:
..\sdk\extras\android\support\v7\appcompat\res\values
on Windows). Somewhere in there is a "themes.xml" and "themes_base.xml'. Copy both of these files.A common problem. In my case this works:
In "android-support-v7-appcompat" project:
-Delete “android-support-v7-appcompat” from Package explorer.
-Import again and check “Copy into workspace”
-In Properties -> Android -> in Project build target, uncheck Android 2.2 and check Android 4.1.2
-In Java build path, uncheck if you have any .jar library, and uncheck the Dependences
In other hand, the proyect that uses “android-support-v7-appcompat”
in Propiedades -> Android add the library, but uncheck "IsLibrary”.
-In Android -> Project build tarjet check Android 4.0.
-In "Java Build Path" -> Order and Export -> Unchecked the .jar library
-Finally do a “Project -> Clean” both projects
Downgrading build:gradle
version 2.3.3 to 2.2.3 worked after struggling for hours!
classpath 'com.android.tools.build:gradle:2.2.3'
gradle-wrapper.properties:
distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip