When I want to run app on my phone I face this proplem: min sdk 26 > device sdk24
How can I fix that?
build gradle :
android {
compileSdkVersion 26
buildToolsVersion "25.0.0"
defaultConfig {
applicationId "com.example.asus.order"
minSdkVersion 26
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'
}
}
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'
})
//Add Library
compile 'com.android.support:appcompat-v7:26.+'
compile 'com.android.support:cardview-v7:26.+'
compile 'com.android.support:recyclerview-v7:26.+'
compile 'com.android.support.constraint:constraint-layout:1.0.0-beta1'
compile 'com.google.firebase:firebase-core:10.2.1'
compile 'com.google.firebase:firebase-database:10.2.1'
compile 'info.hoang8f:fbutton:1.0.5'
compile 'com.rengwuxian.materialedittext:library:2.1.4'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.firebaseui:firebase-ui-database:1.2.0'
compile 'com.android.support:design:26.+'
testCompile 'junit:junit:4.12'
}
apply plugin: 'com.google.gms.google-services'
Just set the minSdkVersion to 24 or lower
Related
The error is not allowing the app to run and its even after changing the value of the compileSdkVersion and buildToolVersion.
It is not allowing the code to connect with the android function present in the app gradle.
android {
compileSdkVersion 28
buildToolsVersion "26.0.3"
defaultConfig {
applicationId "com.mridul.smartbin"
minSdkVersion 17
targetSdkVersion 28
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(dir: 'libs', include: ['*.jar'])
implementation 'com.google.firebase:firebase-core:16.0.1'
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'
//noinspection GradleCompatible
compile 'com.android.support:design:25.3.1'
compile 'com.android.support:customtabs:25.3.1'
compile 'com.android.support:palette-v7:25.3.1'
compile 'com.android.support:mediarouter-v7:25.3.1'
compile 'com.google.android.gms:play-services:10.2.1'
compile 'com.android.support:multidex:1.0.1'
compile 'com.android.support.constraint:constraint-layout:1.0.0-beta4'
testCompile 'junit:junit:4.12'
}
apply plugin: 'com.google.gms.google-services'
error when build apk....
[enter image description here][1]
Error:Execution failed for task ':app:transformClassesWithDexForDebug'.
com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: java.util.concurrent.ExecutionException: com.android.dex.DexException: Multiple dex files define Lcom/android/volley/VolleyError;
my gradle :
apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion "25.0.3"
defaultConfig {
applicationId "com.morten.gpibwal.desakayuambon"
minSdkVersion 17
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'
}
}
dexOptions {
}
}
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.volley:volley:1.0.0'
compile 'com.android.support:cardview-v7:25.0.0'
compile 'com.android.support:recyclerview-v7:25.0.0'
compile 'com.github.bumptech.glide:volley-integration:1.4.0'
compile 'com.android.support:appcompat-v7:25.3.1'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.android.support:support-v4:25.3.1'
compile 'com.android.support:design:25.3.1'
testCompile 'junit:junit:4.12'
}
The solution is
delete "compile 'com.github.bumptech.glide:volley-integration:1.4.0'
com.android.dex.DexException: Multiple dex files define
Lcom/android/volley/VolleyError;
You should delete
compile 'com.github.bumptech.glide:volley-integration:1.4.0'
Then Clean-Rebuild-Run.
add multiDexEnabled true in gradle file also use same version for compile dependencies check below code
apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion "25.0.3"
defaultConfig {
applicationId "com.morten.gpibwal.desakayuambon"
minSdkVersion 17
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'
}
}
dexOptions {
}
}
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.volley:volley:1.0.0'
compile 'com.android.support:cardview-v7:25.0.0'
compile 'com.android.support:recyclerview-v7:25.0.0'
compile 'com.github.bumptech.glide:volley-integration:1.4.0'
compile 'com.android.support:appcompat-v7:25.3.1'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.android.support:support-v4:25.0.0'
compile 'com.android.support:design:25.0.0'
testCompile 'junit:junit:4.12'
}
remove unnecessary empty
dexOptions {
}
I am using the class PolyUtil from Google Map Utility. But when I am adding dependency in gradle.build it is showing sync error.
compile 'com.android.support:appcompat-v7:25.2.0'
compile 'com.google.maps.android:android-maps-utils:0.5+'
compile 'com.google.android.gms:play-services-maps:10.2.0'
compile 'com.google.android.gms:play-services-location:10.2.0'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
What can be the possible reason?
total gradle
apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion "25.0.2"
defaultConfig {
applicationId "com.shaby.supportindia.myapplicationmap"
minSdkVersion 17
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(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.google.maps.android:android-maps-utils:0.5+'
compile 'com.android.support:appcompat-v7:25.2.0'
compile 'com.google.android.gms:play-services-maps:10.2.0'
compile 'com.google.android.gms:play-services-location:10.2.0'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
testCompile 'junit:junit:4.12'
}
When we write a code color of word 'Application', it changes to red. Can anyone help me out with this?
Here is my build.gradle app
apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'
android {
compileSdkVersion 26
buildToolsVersion "26.0.0"
defaultConfig {
applicationId "com.example.nabeel.ask"
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(include: ['*.jar'], dir: 'libs')
testCompile 'junit:junit:4.12'
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.constraint:constraint-layout:1.0.0-alpha7'
compile 'com.android.support:design:26.+'
compile 'com.facebook.android:facebook-android-sdk:4.6.0'
compile 'com.google.android.gms:play-services-auth:8.3.0'
compile 'com.google.android.gms:play-services:8.3.0'
}
Try to clean and rebuild your project
Build>Clean Project/Rebuild project
Phone verification in my android application is not working. when i am adding AuthUI.PHONE_VERIFICATION_PROVIDER, the editor showing that cannot resolve symbol. Other verification method like Google or email are working fine.
Here is the screen-shot for this:
Here is Gradle:
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion '25.0.2'
defaultConfig {
applicationId "com.example.nishant.kitchenbook"
minSdkVersion 21
targetSdkVersion 23
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(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:23.4.0'
compile 'com.android.support:support-v4:23.4.0'
compile 'com.android.support:design:23.4.0'
compile 'com.google.firebase:firebase-database:10.0.1'
compile 'com.firebaseui:firebase-ui-auth:1.0.1'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
testCompile 'junit:junit:4.12'
}
apply plugin: 'com.google.gms.google-services'
Upgrade your firebaseui version to the latest. Change compile 'com.firebaseui:firebase-ui-auth:1.0.1' to compile 'com.firebaseui:firebase-ui-auth:2.1.1'