i had a problem in my gradelle with response Unable to resolve dependency for ':app#debug/compileClasspath': Could not resolve com.mindorks:placeholderview:0.7.1.
i try like
a. settings > build exception deployment > gradle > uncheck offline work it's failed
b. clean and reburd it's failed
c. invalidate and restart failed
apply plugin: 'com.android.application'
android {
compileSdkVersion 27
buildToolsVersion '26.0.2'
useLibrary 'org.apache.http.legacy'
defaultConfig {
applicationId "sid.len.mobile"
minSdkVersion 21
targetSdkVersion 27
versionCode 1
versionName "1.0"
multiDexEnabled true
}
packagingOptions {
pickFirst 'META-INF/LICENSE.txt' // picks the JavaMail license file
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
repositories {
jcenter()
maven {
url "https://maven.java.net/content/groups/public/"
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
implementation 'com.android.support:appcompat-v7:27.0.0'
implementation 'com.android.support:gridlayout-v7:27.0.0'
compile 'com.android.support:support-annotations:27.0.0'
implementation 'com.android.support:recyclerview-v7:27.0.0'
compile 'com.android.support:design:27.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
compile 'com.android.support:multidex:1.0.3'
implementation 'com.jakewharton:butterknife:8.8.1'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'
compile 'com.google.code.gson:gson:2.6.2'
compile 'com.google.android.gms:play-services-location:11.0.1'
compile 'com.google.android.gms:play-services-maps:11.0.1'
compile 'com.google.android.gms:play-services-safetynet:11.0.1'
compile 'com.google.android.gms:play-services-base:11.0.1'
compile 'com.google.android.gms:play-services-basement:11.0.1'
compile 'com.google.android.gms:play-services-tasks:11.0.1'
compile 'net.zetetic:android-database-sqlcipher:3.4.0#aar'
compile 'com.squareup.okhttp3:logging-interceptor:3.4.0'
compile 'com.squareup.retrofit2:retrofit:2.1.0'
compile 'com.squareup.retrofit2:converter-gson:2.1.0'
compile 'com.squareup:otto:1.3.8'
//noinspection OutdatedLibrary
compile 'com.android.volley:volley:1.1.0'
compile files('libs/jtds-1.3.1.jar')
testCompile 'junit:junit:4.12'
compile 'com.mindorks:placeholderview:0.7.1'
}
you need to add this repository:
allprojects {
repositories {
maven { url 'https://jitpack.io' }
}
}
while that build.gradle seems to have more than one problem, including duplicate *.jar references and a few outdated libraries (in case you may wonder why it still won't build).
at least use buildToolsVersion "27.0.3".
Related
As soon as I add
compile 'com.google.android.libraries.places:places:1.0.0'
It starts giving me error
Cause: duplicate entry: com/bumptech/glide/GeneratedAppGlideModule.class
My build.gradle code is
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
buildToolsVersion "26.0.0"
defaultConfig {
applicationId "com.videep.carpool"
minSdkVersion 16
targetSdkVersion 26
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
multiDexEnabled true
configurations.all {
resolutionStrategy.force 'com.google.code.findbugs:jsr305:1.3.9'
}
}
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'
})
//noinspection GradleCompatible
compile 'com.android.support:appcompat-v7:25.3.1'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.google.firebase:firebase-core:11.0.4'
compile 'com.google.firebase:firebase-database:11.0.4'
compile 'com.google.firebase:firebase-auth:11.0.4'
compile 'com.google.firebase:firebase-storage:11.0.4'
compile 'com.firebase:geofire-android:2.1.1'
compile 'com.google.android.gms:play-services:11.0.4'
compile 'com.github.bumptech.glide:glide:4.3.1'
compile 'com.android.support:design:26.1.0'
compile 'com.android.support:cardview-v7:26.1.0'
compile 'com.github.jd-alexander:library:1.1.0'
testCompile 'junit:junit:4.12'
compile 'com.google.android.libraries.places:places:1.0.0'
}
apply plugin: 'com.google.gms.google-services'
Add Dependencies for Glide with the latest version.
repositories {
mavenCentral()
google()
}
dependencies {
implementation 'com.github.bumptech.glide:glide:4.9.0'
annotationProcessor 'com.github.bumptech.glide:compiler:4.9.0'
}
This issue is in glide library. It is fixed in latest version. Please check link for reference.
Use the latest version of glide. This issue is fixed.
dependencies {
implementation 'com.github.bumptech.glide:glide:4.9.0'
annotationProcessor 'com.github.bumptech.glide:compiler:4.9.0'
}
for more detail refer here Glide
I create a signed APK and upload that, it crashes in all below version of marshmallow. The signed APK works on Android above version 5.0, but not on <5.0. The AppCompat Library is linked with the project in Android.
And when I normally run the same project in android 5.0 it work perfectly but signed apk not run in 5.0.
And it was also not generating the crash report.
In the AndroidManifest.xml I have declared:
android {
compileSdkVersion 26
buildToolsVersion '26.0.2'
defaultConfig {
applicationId "com.ahgp"
minSdkVersion 21
targetSdkVersion 26
versionCode 1
versionName "1.0"
// Enabling multidex support.
multiDexEnabled true
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
sourceSets { main { java.srcDirs = ['src/main/java', 'src/main/assets/fonts'] } }
}
allprojects {
repositories {
maven {
url "https://github.com/QuickBlox/quickblox-android-sdk-releases/raw/master/"
}
}
}
repositories {
mavenCentral()
maven {
url 'https://maven.google.com/'
name 'Google'
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile('com.paypal.sdk:paypal-android-sdk:2.15.3') {
exclude group: 'io.card'
}
compile files('libs/twitter4j-core-4.0.3.jar')
// compile 'com.jakewharton:butterknife-compiler:8.6.0'
compile 'com.squareup.picasso:picasso:2.3.2'
compile 'com.jakewharton:butterknife:8.6.0'
compile 'com.android.support:appcompat-v7:26.0.2'
compile 'com.android.support:design:26.0.2'
compile 'com.squareup.retrofit2:retrofit:2.0.0-beta4'
compile 'com.squareup.retrofit2:converter-gson:2.0.2'
compile 'org.glassfish.main:javax.annotation:4.0-b33'
compile 'com.squareup.okhttp3:logging-interceptor:3.4.1'
compile 'com.squareup.okhttp3:okhttp:3.4.1'
compile 'com.android.support:recyclerview-v7:26.0.2'
compile 'com.android.support:support-v4:26.0.2'
compile 'com.facebook.android:facebook-android-sdk:(4,5)'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.loopj.android:android-async-http:1.4.9'
compile 'com.journeyapps:zxing-android-embedded:3.5.0'
testCompile 'junit:junit:4.12'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.6.0'
/* compile 'com.google.android.gms:play-services:10+'
compile 'com.google.android.gms:play-services-location:10+'
compile 'com.google.android.gms:play-services-maps:10+'
compile 'com.google.android.gms:play-services-places:10+'*/
compile 'com.quickblox:quickblox-android-sdk-videochat-webrtc:3.3.1'
compile 'com.google.android.gms:play-services:11.0.4'
compile 'com.google.firebase:firebase-messaging:11.0.4'
compile 'com.google.firebase:firebase-core:11.0.4'
implementation 'com.android.support:multidex:1.0.3'
//noinspection GradleCompatible
/* compile 'com.google.firebase:firebase-messaging:9.8.0'
compile 'com.google.firebase:firebase-core:9.8.0'*/
// glide
compile 'com.github.bumptech.glide:glide:3.7.0'
// acra crash report
compile 'ch.acra:acra:4.6.2'
}
apply plugin: 'com.google.gms.google-services'
In your build gradle file minimum os is 21 so your app will not supported below to 21.
Module app Gradle:
Updated the google repository and service from sdk too
but this error is still there. Please someone check it out
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
buildToolsVersion "26.0.2"
defaultConfig {
applicationId "com.norsoftbd.user.test1vaia"
minSdkVersion 22
targetSdkVersion 26
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
//noinspection GradleCompatible
implementation 'com.android.support:appcompat-v7:26.1.0'
//implementation 'com.google.android.gms:play-services:10.2.1'
implementation 'com.android.firebase:firebase-core:10.2.0'
implementation 'com.android.firebase:firebase-database:10.2.0'
implementation 'com.rengwuxian.materialedittext:library:2.1.4'
compile "com.android.support:recyclerview-v7:26.1.0"
compile 'com.android.support:cardview-v7:26.+'
compile 'com.android.support:design:26.+'
compile 'com.google.code.gson:gson:2.8.0'
compile 'com.squareup.retrofit2:retrofit:2.0.2'
compile 'com.squareup.retrofit2:converter-gson:2.0.2'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.google.firebase:firebase-messaging:10.2.1'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
testImplementation 'junit:junit:4.12'
androidTestImplementation('com.android.support.test.espresso:espresso-core:3.0.1', {
exclude group: 'com.android.support', module: 'support-annotations'
})
}
apply plugin: 'com.google.gms.google-services'`enter code here`
Add the Google Maven repository in your project level build.gradele file as shown below.
allprojects {
repositories {
jcenter()
maven {
url "https://maven.google.com"
}
}
}
Within build.gradle(Project) file, add latest google-services and Google maven repository
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.3'
classpath 'com.google.gms:google-services:3.1.0'
}
}
allprojects {
repositories {
jcenter()
maven {
url 'https://maven.google.com'
}
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
Then, in your build.gralde(Module:app) file, add latest Firebase dependencies, apply google-services plugin and fix android support dependecies version:
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
buildToolsVersion "26.0.2"
defaultConfig {
applicationId "com.norsoftbd.user.test1vaia"
minSdkVersion 22
targetSdkVersion 26
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'])
compile 'com.android.support:appcompat-v7:26.0.2'
compile 'com.android.support:recyclerview-v7:26.0.2'
compile 'com.android.support:cardview-v7:26.0.2'
compile 'com.android.support:design:26.0.2'
compile 'com.android.firebase:firebase-core:11.4.2'
compile 'com.android.firebase:firebase-database:11.4.2'
compile 'com.google.firebase:firebase-messaging:11.4.2'
compile 'com.rengwuxian.materialedittext:library:2.1.4'
compile 'com.google.code.gson:gson:2.8.0'
compile 'com.squareup.retrofit2:retrofit:2.0.2'
compile 'com.squareup.retrofit2:converter-gson:2.0.2'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
testImplementation 'junit:junit:4.12'
androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
}
apply plugin: 'com.google.gms.google-services'
Using configuration above should work.
Just replaced all "compile" with "implements" , #AlexTa I also placed the latest google services earlier.
I'm trying to implement twitter sign in for my android app (also crashlytics). But I have a problem with my gradle; funny thing is I did this before for another app. Here's my app-level gradle:
buildscript {
repositories {
jcenter()
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
// These docs use an open ended version so that our plugin
// can be updated quickly in response to Android tooling updates
// We recommend changing it to the latest version from our changelog:
// https://docs.fabric.io/android/changelog.html#fabric-gradle-plugin
classpath 'io.fabric.tools:gradle:1.+'
}
}
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'
repositories {
jcenter()
maven { url 'https://maven.fabric.io/public' }
}
android {
compileSdkVersion 25
buildToolsVersion "25.0.0"
defaultConfig {
applicationId "com.stuff.stuffapp"
minSdkVersion 19
targetSdkVersion 25
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile('io.socket:socket.io-client:0.8.3') {
exclude group: 'org.json', module: 'json'
}
compile 'com.android.support:recyclerview-v7:25.1.1'
compile 'com.android.support:appcompat-v7:25.1.1'
compile 'com.android.support:design:25.1.1'
compile 'com.squareup.retrofit2:retrofit:2.1.0'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.jakewharton:butterknife:8.4.0'
compile 'com.google.code.gson:gson:2.8.0'
compile 'com.squareup.retrofit2:converter-gson:2.0.2'
compile 'org.greenrobot:eventbus:3.0.0'
compile 'com.android.support:support-v4:25.1.1'
compile 'com.android.support:cardview-v7:25.1.1'
compile 'com.iainconnor:objectcache:0.0.19-SNAPSHOT'
compile 'com.astuetz:pagerslidingtabstrip:1.0.1'
compile 'com.google.firebase:firebase-messaging:10.0.1'
testCompile 'junit:junit:4.12'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.4.0'
compile 'com.squareup.okhttp3:logging-interceptor:3.4.1'
compile 'com.squareup.okhttp3:okhttp:3.4.1'
compile 'com.facebook.android:facebook-android-sdk:[4,5)'
compile('com.twitter.sdk.android:twitter-core:2.3.2#aar') {
transitive = true;
}
compile('com.crashlytics.sdk.android:crashlytics:2.6.7#aar') {
transitive = true;
}
}
apply plugin: 'com.google.gms.google-services'
I'm getting the errors:
Failed to resolve: com.twitter.sdk.android:twitter-core:2.3.2
Failed to resolve: annotationProcessor
Also, when I change to twitter 2.3.0 , my Twitter object is not found
Use twitter instead of twitter-core :
compile('com.twitter.sdk.android:twitter:2.3.2#aar') {
transitive = true;
}
I tested it and worked fine with the annotation processor.
I just enabled Multidex support for my app and now I am getting this error from my Joda time dependency.
I am also using a library gson-jodatime-serialisers that depends on Joda. Not sure if it's causing the duplicate issue.
Error:Execution failed for task ':app:packageAllDebugClassesForMultiDex'.
> java.util.zip.ZipException: duplicate entry: org/joda/time/base/AbstractDateTime.class
apply plugin: 'com.android.application'
android {
compileSdkVersion 22
buildToolsVersion "22.0.1"
defaultConfig {
applicationId "com.wake.social"
minSdkVersion 14
targetSdkVersion 22
versionCode 1
versionName "1.0"
manifestPlaceholders = [ localApplicationId:applicationId ]
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
repositories {
jcenter()
mavenCentral()
maven {
url "https://oss.sonatype.org/content/repositories/snapshots/"
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:22.1.1'
compile('com.mikepenz:materialdrawer:2.9.8#aar') {
transitive = true
}
compile 'com.mikepenz.iconics:octicons-typeface:2.2.0#aar'
compile 'com.mikepenz:community-material-typeface:1.0.0#aar'
compile 'com.squareup.okhttp:okhttp:2.4.0'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.jakewharton:butterknife:6.1.0'
compile 'com.facebook.android:facebook-android-sdk:4.1.0'
compile 'com.squareup.retrofit:retrofit:1.9.0'
compile('de.keyboardsurfer.android.widget:crouton:1.8.5#aar') {
exclude group: 'com.google.android', module: 'support-v4'
}
compile 'com.afollestad:material-dialogs:0.7.4.2'
debugCompile 'com.squareup.leakcanary:leakcanary-android:1.3.1'
releaseCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.3.1'
compile 'com.github.satyan:sugar:1.3.1'
compile 'com.google.android.gms:play-services-gcm:7.5.0'
compile 'eu.inloop:easygcm:1.4.0#aar'
compile 'me.leolin:ShortcutBadger:1.1.1#aar'
compile 'com.getbase:floatingactionbutton:1.9.0'
compile 'com.mobsandgeeks:android-saripaar:2.0-SNAPSHOT'
compile 'com.squareup:otto:1.3.7'
compile 'uk.co.chrisjenx:calligraphy:2.1.0'
compile 'com.github.navasmdc:MaterialDesign:1.5#aar'
compile 'com.github.traex.rippleeffect:library:1.3'
compile ("com.doomonafireball.betterpickers:library:1.6.0") {
exclude group: 'com.android.support', module: 'support-v4'
}
compile 'net.danlew:android.joda:2.7.2'
compile 'com.rengwuxian.materialedittext:library:2.1.3'
compile 'com.android.support:multidex:1.0.0'
compile ''com.fatboyindustrial.gson-jodatime-serialisers:gson-jodatime-serialisers:1.1.0' //this depends on it. Could be causing the problem.'
}
compile ''com.fatboyindustrial.gson-jodatime-serialisers:gson-jodatime-serialisers:1.1.0'
//this depends on it. Could be causing the problem.'
According to mvnrespository.com, this library depends on joda-time itself so it may be a duplicate entry
compile ("com.fatboyindustrial.gson-jodatime-serialisers:gson-jodatime-serializers:1.1.0") {
exclude module: 'joda-time'
}
Should do the trick