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.
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 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".
I have this gradle
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.estimote:sdk:1.4.0'
compile 'com.android.support:appcompat-v7:27.0.1'
testCompile 'junit:junit:4.12'
compile('com.crashlytics.sdk.android:crashlytics:2.7.1#aar') {
transitive = true;
}
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.afollestad.material-dialogs:core:0.9.5.0'
compile 'com.google.android.gms:play-services-maps:11.6.0'
compile 'com.google.android.gms:play-services-location:11.6.0'
}
I have problem with appcompat-v7:27.0.1 and the google play services.
if I use the 26.0.1 there is not problem with the google play services but cant use the afollestand 0.9.5.0.
I need the afollestand 0.9.5.0 that works with appcompat-v7:27
UPDATE:
Gradle image
I've had the same problem. What user raghunandan suggested helps.
Using ./gradlew app:dependencies in your Apps folder ( or ./gradlew.bat app:dependencies on Windows), you get the dependency tree of all the packages.
There you can see that 'play-services-maps' requires some support packages with version 25.2.0, but most of them get upgraded to 27.0.2. But not all for some reason. You can do this manually though, by including them directly! (They will be part of your APK anyway)
compile 'com.android.support:support-v4:27.0.2'
add that in your apps build.gradle alongside support-v7 and it'll work.
I try Everything, but the real answer was wait to and update of play-services.
now my gradle looks like:
android {
compileSdkVersion 27
buildToolsVersion '27.0.3'
defaultConfig {
applicationId "xxx.YYY"
minSdkVersion 19
targetSdkVersion 27
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
repositories {
maven {
url "https://maven.google.com"
}
}
dependencies {
compile('com.crashlytics.sdk.android:crashlytics:2.7.1#aar') {
transitive = true;
}
compile 'com.android.support:appcompat-v7:27.0.2'
compile 'com.android.support:cardview-v7:27.0.2'
compile 'com.android.support:recyclerview-v7:27.0.2'
compile 'com.android.support:support-v4:27.0.2'
compile 'com.android.support:design:27.0.2'
compile 'com.google.android.gms:play-services-maps:11.8.0'
compile 'com.google.android.gms:play-services-location:11.8.0'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.google.maps.android:android-maps-utils:0.5'
compile 'com.afollestad.material-dialogs:core:0.9.6.0'
testCompile 'junit:junit:4.12'
And have 0 errors.
I'm trying to implement Google Sign-In through Firebase into my Android app and the following message keeps appearing after my Gradle sync:
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.2.6.
How can I fix this error?
Here's my Gradle file:
apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion "25.0.2"
defaultConfig {
applicationId "com.sjf.lgcats"
minSdkVersion 15
targetSdkVersion 25
versionCode 2
versionName "1.0.1"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
sourceSets { main { assets.srcDirs = ['src/main/assets', 'src/main/assets/2'] } }
}
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.android.support:appcompat-v7:25.3.1'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.android.support:design:25.3.1'
compile 'com.android.support:support-vector-drawable:25.3.1'
compile 'com.android.support:support-v4:25.3.1'
compile 'com.google.firebase:firebase-auth:10.2.6'
compile 'com.google.firebase:firebase-messaging:10.2.6'
compile 'com.google.firebase:firebase-auth:11.0.0'
compile 'com.google.android.gms:play-services-auth:11.0.0'
compile 'commons-io:commons-io:2.0.1'
testCompile 'junit:junit:4.12'
}
apply plugin: 'com.google.gms.google-services'
Use the same version for all Firebase and Google Play libraries:
compile 'com.google.firebase:firebase-auth:11.0.0'
compile 'com.google.firebase:firebase-messaging:11.0.0'
compile 'com.google.android.gms:play-services-auth:11.0.0'
While your making changes, you could also use the latest version of build tools:
buildToolsVersion "26.0.0"
You can simplify maintenance of version numbers and ensure they are always consistent by doing this:
ext {
SUPPORT_LIB_VER = '25.3.1'
GOOGLE_LIB_VER = '11.0.0'
}
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.android.support:appcompat-v7:$SUPPORT_LIB_VER"
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile "com.android.support:design:$SUPPORT_LIB_VER"
compile "com.android.support:support-vector-drawable:$SUPPORT_LIB_VER"
compile "com.android.support:support-v4:$SUPPORT_LIB_VER"
compile "com.google.firebase:firebase-auth:$GOOGLE_LIB_VER"
compile "com.google.firebase:firebase-messaging:$GOOGLE_LIB_VER"
compile "com.google.android.gms:play-services-auth:$GOOGLE_LIB_VER"
compile 'commons-io:commons-io:2.0.1'
testCompile 'junit:junit:4.12'
}
android {
compileSdkVersion 25
buildToolsVersion "25.0.3"
defaultConfig {
applicationId "com.****"
minSdkVersion 21
targetSdkVersion 25
versionCode 30
versionName "1.0"
multiDexEnabled true
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true
signingConfig signingConfigs.config
}
buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
productFlavors {
}
}
repositories {
maven { url "https://dl.bintray.com/hani-momanii/maven" }
mavenCentral()
jcenter()
maven { url "https://jitpack.io" }
}
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'
})
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:25.3.1'
compile 'com.android.volley:volley:1.0.0'
compile 'com.android.support:design:25.3.1'
compile 'com.android.support:support-v4:25.3.1'
compile 'com.google.android.gms:play-services-maps:9.6.1'
compile 'com.google.android.gms:play-services-location:9.6.1'
compile 'com.android.support:support-vector-drawable:25.0.0'
compile 'hani.momanii.supernova_emoji_library:supernova-emoji-library:0.0.2'
compile 'com.google.maps.android:android-maps-utils:0.5'
compile 'com.googlecode.libphonenumber:libphonenumber:7.0.4'
compile 'com.github.siyamed:android-shape-imageview:0.9.+#aar'
compile 'com.theartofdev.edmodo:android-image-cropper:2.2.0'
compile 'com.facebook.android:facebook-android-sdk:4.+'
compile 'org.fusesource.mqtt-client:mqtt-client:1.12'
compile 'com.google.firebase:firebase-messaging:9.6.1'
compile 'com.squareup.okhttp3:okhttp:3.4.1'
compile 'com.android.support:cardview-v7:25.3.1'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.github.bumptech.glide:glide:3.7.0'
compile 'com.android.support.test.espresso:espresso-core:2.2.2'
compile 'com.android.support.constraint:constraint-layout:1.0.0-beta4'
testCompile 'junit:junit:4.12'
}
apply plugin: 'com.google.gms.google-services'
I want to use minifyEnabled true and try to generate signed Apk but getting error
Warning:Exception while processing task java.io.FileNotFoundException:
\app\build\intermediates\proguard-rules\release\aapt_rules.txt (The
system cannot find the path specified).
What should I do to avoid this error?
build Clean project.
Go to Android Studio -> File -> Invalidate caches/ Restart
Android Studio "Build" - "Clean project" and the error message should not appear again.