In my app build.gradle I have this settings
buildscript {
dependencies {
classpath 'com.android.tools.build:gradle:3.1.3'
classpath 'com.google.gms:google-services:4.0.1'
}
repositories {
jcenter()
maven {
url "https://maven.google.com"
}
maven {
url 'https://jitpack.io'
}
maven {
url 'https://maven.google.com/'
name 'Google'
}
google()
}
}
ext {
supportlib_version = '26.0.2'
gps_version = '15.0.2'
}
And in my other gradle file I have integrated these libraries
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.devbrackets.android:exomedia:4.0.3'
//Radio
compile 'com.squareup.okhttp3:okhttp:3.3.1'
//WC
compile 'org.jsoup:jsoup:1.8.3'
compile 'com.onesignal:OneSignal:[3.6.0,4.0.0)'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.booking:rtlviewpager:1.0.1'
compile 'com.github.apg-mobile:android-round-textview:v0.0.3'
compile 'com.github.chrisbanes:PhotoView:1.3.0'
compile 'com.google.code.gson:gson:2.8.0'
//TV & Radio
compile "com.android.support:cardview-v7:$supportlib_version"
compile "com.android.support:appcompat-v7:$supportlib_version"
compile "com.android.support:recyclerview-v7:$supportlib_version"
compile "com.android.support:design:$supportlib_version"
compile "com.android.support:support-v4:$supportlib_version"
compile "com.android.support:support-core-utils:$supportlib_version"
compile "com.android.support:support-media-compat:$supportlib_version"
implementation 'com.google.firebase:firebase-messaging:15.0.2'
compile "com.google.android.gms:play-services-gcm:$gps_version"
compile "com.google.android.gms:play-services-ads:$gps_version"
}
Getting this error on build - Failed to resolve: com.google.android.gms:play-services-gcm:15.0.2
Install Repository and sync project
When I try to install its gives error that The repository could not be found
Please suggest what version should I use for proper build.
There is no 15.0.2 version of play-services-gcm now (see http://maven.google.com).
Also, your use of a $gps_version variable is now discouraged for this exact reason; Play services libraries will iterate at different release cycles with different versions. See the latest guidance: https://developers.google.com/android/guides/versioning#remove_old_anti_pattern
Related
While generating a signed apk I am experiencing this error:
Error:Execution failed for task ':app:transformClassesWithJarMergingForDebug'.
com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: android/support/v13/view/DragAndDropPermissionsCompat.class
One of the reference link said to update the dependencies so I did but still no help.
My gradle dependencies looks like:
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:multidex:1.0.1'
compile 'com.android.support:appcompat-v7:27.1.0'
compile 'com.android.support:design:27.1.0'
compile 'com.google.firebase:firebase-auth:11.6.0'
compile 'com.google.firebase:firebase-core:11.6.0'
compile 'com.google.android.gms:play-services-auth:11.6.0'
compile 'com.google.android.gms:play-services-places:11.6.0'
compile 'com.google.android.gms:play-services-ads:11.6.0'
compile 'com.google.android.gms:play-services-maps:11.6.0'
compile 'com.google.android.gms:play-services-location:11.6.0'
compile 'agency.tango.android:material-intro-screen:0.0.4'
compile 'com.android.support:recyclerview-v7:27.1.0'
compile 'com.android.support:cardview-v7:27.1.0'
compile 'com.facebook.android:facebook-android-sdk:[4,5)'
compile 'com.afollestad.material-dialogs:core:0.8.6.1'
compile 'com.afollestad.material-dialogs:commons:0.8.6.1'
compile 'com.tumblr:remember:1.0.0#aar'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.nineoldandroids:library:2.4.0'
compile 'com.daimajia.slider:library:1.1.5#aar'
compile 'com.wang.avi:library:2.1.3'
compile 'com.squareup.retrofit2:retrofit:2.1.0'
compile 'com.squareup.retrofit2:converter-gson:2.1.0'
compile 'com.makeramen:roundedimageview:2.2.1'
compile 'com.toptoche.searchablespinner:searchablespinnerlibrary:1.3.1'
compile 'com.wdullaer:materialdatetimepicker:3.5.1'
compile 'com.shawnlin:number-picker:2.4.5'
compile 'io.github.luizgrp.sectionedrecyclerviewadapter:sectionedrecyclerviewadapter:1.2.0'
compile 'com.kofigyan.stateprogressbar:stateprogressbar:0.0.8'
compile 'com.github.jhonnyx2012:horizontal-picker:1.0.6'
compile 'com.zhihu.android:matisse:0.4.3'
compile 'uk.co.chrisjenx:calligraphy:2.2.0'
//debugCompile 'com.squareup.okhttp3:logging-interceptor:3.3.1'
testCompile 'junit:junit:4.12'
compile("com.github.hotchemi:permissionsdispatcher:3.2.0") {
// if you don't use android.app.Fragment you can exclude support for them
exclude module: "support-v13"
}
annotationProcessor "com.github.hotchemi:permissionsdispatcher-processor:3.2.0"
}
and at my project level gradle I am doing this:
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.3'
classpath 'com.google.gms:google-services:3.1.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
mavenCentral()
jcenter()
maven {
url "https://jitpack.io"
}
maven { url "https://maven.google.com" }
}
}
I did not find any help on internet other than this link but still no progress.
This answer solved it. And this article helped to resolve the error.
Update your project level build.gralde to use newer gradle tools:
classpath 'com.android.tools.build:gradle:3.1.2' // or even newer
and remove this:
classpath 'com.google.gms:google-services:3.1.0'
lastly update your buildToolsVersion to 26.0.3
exit Android studio, clean, rebuild :)
Im trying to use GoogleSignIn for an app but I cant resolve this issue. I read that to use GoogleSignIn class you should use the e 'com.google.android.gms:play-services-auth:11.6.0' version so I updated my gradle to this:
dependencies {
implementation 'com.google.firebase:firebase-messaging:10.2.6'
compile fileTree(include: ['*.jar'], dir: 'libs')
testCompile 'junit:junit:4.12'
compile 'com.crystal:crystalrangeseekbar:1.0.0'
compile 'com.mikhaellopez:circularimageview:3.0.2'
compile 'com.estimote:sdk:0.11.0#aar'
compile 'com.google.code.gson:gson:2.7'
compile 'com.facebook.android:facebook-android-sdk:4.23.0'
compile 'com.google.android.gms:play-services-maps:11.6.0'
compile 'com.google.android.gms:play-services-location:11.6.0'
compile 'com.google.android.gms:play-services-auth:11.6.0'
compile 'com.android.support:design:25.3.1'
compile 'com.android.support:support-v4:25.3.1'
compile 'com.android.support:appcompat-v7:25.3.1'
compile 'com.android.support:cardview-v7:25.3.1'
compile 'com.android.support:recyclerview-v7:25.3.1'
compile 'com.google.firebase:firebase-messaging:11.6.0'
compile 'com.gtomato.android.library:carouselview:2.0.1'
compile 'com.loopj.android:android-async-http:1.4.9'
compile 'com.squareup.okhttp3:okhttp:3.8.1'
compile 'com.google.gms:google-services:3.2.0'
compile "org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version"
implementation 'com.github.bumptech.glide:glide:4.0.0-RC1'
implementation 'com.jakewharton:butterknife:8.8.1'
annotationProcessor 'com.github.bumptech.glide:compiler:4.0.0-RC1'
}
But I have the same mistake over and over again. Any idea about how to solve it? Also I have this btw.
buildscript {
ext.kotlin_version = '1.1.51'
repositories {
google()
jcenter()
maven {
url 'https://maven.google.com'
}
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
classpath 'com.google.gms:google-services:3.2.0'
}}
The message:
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 11.6.0.
You should use the same version for the google play service libraries and firebase libraries.
Change:
implementation 'com.google.firebase:firebase-messaging:10.2.6'
with
implementation 'com.google.firebase:firebase-messaging:11.6.0'
Im new for android, I want to add payment option in my app. So, I used instamojo. Im include instamojo library in gradle file. But gradle file throw error.
Error:
Error:Failed to resolve: in.juspay:godel:0.6.11.0823
My gradle file:
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:support-v4:23.2.0'
compile 'de.hdodenhof:circleimageview:1.2.1'
compile 'com.android.support:appcompat-v7:23.2.0'
compile 'com.android.support:recyclerview-v7:23.2.0'
compile 'com.loopj.android:android-async-http:1.4.7'
compile 'org.apache.httpcomponents:httpclient-android:4.3.5.1'
compile('com.googlecode.json-simple:json-simple:1.1.1') {
exclude group: 'org.hamcrest', module: 'hamcrest-core'
}
compile 'com.android.support:multidex:1.0.0'
compile 'com.amulyakhare:com.amulyakhare.textdrawable:1.0.1'
compile 'com.android.support:design:23.1.1'
compile 'com.google.gms:google-services:3.0.0'
compile 'com.google.android.gms:play-services-gcm:8.4.0'
compile 'com.google.android.gms:play-services-location:8.4.0'
compile 'com.instamojo:android-sdk:1.2.4'
}
If i run the instamojo sdk in separate application means working perfectly.If i integrate with my app means getting above gradle error.
Please, anyone help to resolve.
Thanks in advance.
Error:Failed to resolve: in.juspay:godel:0.6.11.0823
From here or here
You should have an allprojects block, that contains some lines like this
// Add to build.gradle
repositories {
jcenter() // <-- should already be there
mavenCentral()
maven {
url "https://s3-ap-southeast-1.amazonaws.com/godel-release/godel/"
}
}
And in app/build.gradle
dependencies {
// compile 'in.juspay:godel:0.6.12.0823' // maybe need this?
compile 'com.instamojo:android-sdk:1.2.4'
// your other dependencies
...
...
}
Also, this line needs not to be there. compile 'com.google.gms:google-services:3.0.0' It should be in the classpath of the buildscript dependencies block.
And 'com.android.support:design:23.1.1' should use 23.2.0 to match the other Android support versions.
Regarding "Manifest merger failed", you can search to find something similar, and start with removing this line, because it's redundant with the other dependencies.
compile 'com.android.support:support-v4:23.2.0'
// Add to build.gradle
repositories {
jcenter() // <-- should already be there
mavenCentral()
maven {
url "https://s3-ap-southeast-1.amazonaws.com/godel-release/godel/"
}
}
then add this in your manifest file
<meta-data android:name="instamojo.orderauth.url"
android:value="ur website name/access_token.php"
/>
I'm working in an Android App and a few days ago I updated my Kotlin version from 1.0.0-beta-1103 to the release candidate 1.0.0-rc-1036 and now I can't run my app for something related to Kotlin Android Extensions.
I use the apply plugin: 'kotlin-android-extensions' just like the official blog says http://blog.jetbrains.com/kotlin/2016/02/kotlin-1-0-release-candidate-is-out/ but my app doesn't recognize any view from any layout.
This is what appears on the console:
Error:(20, 8) Unresolved reference: kotlinx
Error:Execution failed for task ':app:compileDebugKotlin'.
Compilation error. See log for more details
Please help me, I'm losing my mind!
Update:
This is my buildScript in globalbuild.gradle
buildscript {
ext {
kotlin_version = "1.0.0-rc-1036"
}
repositories {
jcenter()
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
classpath 'com.android.tools.build:gradle:1.5.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
// The Fabric Gradle plugin uses an open ended version to react
// quickly to Android tooling updates
classpath 'io.fabric.tools:gradle:1.+'
}
}
The dependencies listed in the app build.gradle
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
// Google
compile 'com.android.support:appcompat-v7:23.1.0'
compile 'com.android.support:cardview-v7:23.1.0'
compile 'com.android.support:design:23.1.0'
compile 'com.android.support:recyclerview-v7:23.1.0'
// Kotlin
compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
// Square
compile 'com.squareup.okio:okio:1.5.0'
compile 'com.squareup.retrofit:retrofit:1.9.0'
compile 'com.squareup.okhttp:okhttp-urlconnection:2.0.0'
compile 'com.squareup.okhttp:okhttp:2.0.0'
compile 'com.squareup.picasso:picasso:2.5.2'
// ReactiveX
compile 'io.reactivex:rxjava:1.0.14'
compile 'io.reactivex:rxandroid:1.0.1'
compile 'com.jakewharton.rxbinding:rxbinding:0.3.0'
compile 'com.jakewharton.rxbinding:rxbinding-support-v4:0.2.0'
// DBFlow
kapt 'com.raizlabs.android:DBFlow-Compiler:2.2.1'
compile "com.raizlabs.android:DBFlow-Core:2.2.1"
compile "com.raizlabs.android:DBFlow:2.2.1"
// Otros
compile 'de.hdodenhof:circleimageview:1.3.0'
// SQLite Assets Helper
compile 'com.readystatesoftware.sqliteasset:sqliteassethelper:2.0.1'
// Crashlytics Kit
compile('com.crashlytics.sdk.android:crashlytics:2.5.2#aar') {
transitive = true
}
}
This is an import that I'm using:
import kotlinx.android.synthetic.main.activity_all_quizzes.*
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
should be defined in the project-local build.gradle file for now.
Your kotlin stdlib compile dependency should (at least while not stable) be the same as the kotlin android studio plugin version
...
compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
...
buildscript {
ext.kotlin_version = '1.0.0-rc-1036'
...
I think I'm stupid or I'm missing something -hope the latter- but I can't properly import a dependency.
I have the repository in ~/.m2/repository and inside the directory I can see the deploy.
The maven setting.xml has the
<localRepository>${user.home}/.m2/repository</localRepository>
Here is the gradle file:
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile project(':lib_facebook')
compile project(':lib_dslrdashboard')
apt "org.androidannotations:androidannotations:3.2"
compile 'org.androidannotations:androidannotations-api:3.2'
compile 'de.livereach:rpc-objects-android:1.0.0'//THIS IS THE LOCAL DEPENDENCY
compile 'com.android.support:appcompat-v7:22.0.0'
compile 'org.slf4j:slf4j-android:1.6.1-RC1'
compile 'org.springframework.android:spring-android-rest-template:1.0.1.RELEASE'
compile 'com.fasterxml.jackson.core:jackson-databind:2.3.2'
compile 'de.keyboardsurfer.android.widget:crouton:1.8.5#aar'
compile 'com.nostra13.universalimageloader:universal-image-loader:1.9.3'
compile 'com.github.castorflex.smoothprogressbar:library:1.1.0'
compile('com.crashlytics.sdk.android:crashlytics:2.2.3#aar') {
transitive = true;
}
compile('com.twitter.sdk.android:twitter:1.4.0#aar') {
transitive = true;
}
}
I'm on Mac OSx 10.10
Thanks in advance!
Gradle doesn't look at your Maven local repository by default. You need to explicitly ask it to:
allprojects {
repositories {
jcenter()
mavenLocal() // add this line
}
}
Gradle DSL Docs for mavenLocal(): docs.gradle.org/…