I am trying to use activeandroid, everything work fine on android 6 and 7
but when i try to run it on OS 5 i get:
java.lang.NoClassDefFoundError:android.support.v4.hardware.fingerprint.FingerprintManagerCompatApi23
android {
compileSdkVersion 24
buildToolsVersion "24.0.2"
defaultConfig {
applicationId "com.koa.testactive"
minSdkVersion 16
targetSdkVersion 24
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:24.2.1'
compile 'com.android.support:design:24.2.1'
compile 'com.android.support:cardview-v7:24.2.1'
compile 'com.android.support:multidex:1.0.0'
compile 'com.android.support:support-v4:24.2.1'
testCompile 'junit:junit:4.12'
//compile 'com.github.satyan:sugar:1.5'
compile 'com.michaelpardo:activeandroid:3.1.0-SNAPSHOT'
}
maybe the ActiveAndroid caused this problem,change the version of it to the newest and retry
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'
Just migrated to Android Studio 3. When I was tying to embed a unity app within android using this I keep running to module not specified error.
Note that this procedure used to work just fine before I migrated to Android Studio 3.
apply plugin: com.android.application
android {
compileSdkVersion 26
buildToolsVersion '26.0.2'
defaultConfig {
applicationId "yenettaapp.beblocky"
minSdkVersion 24
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 project(":BeBlockyMobi-debug")
compile project(":my_bebot_plugin-release")
implementation 'com.github.ericwlange:AndroidJSCore:3.0.1'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.android.support:appcompat-v7:26.0.1'
compile 'com.android.support:recyclerview-v7:26.0.1'
compile 'com.android.support:support-v4:26.0.1'
compile 'com.google.blockly.android:blocklylib-vertical:0.9-beta.20170824'
testCompile 'junit:junit:4.12'
}
I was trying to solve this gradle error.I imported this project by getting it from a friend of mine.It worked in his system perfectly. Seems like I have a The following issues in my gradle.
Error:Conflict with dependency 'com.android.support:support-annotations' in project ':app'. Resolved versions for app (27.0.2) and test app (25.4.0) differ.
The following are my gradle
Module app
apply plugin: 'com.android.application'
android {
compileSdkVersion 27
buildToolsVersion "27.0.2"
defaultConfig {
applicationId "com.startup.hospital"
minSdkVersion 15
targetSdkVersion 26
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true
}
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:27.+'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.android.support:design:27.+'
compile 'com.android.support:support-vector-drawable:27.0.2'
compile 'com.android.support:support-v4:27.0.2'
compile 'com.aurelhubert:ahbottomnavigation:2.1.0'
compile 'com.github.arimorty:floatingsearchview:2.1.1'
compile 'com.ss.bottomnavigation:bottomnavigation:1.5.2'
compile 'jp.wasabeef:glide-transformations:2.0.2'
compile 'junit:junit:4.12'
androidTestCompile 'com.android.support.test:runner:1.0.1'
androidTestCompile 'com.android.support.test.espresso:espresso-core:3.0.1'
}
Project gradle
apply plugin: 'com.android.application'
android {
compileSdkVersion 27
buildToolsVersion "27.0.1"
defaultConfig {
applicationId "com.startup.hospital"
minSdkVersion 15
targetSdkVersion 26
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true
}
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:27.+'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.android.support:design:27.+'
compile 'com.android.support:support-vector-drawable:27.0.2'
compile 'com.android.support:support-v4:27.0.2'
compile 'com.aurelhubert:ahbottomnavigation:2.1.0'
compile 'com.github.arimorty:floatingsearchview:2.1.1'
compile 'com.ss.bottomnavigation:bottomnavigation:1.5.2'
compile 'jp.wasabeef:glide-transformations:2.0.2'
compile 'junit:junit:4.12'
androidTestCompile 'com.android.support.test:runner:1.0.1'
androidTestCompile 'com.android.support.test.espresso:espresso-core:3.0.1'
}
Just add the following in your build.gradle (:app)
configurations.all {
resolutionStrategy {
force 'com.android.support:appcompat-v7:26.+'
force 'com.android.support:support-compat:26.+'
force 'com.android.support:support-core-ui:26.+'
force 'com.android.support:support-annotations:26.+'
force 'com.android.support:recyclerview-v7:26.+'
}
}
Your espresso has already those dependencies same as you have declared above for support library with different version which is causing problem so exclude theme like below from module build.gradle file
androidTestCompile('com.android.support.test.espresso:espresso-core:3.0.1', {
exclude group: 'com.android.support', module: 'support-annotations'
})
here is what it should look like
apply plugin: 'com.android.application'
android {
compileSdkVersion 27
buildToolsVersion "27.0.2"
defaultConfig {
applicationId "com.startup.hospital"
minSdkVersion 15
targetSdkVersion 26
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true
}
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:27.+'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.android.support:design:27.+'
compile 'com.android.support:support-vector-drawable:27.0.2'
compile 'com.android.support:support-v4:27.0.2'
compile 'com.aurelhubert:ahbottomnavigation:2.1.0'
compile 'com.github.arimorty:floatingsearchview:2.1.1'
compile 'com.ss.bottomnavigation:bottomnavigation:1.5.2'
compile 'jp.wasabeef:glide-transformations:2.0.2'
compile 'junit:junit:4.12'
androidTestCompile 'com.android.support.test:runner:1.0.1'
androidTestCompile('com.android.support.test.espresso:espresso-core:3.0.1', {
exclude group: 'com.android.support', module: 'support-annotations'
})
and Your project level build.gradle file should not have those dependencies declared again.
just added this
configurations.all {
resolutionStrategy.force 'com.android.support:support-annotations:22.1.0'
}
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
this code of my build.gradle(moudule app)
apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion "25.0.3"
defaultConfig {
applicationId "com.example.hn.myapplication"
minSdkVersion 14
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'
})
//compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.android.support:appcompat-v7:25.+'
compile 'com.android.support:recyclerview-v7:25.+'
compile 'com.android.support:support-v4:25.+'
compile 'com.android.support:design:25.+'
//compile 'com.android.support.constraint:constraint-layout:1.0.0-alpha7'
compile 'com.android.support.constraint:constraint-layout:1.0.0'
testCompile 'junit:junit:4.12'
}
and this is my sdk tools.
I try compile 'com.android.support.constraint:constraint-layout:1.0.0-alpha7'
and compile 'com.android.support.constraint:constraint-layout:1.0.0'
and compile 'com.android.support.constraint:constraint-layout:1.+'
but not working. and error is
Failed to resolve: com.android.support.constraint:constraint-layout:1
who I solve this problem?
When I use compile 'com.android.support.constraint:constraint-layout:1.0.0-alpha7
this error done: install artifact and sync project
go to file -> setting -> sdk manager -> sdk tools -> then install google repository