I upgraded to Android Studio 2.0 and for some reason cannot resolve this issue
Error:Could not find com.android.support:appcompat-v7:23.3.0.
Required by:
Code:app:unspecified
Please install the Android Support Repository from the Android SDK Manager.
Open Android SDK Manager
I have the latest version of the support library as well as previous versions, I have deleted the build folder and rebuilt without success. Here is my complete build.gradle
apply plugin: 'com.android.application'
apply plugin: 'com.neenbedankt.android-apt'
android {
compileSdkVersion 23
buildToolsVersion '23.0.3'
defaultConfig {
applicationId "com.domain.appname"
minSdkVersion 16
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
apt 'com.google.dagger:dagger-compiler:2.2'
provided 'javax.annotation:jsr250-api:1.0'
testCompile 'junit:junit:4.12'
compile 'com.google.dagger:dagger:2.2'
compile 'com.google.code.gson:gson:2.6.2'
compile 'com.jakewharton:butterknife:7.0.1'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'de.hdodenhof:circleimageview:1.3.0'
compile 'com.squareup:otto:1.3.8'
compile 'com.android.support:support-annotations:23.3.0'
compile 'com.android.support:appcompat-v7:23.3.0'
}
And here is the SDK Tools installed
Gradle Version: 2.11
ANdrud Plugin Version: 2.0.0
How can I resolve com.android.support:appcompat-v7:23.3.0. ?
Edit
Project build.gradel
// 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.0.0'
classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8'
// 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
}
Related
i know the title of this error may seem familiar , but beilive me I have done every thing to solve the problem , but I failed every time! so please help me!
i dowloaded a code for and online shop app , i tried to run it in android studio but following error has occurred:
Error:Failed to find Build Tools revision 26.0.2
"install.build.tools">Install Build Tools 26.0.2 and sync project
now here is what i did :
at first i was using android studio v 2.3
i checked sdk manager and every thing was installed ,
to resolve the problem i tried updating it to latest version (v 3.0.1)
and I manually instaled sdk 26 and tools_26.0.2
but error wouldnt go away!! :((
here is the code for my build.gradle for a closer look :
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
buildToolsVersion "26.0.2"
defaultConfig {
applicationId "ir.tameshki.zanbil"
minSdkVersion 14
targetSdkVersion 26
versionCode 2
versionName "1.1.1"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'),
'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2',
{
exclude group: 'com.android.support', module: 'support-annotations'
})
testCompile 'junit:junit:4.12'
// library for user interface
compile 'com.android.support:appcompat-v7:26.0.2'
compile 'com.android.support:cardview-v7:26.0.2'
compile 'com.android.support:recyclerview-v7:26.0.2'
compile 'com.android.support:design:26.0.2'
compile 'com.android.support:support-v4:26.0.2'
compile 'com.balysv:material-ripple:1.0.2'
// library for api
compile 'com.squareup.retrofit2:retrofit:2.1.0'
compile 'com.squareup.okhttp3:logging-interceptor:3.3.1'
compile 'com.squareup.retrofit2:converter-gson:2.1.0'
compile 'com.google.code.gson:gson:2.4'
// glide image loader
compile 'com.github.bumptech.glide:glide:3.7.0'
// firebase notification library
compile 'com.google.firebase:firebase-messaging:9.2.1'
// firebase ads library
compile 'com.google.firebase:firebase-ads:9.2.1'
compile 'uk.co.chrisjenx:calligraphy:2.3.0'
}
apply plugin: 'com.google.gms.google-services'
and my other gradle file :
// Top-level build file where you can add configuration options common to
all sub-projects/modules.
buildscript {
repositories {
jcenter()
maven { url "https://jitpack.io" }
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.1'
classpath 'com.google.gms:google-services:3.0.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
jcenter()
maven { url "https://jitpack.io" }
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
I am using Android Studio 2.3 on a mac mini.
I began by opening a fresh project.
MainActivity is a loadingScreen
connect project to firebase using Firebase Assistant
Write to firebase
Everything works up to here.
Then I attempt to add a GoogleMaps Activity and the project no longer compiles. The error I am being shown is:
Error:Execution failed for task ':app:processDebugGoogleServices'.
Please fix the version conflict either by updating the version of the google-services plugin (information about the latest version is available at https://bintray.com/android/android-tools/com.google.gms.google-services/) or updating the version of com.google.android.gms to 10.0.1.
app build.gradle
apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion "25.0.0"
defaultConfig {
applicationId "us.n_e_ar.akita"
minSdkVersion 14
targetSdkVersion 25
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:25.3.0'
compile 'com.android.support.constraint:constraint-layout:1.0.0-alpha8'
compile 'com.google.firebase:firebase-database:10.0.1'
compile 'com.google.android.gms:play-services-maps:10.2.1'
testCompile 'junit:junit:4.12'
}
apply plugin: 'com.google.gms.google-services'
And here is the other 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:2.3.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
classpath 'com.google.gms:google-services:3.0.0'
}
}
allprojects {
repositories {
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
Thank you in advance.
The versions of the Firebase and Google Play Services libraries must be identical. You can either downgrade to 10.0.1:
compile 'com.google.firebase:firebase-database:10.0.1'
compile 'com.google.android.gms:play-services-maps:10.0.1'
or upgrade to 10.2.1:
compile 'com.google.firebase:firebase-database:10.2.1'
compile 'com.google.android.gms:play-services-maps:10.2.1'
While you updating, it's probably wise to use the latest constraint layout lib:
compile 'com.android.support.constraint:constraint-layout:1.0.2'
I tried to add the following library as a dependency in my android project:
compile 'com.thehayro:infiniteviewpager:0.4'
which gives me the following gradle error when I build:
A problem occurred configuring project ':app'.
> Could not resolve all dependencies for configuration ':app:_debugCompile'.
> Could not find com.google.android:support-v4:r13.
Searched in the following locations:
https://jcenter.bintray.com/com/google/android/support-v4/r13/support-v4-r13.pom
https://jcenter.bintray.com/com/google/android/support-v4/r13/support-v4-r13.jar
https://repo1.maven.org/maven2/com/google/android/support-v4/r13/support-v4-r13.pom
https://repo1.maven.org/maven2/com/google/android/support-v4/r13/support-v4-r13.jar
file:/C:/Users/Henrykvdb/AppData/Local/Android/android-sdk/extras/android/m2repository/com/google/android/support-v4/r13/support-v4-r13.pom
file:/C:/Users/Henrykvdb/AppData/Local/Android/android-sdk/extras/android/m2repository/com/google/android/support-v4/r13/support-v4-r13.jar
file:/C:/Users/Henrykvdb/AppData/Local/Android/android-sdk/extras/google/m2repository/com/google/android/support-v4/r13/support-v4-r13.pom
file:/C:/Users/Henrykvdb/AppData/Local/Android/android-sdk/extras/google/m2repository/com/google/android/support-v4/r13/support-v4-r13.jar
Required by:
xkcdexplain:app:unspecified
xkcdexplain:app:unspecified > com.thehayro:infiniteviewpager:0.4
I tried manually adding the android support library and installing it with the android sdk manager but neither of those things worked.
I also read somewhere that I could try to find a download for the library and manually add it but there must be a more elegant way then that.
build.gradle
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "25.0.0"
defaultConfig {
applicationId "com.henrykvdb.xkcdexplain"
minSdkVersion 21
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.4.0'
compile 'com.android.support:design:23.4.0'
compile 'org.jsoup:jsoup:1.10.1'
compile 'com.google.code.gson:gson:2.7'
compile 'com.thehayro:infiniteviewpager:0.4'
}
global/top-level build.gradle
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
mavenCentral()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.0.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
mavenCentral()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
I am trying to use facebook SDK in my android apps, and I am starting to add maven central repository to my build.gardle. Although, I've found 2 build.gardle which belong to project and app. Here they are;
Android Studio: 1.5.1
Gradle Version: 2.8
Android Plugin Version: 1.5.0
Build.gardle (Project)
buildscript {
repositories {
jcenter()
mavencentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.5.0'
compile 'com.facebook.android:facebook-android-sdk:[4,5)'
}
}
allprojects {
repositories {
jcenter()
mavencentral()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
Build.gardle(app)
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.2"
defaultConfig {
applicationId "com.example.test"
minSdkVersion 15
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.2.0'
compile 'com.android.support:design:23.2.0'
}
Yet I get this following error during build;
Gradle DSL method not found: mavencentral()
I have tried;
Checking both gardle files
Removing android compile dependencies that's actually should be there
Checking android packagingOptions.exclude
Checking if there's android method in the gardle
And, I haven't tried to update my gardle or android studio, but I am just wondering whether it's really needed or I am doing something wrong with my build.gardle.
Any suggestion is appreciated. Thank you.
The Facebook SDK page is clear. Add into your project/build.gradle
repositories {
mavenCentral() //note the uppercase C
}
and into your project/app/build.gradle
dependencies {
compile 'com.facebook.android:facebook-android-sdk:4.+'
}
I am working with Android Annotations and today I did the new update for Android Studio 1.0.
When I build the project it gave me this error:
Error:(40, 0) Could not find property 'processResources' on com.android.build.gradle.internal.api.ApplicationVariantImpl_Decorated#54335f5.
Here is my build.gradle file for my project:
// 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'
// the latest version of the android-apt plugin https://bitbucket.org/hvisser/android-apt
// http://stackoverflow.com/a/25939518
classpath 'com.neenbedankt.gradle.plugins:android-apt:1.4'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
}
}
and this is the build.gradle file for my application:
apply plugin: 'com.android.application'
apply plugin: 'com.neenbedankt.android-apt'
// duhet per te shtuar librarine e android annotations ne ccompile time http://joostfunkekupper.com/useful-android-libraries/
// https://github.com/excilys/androidannotations/wiki/IntelliJIDEA
android {
compileSdkVersion 21
buildToolsVersion '21.1.1'
defaultConfig {
applicationId "<my package>"
minSdkVersion 14
targetSdkVersion 21
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
productFlavors {
}
}
// https://github.com/excilys/androidannotations/wiki/FAQ
// https://github.com/DayS/androidannotations/wiki/Building-Project-Gradle
//https://bitbucket.org/hvisser/android-apt
apt {// http://stackoverflow.com/a/26284580
arguments {
androidManifestFile variant.processResources.manifestFile
// This should of course be your own package name
resourcePackageName '<my package>'
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.actionbarsherlock:actionbarsherlock:4.4.0#aar'
compile project(':FreeFlow')
compile 'com.nostra13.universalimageloader:universal-image-loader:1.9.3'
compile 'com.squareup.retrofit:retrofit:1.7.0'
compile project(':library')
compile project(':facebook')
compile project(':viewPagerIndicatorLibrary')
compile 'com.google.code.gson:gson:2.3'
compile 'com.android.support:support-v4:21.0.0'
compile 'com.neenbedankt.gradle.plugins:android-apt:1.4'
apt 'org.androidannotations:androidannotations:3.2'
compile 'org.androidannotations:androidannotations-api:3.2'
compile 'com.squareup:otto:1.3.5'
compile 'com.paymill.android:android-sdk:1.2.0'
}
Line 40 where the error happens is in second build.gradle:
androidManifestFile variant.processResources.manifestFile
Has anyone encountered this problem because I couldn't find any solution for this problem
Thanks
There are some changes to apply with the new version of Android Studio.
See this wiki page to get an example of the build.gradle.
Pay attention to this line :
androidManifestFile variant.outputs[0].processResources.manifestFile