This question already has an answer here:
Android studio used to generate 1 release apk, now it's 3. What does each of them do?
(1 answer)
Closed 5 years ago.
I wanted to generate a singed APK for my application via Build > Generate Signed APK after this i got 3 different APK one is app-armeabi-v7a-release.apk another one is app-universal-release.apk and the last one is app-x86-release.apk.
What's the difference between each one! What version i should upload to the Google Play Store!
I'm using Ubuntu 16.04 and Android Studio 3.0.1.
Here my Gradle:
apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion '26.0.2'
defaultConfig {
applicationId "my.app.package.name"
minSdkVersion 21
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'
}
}
splits {
abi {
enable true
reset()
include 'x86', 'armeabi-v7a'
universalApk true
}
}
}
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.4.0' //25.3.1
compile 'com.android.support:design:25.4.0' //25.3.1
testCompile 'junit:junit:4.12'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.google.firebase:firebase-auth:11.8.0'
compile 'com.android.support:support-v4:25.4.0' //25.3.1
compile 'de.hdodenhof:circleimageview:2.1.0'
compile 'com.google.firebase:firebase-database:11.8.0'
compile 'com.theartofdev.edmodo:android-image-cropper:2.4.+'
compile 'com.google.firebase:firebase-storage:11.8.0'
compile 'com.firebaseui:firebase-ui-database:1.2.0'
compile 'id.zelory:compressor:2.0.0'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.squareup.okhttp:okhttp:2.5.0'
compile 'com.google.firebase:firebase-messaging:11.8.0' //10.2.0
compile 'com.github.hani-momanii:SuperNova-Emoji:1.1'
compile 'com.miguelcatalan:materialsearchview:1.4.0'
compile 'com.github.adrielcafe:AndroidAudioRecorder:0.3.0'
compile 'com.github.adrielcafe:AndroidAudioConverter:0.0.8'
compile 'com.github.halysongoncalves:pugnotification:1.8.1'
}
apply plugin: 'com.google.gms.google-services'
At first you must read that Generate signed apk android studio
It always for market
release {....
Related
I just included ads into my app and as part of that process I included
/*google play plugin for adMob*/
compile 'com.google.android.gms:play-services:10.2.1'
as a dependency in my gradle app file. But I'm getting a red underscore error under
compile 'com.android.support:appcompat-v7:26.+'
error says:
all com.android.libraries support must use same version specification. mixing can lead to crashes.
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
buildToolsVersion "26.0.2"
defaultConfig {
applicationId "org.pctechtips.george.dailyquotes"
minSdkVersion 16
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'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
/*firebase */
// compile 'com.google.firebase:firebase-core:10.2.1'
})
// compile 'com.android.support:appcompat-v7:21.0.3'
compile 'com.android.support:appcompat-v7:26.+'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.android.support:support-v4:26.+'
testCompile 'junit:junit:4.12'
/*google play plugin for adMob*/
compile 'com.google.android.gms:play-services:10.2.1'
}
play-services-ads:10.2.1 has a dependency onto play-services-basement:10.2.1 which has a dependency onto com.android.support:support-v4:24.0.0. This is likely the source of the mismatch.
See All com.android.support libraries must use the exact same version specification for more context.
I generated a signed apk file & trying to install on a mobile device.
But the app is not installing. Its showing app is not installed popup.
I'm able to install the apk in mobile with Nougat & the app is fully functional in debug mode.
Can anyone give me possible reason & solution for this issue.
apply plugin: 'com.android.application'
apply plugin: 'realm-android'
android {
compileSdkVersion 25
buildToolsVersion "25.0.3"
defaultConfig {
applicationId "prasenjit.com.pickcel"
minSdkVersion 20
targetSdkVersion 25
versionCode 5
versionName "1.5"
multiDexEnabled = true
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true
}
sourceSets {
main {
assets.srcDirs = ['assets']
}
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
productFlavors {
}
}
repositories {
maven { url "https://jitpack.io" }
maven { // this is for realm-db
url 'http://oss.jfrog.org/artifactory/oss-snapshot-local'
}
}
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 project(path: ':material-login')
compile project(':MPChartLib')
compile project(':materiallettericon')
compile 'com.github.PhilJay:MPAndroidChart-Realm:v2.0.2#aar'
compile 'com.android.support:appcompat-v7:25.3.1'
compile 'com.android.support:design:25.3.1'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.android.support:support-vector-drawable:25.3.1'
compile 'com.android.support:support-v4:25.3.1'
compile 'com.android.support:recyclerview-v7:25.3.1'
compile 'com.felipecsl:gifimageview:2.1.0'
compile 'com.firebaseui:firebase-ui-database:3.0.0'
compile 'commons-io:commons-io:2.4'
compile 'com.google.firebase:firebase-auth:11.4.2'
compile 'com.google.firebase:firebase-database:11.4.2'
compile 'com.google.firebase:firebase-firestore:11.4.2'
compile 'com.google.firebase:firebase-messaging:11.4.2'
compile 'com.google.firebase:firebase-storage:11.4`enter code here`.2'
compile 'com.google.android.gms:play-services-location:11.4.2'
compile 'com.google.android.gms:play-services-places:11.4.2'
compile 'com.google.android.gms:play-services-maps:11.4.2'
testCompile 'junit:junit:4.12'
}
apply plugin: 'com.google.gms.google-services'
Got the solution for my issue.
Its something called Environment change in mobile OS which happens when we try to install signed apk & unsigned apk multiple types.
Once installed from play store, i tried to reinstall the above signed apk & its working.
Go to your phone settings, find you app inside installed apps list and do uninstall for all users
This was working before I added firebaseui dependency. Now I'm getting this: log
Its red lining compile 'com.android.support:appcompat-v7:26.+' and when I hover over it, it says "all libraries must be exact same specification version". That version was what was there when the project was created.
app/build.gradle:
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
buildToolsVersion "26.0.1"
defaultConfig {
applicationId "com.android.adarak"
minSdkVersion 21
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'])
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:26.+'
compile 'com.android.support:support-v4:26.+'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.google.firebase:firebase-auth:10.0.1'
//compile 'com.firebaseui:firebase-ui-auth:2.3.0'
compile 'com.firebaseui:firebase-ui:2.3.0'
testCompile 'junit:junit:4.12'
}
apply plugin: 'com.google.gms.google-services'
The firebaseui internally has a dependency on a specific version of Android support library. The firebase ui configuration contains 26.0.1 as the required support library version.
However your gradle file has a dependency on 26.+ which tells gradle to use the latest in the 26.x.x series and this could be different from 26.0.1. You can solve the issue by using the specific version required by firebase-ui (26.0.1)
Change the gradle file as shown below,
compile 'com.android.support:appcompat-v7:26.0.1'
compile 'com.android.support:support-v4:26.0.1'
This is my first app publication. The project is working fine in the development side, but I am facing a problem during signing APK.
Included library in the app of com.1gravity:android-contactpicker
and facing problem during signing apk only.
error coming
Error:(30, 44) error: package com.onegravity.contactpicker.contact
does not exist
and
Generate Signed APK: Errors while building APK. You can find the
errors in the 'Messages' view.
gradle file
apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion "26.0.0"
defaultConfig {
applicationId 'com.mymatatu'
minSdkVersion 15
targetSdkVersion 25
versionCode 3
versionName "1.3"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
productFlavors {
}
}
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'
})
debugCompile project(':library')
compile 'com.android.support:appcompat-v7:25.3.1'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
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.android.support:cardview-v7:25.3.1'
compile 'com.android.support:recyclerview-v7:25.3.1'
compile 'com.github.bumptech.glide:glide:4.0.0-RC1'
compile 'com.github.markushi:circlebutton:1.1'
testCompile 'junit:junit:4.12'
annotationProcessor 'com.github.bumptech.glide:compiler:4.0.0-RC1'
}
in your gradle file change this
debugCompile project(':library')
line into
compile project(':library')
I tried to get the latest version of the google play services for the maps api, using compile 'com.google.android.gms:play-services-maps:11.2.0' in the gradle file and also put the google maven url in the project gradle.
My problem is that when i try to sync my gradle files, i get an error and android studio proposes to install repository and sync project, but when i click on it nothing happens and android studio freezes for a few seconds.
The same happens if i add the whole google play services with compile 'com.google.android.gms:play-services:11.2.0'
I tried the invalidate cache/restart technique, i uninstalled/installed the google play service in the sdk manager and i don't know what to do to resolve this problem.
The build.gradle is like this (it works with the 11.0.4 version) :
apply plugin: 'com.android.application'
def dbflow_version = "4.0.5"
android {
compileSdkVersion 25
buildToolsVersion "26.0.1"
defaultConfig {
applicationId "not telling"
minSdkVersion 21
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'
})
annotationProcessor "com.github.Raizlabs.DBFlow:dbflow-processor:${dbflow_version}"
compile "com.github.Raizlabs.DBFlow:dbflow-core:${dbflow_version}"
compile "com.github.Raizlabs.DBFlow:dbflow:${dbflow_version}"
compile 'com.android.support:design:25.3.1'
compile 'com.android.support:appcompat-v7:25.3.1'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.squareup.retrofit2:retrofit:2.3.0'
compile 'com.jakewharton:butterknife:8.8.1'
compile 'com.google.android.gms:play-services-maps:11.0.4'
compile 'com.google.android.gms:play-services-location:11.0.4'
compile 'com.google.android.gms:play-services-identity:11.0.4'
testCompile 'junit:junit:4.12'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'
}
Do you have a way to fix this ?