I am getting the below error while compiling my android project for emulator v4.1.1. I am not able to generate an apk as well. Below is the error and my gradle file.
Error:Execution failed for task ':app:transformClassesWithJarMergingForDebug'.
com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: org/objectweb/asm/AnnotationVisitor.class
apply plugin: 'com.android.application'
android {
packagingOptions {
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/NOTICE'
exclude 'META-INF/LICENSE'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/BCKEY.DSA'
exclude 'AUTHORS'
exclude 'META-INF/services/javax.annotation.processing.Processor'
exclude 'META-INF/BCKEY.SF'
pickFirst 'META-INF/maven/com.google.guava/guava/pom.properties'
pickFirst 'META-INF/maven/com.google.guava/guava/pom.xml'
pickFirst 'META-INF/maven/net.minidev/accessors-smart/pom.properties'
pickFirst 'META-INF/maven/net.minidev/accessors-smart/pom.xml'
}
signingConfigs {
config {
keyAlias '********'
keyPassword '********'
storeFile file('C:/Users/Prasang/Downloads/***/****.jks')
storePassword '********'
}
}
compileSdkVersion 23
buildToolsVersion "23.0.3"
defaultConfig {
applicationId "com.**********"
minSdkVersion 15
targetSdkVersion 23
versionCode 7
versionName "7.0"
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'),
'proguard-rules.pro'
}
}
dexOptions {
incremental = true;
preDexLibraries = false
javaMaxHeapSize "4g"
}
repositories {
jcenter()
maven { url "https://jitpack.io" }
mavenCentral()}
dependencies {
// compile 'net.minidev:json-smart:2.2'
testCompile 'junit:junit:4.12'
compile files('libs/red5streaming.jar')
compile files('libs/mina-core-2.0.7.jar')
//compile 'fm.jiecao:jiecaovideoplayer:3.4'
compile fileTree(include: ['*.jar'], dir: 'libs')
compile fileTree(include: ['*.java'], dir: 'libs')
compile fileTree(include: ['*.so'], dir: 'libs')
//compile files('libs/red5pro-1.0.2.jar')
// compile 'me.yifeiyuan.periscopelayout:library:1.0.0'
compile 'com.parse:parse-android:1.10.3'
compile 'com.miguelcatalan:materialsearchview:1.4.0'
//compile 'com.android.support:appcompat-v7:24.0.0'
compile 'com.android.support:design:24.0.0'
compile 'com.facebook.android:facebook-android-sdk:4.4.0'
compile 'com.koushikdutta.ion:ion:2.+'
compile 'com.wrapp.floatlabelededittext:library:0.0.6'
compile 'com.android.support:cardview-v7:24.0.0'
compile 'com.android.support:recyclerview-v7:24.0.0'
compile 'com.makeramen:roundedimageview:2.2.1'
compile 'com.squareup.picasso:picasso:2.5.0'
compile 'com.mcxiaoke.volley:library-aar:1.0.0'
compile 'com.github.orangegangsters:swipy:1.2.1#aar'
compile 'com.rengwuxian.materialedittext:library:2.1.4'
compile 'com.mikhaellopez:circularimageview:3.0.2'
compile 'com.github.afollestad.material-dialogs:core:0.8.5.6#aar'
// compile 'com.android.support:support-v4:24.0.0'
compile 'com.github.rtoshiro.fullscreenvideoview:fullscreenvideoview:1.1.0'
compile 'org.apache.commons:commons-lang3:3.0'
compile 'com.github.jd-alexander:LikeButton:0.1.8'
compile 'com.google.android.gms:play-services:9.0.2'
compile 'com.github.kanytu:android-parallax-recyclerview:v1.7'
compile 'com.android.support:multidex:1.0.0'
compile 'com.android.support:percent:23.2.0'
compile 'com.google.android.gms:play-services-ads:9.0.2'
compile 'com.google.android.gms:play-services-auth:9.0.2'
compile 'com.google.android.gms:play-services-gcm:9.0.2'
compile 'com.google.gms:google-services:2.0.0-alpha6'
}
apply plugin: 'com.google.gms.google-services'}
probably confict in google-play-services
remove this
compile 'com.google.android.gms:play-services:9.0.2'
and left only this part
compile 'com.google.android.gms:play-services-ads:9.0.2' compile
'com.google.android.gms:play-services-auth:9.0.2' compile
'com.google.android.gms:play-services-gcm:9.0.2'
Also try to clean/rebuild your project
Related
I have a project with Room Daatbase management. But I had the following runtime error when executing the aplication in my cellphone with android 4.4.2 :
java.lang.NoClassDefFoundError: android.arch.persistence.room.RoomDatabase$MigrationContainer
at android.arch.persistence.room.RoomDatabase$Builder.<init>(RoomDatabase.java:332)
at android.arch.persistence.room.Room.databaseBuilder(Room.java:55)
at com.jangapp.red.consumidores.App.onCreate(App.java:72)
at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1009)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4638)
at android.app.ActivityThread.access$1800(ActivityThread.java:141)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1301)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5342)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:871)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:687)
at dalvik.system.NativeStart.main(Native Method)
Here is my graddle configuration
apply plugin: 'com.android.application'
apply plugin: 'com.apollographql.android'
android {
compileSdkVersion 27
buildToolsVersion "26.0.2"
useLibrary 'org.apache.http.legacy'
defaultConfig {
applicationId "..."
minSdkVersion 17
targetSdkVersion 27
versionCode 1
versionName "1.3"
multiDexEnabled true
}
buildTypes {
debug {
minifyEnabled false
useProguard false
}
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
packagingOptions {
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/LICENSE'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/license.txt'
exclude 'META-INF/NOTICE'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/notice.txt'
exclude 'META-INF/ASL2.0'
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile group: 'org.apache.httpcomponents', name: 'httpclient', version: '4.5.3'
compile 'com.android.support.constraint:constraint-layout:1.0.0-alpha7'
compile 'com.android.support:appcompat-v7:27.0.1'
compile 'com.android.support:design:27.0.1'
compile 'com.android.support:cardview-v7:27.0.1'
compile 'com.android.support:support-v4:27.0.1'
compile 'com.mcxiaoke.volley:library-aar:1.0.0'
implementation '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-places:11.0.4'
compile 'com.github.delight-im:Android-SimpleLocation:v1.0.1'
compile 'com.apollographql.apollo:apollo-runtime:0.5.0'
compile 'com.apollographql.apollo:apollo-android-support:0.5.0'
compile 'com.apollographql.apollo:apollo-rx2-support:0.5.0'
compile 'com.apollographql.apollo:apollo-http-cache:0.5.0'
compile 'com.squareup.okhttp3:logging-interceptor:3.8.1'
compile 'io.reactivex.rxjava2:rxandroid:2.0.1'
compile 'io.reactivex.rxjava2:rxjava:2.1.0'
compile 'com.orhanobut:hawk:2.0.1'
compile 'com.github.reinaldoarrosi:maskededittext:1.1.0'
implementation 'com.github.MAXDeliveryNG:slideview:1.1.0'
compile 'com.github.TR4Android:Swipeable-RecyclerView:0.2.0'
compile 'com.github.k0shk0sh:RetainedDateTimePickers:1.0.2'
compile 'android.arch.persistence.room:runtime:1.0.0'
annotationProcessor 'android.arch.persistence.room:compiler:1.0.0'
compile 'com.valdesekamdem.library:md-toast:0.9.0'
compile 'me.leolin:ShortcutBadger:1.1.21#aar'
compile 'com.github.minibugdev:drawablebadge:1.0.3'
compile 'com.android.support:multidex:1.0.3'
compile 'com.google.code.gson:gson:2.7'
compile 'com.squareup.retrofit2:retrofit:2.2.0'
compile 'com.squareup.retrofit2:converter-gson:2.2.0'
compile 'com.fxn769:pix:1.0.5'
compile 'id.zelory:compressor:2.1.0'
}
and
buildscript {
repositories {
//google()
jcenter()
maven { url 'https://maven.google.com' }
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.1'
classpath 'com.apollographql.apollo:apollo-gradle-plugin:0.5.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
maven { url 'https://maven.google.com' }
jcenter()
maven { url 'https://jitpack.io' }
}
}
I had search alot trying to find the solution but seems like
nobody had this error.
How can I fix this runtime error?
I'm trying to build my release apk and Android Stdio gives me error. I cleaned and built the project multiple times but the error is still there. Multidex is enabled in build.gradle file and I also use Proguard to shrink the code. None of the solutions worked for me.
Error:Execution failed for task ':app:transformClassesWithDexForRelease'.
Error:Execution failed for task ':app:transformClassesWithDexForRelease'.
com.android.build.api.transform.TransformException:
com.android.ide.common.process.ProcessException:
java.util.concurrent.ExecutionException:
com.android.ide.common.process.ProcessException: Error while executing java
process with main class com.android.dx.command.Main with arguments {--dex --num-threads=4 --multi-dex --main-dex-list C:\Users\azats\Desktop\App\app\build\intermediates\multi-dex\release\maindexlist.txt --output C:\Users\azats\Desktop\App\app\build\intermediates\transforms\dex\release\folders\1000\1f\main C:\Users\azats\Desktop\App\app\build\intermediates\transforms\jarMerging\release\jars\1\1f\combined.jar}
This is my gradle file
apply plugin: 'com.android.application'
apply plugin: 'me.tatarka.retrolambda'
android {
signingConfigs {
config {
keyAlias 'key1'
keyPassword 'torres1984'
storeFile file('C:/Users/azats/Desktop/release-keystore.jks')
storePassword 'aniki1995'
}
}
compileSdkVersion 25
buildToolsVersion "25.0.2"
defaultConfig {
applicationId "com.makeuprewardz.app"
minSdkVersion 16
targetSdkVersion 25
versionCode 4
versionName "4.0"
multiDexEnabled true
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
signingConfig signingConfigs.config
}
}
dexOptions {
javaMaxHeapSize "2g"
preDexLibraries = false
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
packagingOptions {
exclude 'META-INF/ASL2.0'
exclude 'META-INF/LICENSE'
exclude 'META-INF/NOTICE'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/MANIFEST.MF'
}
}
repositories {
mavenCentral()
maven { url "https://bitbucket.org/adscend/androidsdk/raw/master/" }
maven { url "https://jitpack.io" }
jcenter()
flatDir {
dirs 'libs'
}
}
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:design:25.3.1'
compile 'com.android.support:cardview-v7:25.3.1'
compile 'com.android.support:recyclerview-v7:25.3.1'
compile 'com.android.support:multidex:1.0.1'
compile 'com.github.medyo:fancybuttons:1.8.3'
compile 'com.google.code.gson:gson:2.8.0'
compile 'me.yokeyword:fragmentation:0.10.4'
compile 'com.github.bumptech.glide:glide:3.7.0'
compile 'jp.wasabeef:glide-transformations:2.0.2'
compile 'com.afollestad.material-dialogs:core:0.9.4.4'
compile 'com.jakewharton:butterknife:8.5.1'
compile 'com.jude:easyrecyclerview:4.4.0'
compile 'com.github.GrenderG:Toasty:1.1.3'
compile 'com.github.medyo:android-about-page:1.2'
compile 'com.google.firebase:firebase-auth:11.0.1'
compile 'com.google.android.gms:play-services-auth:11.0.1'
compile 'com.google.android.gms:play-services-iid:11.0.1'
compile 'com.google.android.gms:play-services-ads:11.0.1'
compile 'com.google.firebase:firebase-database:11.0.1'
compile 'com.google.firebase:firebase-storage:11.0.1'
compile 'com.google.firebase:firebase-ads:11.0.1'
compile 'com.github.lygttpod:SuperTextView:1.1.2'
compile 'com.brucetoo.pickview:library:1.2.3'
compile 'com.zhihu.android:matisse:0.4.3'
compile 'me.weyye.hipermission:library:1.0.3'
compile 'de.hdodenhof:circleimageview:2.1.0'
compile 'org.greenrobot:eventbus:3.0.0'
compile 'com.squareup.okio:okio:1.12.0'
compile 'com.squareup.okhttp3:okhttp:3.7.0'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.facebook.network.connectionclass:connectionclass:1.0.1'
compile 'com.facebook.android:audience-network-sdk:4.21.1'
compile 'com.google.android.gms:play-services-basement:11.0.1'
compile 'com.google.android.gms:play-services-location:11.0.1'
compile 'io.github.kobakei:ratethisapp:1.2.0'
compile 'com.kyleduo.switchbutton:library:1.4.6'
compile 'com.facebook.android:facebook-android-sdk:[4,5)'
compile 'com.adscendmedia.sdk:adscendmedia:2.3.2'
compile 'com.pollfish:pollfish:+:googleplayRelease#aar'
compile(name: 'OfferToroSdk-v3.1.3', ext: 'aar')
compile(name: 'adgatemediasdk', ext: 'aar')
testCompile 'junit:junit:4.12'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.5.1'
compile files('libs/SuperRewards-3.1b.jar')
}
configurations.all {
resolutionStrategy.eachDependency { DependencyResolveDetails details ->
def requested = details.requested
if (requested.group == 'com.android.support') {
if (!requested.name.startsWith("multidex")) {
details.useVersion '25.3.1'
}
}
}
}
apply plugin: 'com.google.gms.google-services'
May be you have added some of the dependence more than once just go through your dependencies.
I have found one of them is
SuperRewards-3.1b.jar
you are using
compile fileTree(include: ['*.jar'], dir: 'libs')
then not need to add this
compile files('libs/SuperRewards-3.1b.jar')
Remove this compile files('libs/SuperRewards-3.1b.jar') line from your dependence because compile fileTree(include: ['*.jar'], dir: 'libs') will automatically add that lib.
I am integrating MOPUB ADs in application. I am following MOPUB SDK integration steps from https://www.mopub.com/resources/docs/android-sdk-integration/android-getting-started/
After adding mopub-volley-1.1.0.jar, I got following error.
Error:Execution failed for task ':app:transformClassesWithJarMergingForDebug'. com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: com/mopub/volley/AuthFailureError.class
My build.gradle code is
apply plugin: 'com.android.application'
android {
compileSdkVersion 24
buildToolsVersion '24.0.1'
defaultConfig {
multiDexEnabled true
applicationId "com.mopubdemo.android"
minSdkVersion 16
targetSdkVersion 24
versionCode 27
versionName '2.05'
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
packagingOptions {
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/NOTICE'
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/LICENSE'
exclude 'META-INF/DEPENDENCIES.txt'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/notice.txt'
exclude 'META-INF/license.txt'
exclude 'META-INF/dependencies.txt'
exclude 'META-INF/LGPL2.1'
exclude 'META-INF/plexus/components.xml'
}
}
dependencies {
compile files('libs/universal-image-loader-1.9.3.jar')
compile files('libs/FlurryAnalytics-6.2.0.jar')
compile files('libs/acra-4.6.1.jar')
compile project(':mopub-sdk:mopub-sdk-native-video')
compile project(':mopub-sdk:mopub-sdk-native-static')
compile project(':mopub-sdk:mopub-sdk-banner')
compile project(':mopub-sdk:mopub-sdk-rewardedvideo')
compile project(':mopub-sdk')
compile project(':mopub-sdk:mopub-sdk-interstitial')
androidTestCompile 'junit:junit:4.12'
compile 'com.android.support:multidex:1.0.1'
compile 'com.github.johnkil.android-robototextview:robototextview:2.4.2'
compile 'com.google.code.gson:gson:2.4'
compile 'com.rengwuxian.materialedittext:library:2.1.4'
compile 'com.nhaarman.listviewanimations:lib-core:3.1.0#aar'
compile 'com.nhaarman.listviewanimations:lib-manipulation:3.1.0#aar'
compile 'com.nhaarman.listviewanimations:lib-core-slh:3.1.0#aar'
compile 'org.ocpsoft.prettytime:prettytime:4.0.0.Final'
compile 'com.koushikdutta.ion:ion:2.1.6'
compile 'pub.devrel:easypermissions:0.1.5'
compile 'com.android.support:appcompat-v7:24.2.1'
compile 'com.android.support:cardview-v7:24.1.1'
compile 'com.android.support:support-v4:24.1.1'
compile 'com.android.support:recyclerview-v7:24.1.1'
compile 'com.android.support:support-annotations:24.1.1'
compile 'com.google.android.gms:play-services:10.2.1'
compile files('libs/mopub-volley-1.1.0.jar')
}
Remove this line and then sync
compile files('libs/mopub-volley-1.1.0.jar')
I'm currently using Android studio 2.3, and having error when deploying py project to Kitkat devices, i did several approach explained from here but the error as bellow still happen.
E/UncaughtException: java.lang.NoClassDefFoundError: Failed resolution
of: Lokhttp3/OkHttpClient$Builder;
and..
Caused by: java.lang.ClassNotFoundException: Didn't find class "okhttp3.OkHttpClient$Builder" on path: DexPathList[[zip file "/data/app/com.mobile.myapp-2/base.apk", zip file "/data/app/com.mobile.myapp-2/split_lib_dependencies_apk.apk", zip file "/data/app/com.mobile.myapp-2/split_lib_slice_0_apk.apk", zip file "/data/app/com.mobile.myapp-2/split_lib_slice_1_apk.apk", zip file "/data/app/com.mobile.myapp-2/split_lib_slice_2_apk.apk", zip file "/data/app/com.mobile.myapp-2/split_lib_slice_3_apk.apk", zip file "/data/app/com.mobile.myapp-2/split_lib_slice_4_apk.apk", zip file "/data/app/com.mobile.myapp-2/split_lib_slice_5_apk.apk", zip file "/data/app/com.mobile.myapp-2/split_lib_slice_6_apk.apk", zip file "/data/app/com.mobile.myapp-2/split_lib_slice_7_apk.apk", zip file "/data/app/com.mobile.myapp-2/split_lib_slice_8_apk.apk", zip file "/data/app/com.mobile.myapp-2/split_lib_slice_9_apk.apk"],nativeLibraryDirectories=[/data/app/com.mobile.myapp-2/lib/x86, /vendor/lib, /system/lib]]
here is my build.gradle
apply plugin: 'com.android.application'
android {
signingConfigs {
config {
keyAlias 'myappkey'
keyPassword 'myapppass'
storeFile file('D:/myapp.jks')
storePassword 'myapppass'
}
}
compileSdkVersion 25
buildToolsVersion "25.0.2"
defaultConfig {
applicationId "com.my.app.mobile"
minSdkVersion 21
targetSdkVersion 25
versionCode 6
versionName "1.1.3"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" multiDexEnabled true
}
productFlavors {
dev {
minSdkVersion 21
}
prod {
minSdkVersion 21
multiDexEnabled true
}
}
dexOptions {
javaMaxHeapSize "4g"
}
buildTypes {
debug {
minifyEnabled false
useProguard true
proguardFile 'proguard-project.txt'
proguardFiles getDefaultProguardFile('proguard-android.txt'),
'proguard-rules.pro'
}
release {
minifyEnabled false
// useProguard false
// multiDexKeepProguard 'multidex-config.pro'
shrinkResources false
zipAlignEnabled true
debuggable false
proguardFile 'proguard-project.txt'
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
packagingOptions {
exclude 'META-INF/LICENSE'
exclude 'META-INF/LICENSE-FIREBASE.txt'
exclude 'META-INF/NOTICE'
exclude 'META-INF/services/javax.annotation.processing.Processor'
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/NOTICE.txt'
}
}
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.h6ah4i.android.widget.advrecyclerview:advrecyclerview:0.10.2#aar') {
transitive = true
}
compile('com.github.florent37:materialviewpager:1.2.0#aar') {
transitive = true
}
compile 'com.squareup.okio:okio:1.7.0'
compile 'com.squareup.okhttp3:logging-interceptor:3.5.0'
compile 'com.squareup.okhttp3:okhttp:3.5.0'
compile 'com.squareup.retrofit2:retrofit:2.1.0'
compile 'com.squareup.retrofit2:converter-gson:2.0.0'
compile 'com.mikepenz:iconics-core:2.8.1#aar'
compile 'com.mikepenz:crossfadedrawerlayout:1.0.0#aar'
compile 'com.mikepenz:fontawesome-typeface:4.7.0.0#aar'
compile 'com.mikepenz:google-material-typeface:2.2.0.3.original#aar'
compile 'com.mikepenz:fastadapter:2.1.5#aar'
compile 'com.nhaarman.listviewanimations:lib-core:3.1.0'
compile 'com.nhaarman.listviewanimations:lib-manipulation:3.1.0'
compile 'com.squareup:otto:1.3.8'
compile 'com.android.support:cardview-v7:25.1.1'
compile 'com.github.clans:fab:1.6.4'
compile 'com.android.support:support-v4:25.1.1'
compile 'com.jpardogo.materialtabstrip:library:1.1.1'
compile 'com.jakewharton:butterknife:8.4.0'
compile 'com.readystatesoftware.systembartint:systembartint:1.0.3'
compile 'com.rengwuxian.materialedittext:library:2.1.4'
compile 'com.github.rey5137:material:1.2.4'
compile 'com.weiwangcn.betterspinner:library-material:1.1.0'
compile 'com.github.ganfra:material-spinner:1.1.1'
compile 'com.splitwise:tokenautocomplete:2.0.8#aar'
compile 'com.google.android.gms:play-services:10.2.0'
compile 'com.melnykov:floatingactionbutton:1.0.7'
compile 'com.cjj.materialrefeshlayout:library:1.3.0'
compile 'com.theartofdev.edmodo:android-image-cropper:1.2.6'
compile 'com.afollestad.material-dialogs:core:0.9.2.3'
compile 'com.orhanobut:hawk:2.0.1'
compile 'com.android.support:multidex:1.0.1'
compile 'com.google.firebase:firebase-messaging:10.0.1'
compile 'com.google.firebase:firebase-ads:9.0.2'
compile 'com.nononsenseapps:filepicker:4.0.0'
compile 'com.google.firebase:firebase-core:10.2.0'
compile 'com.google.firebase:firebase-crash:10.0.1'
compile 'com.amulyakhare:com.amulyakhare.textdrawable:1.0.1'
testCompile 'junit:junit:4.12'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.4.0'
compile 'com.miguelcatalan:materialsearchview:1.4.0'
}
apply plugin: 'com.google.gms.google-services'
apply plugin: 'com.google.firebase.firebase-crash'
I had another post earlier about my project having a class not found exception for IOUtils. I fixed that, and now my project is crashing again.
Previous post: Android class not found when running on some devices but not on others
Giving me this stack trace now:
java.lang.NoClassDefFoundError: com.readystatesoftware.sqliteasset.Utils
at com.readystatesoftware.sqliteasset.SQLiteAssetHelper.copyDatabaseFromAssets(SQLiteAssetHelper.java:455)
at com.readystatesoftware.sqliteasset.SQLiteAssetHelper.createOrOpenDatabase(SQLiteAssetHelper.java:400)
at com.readystatesoftware.sqliteasset.SQLiteAssetHelper.getWritableDatabase(SQLiteAssetHelper.java:176)
at com.testing.data.AppDatabase.<init>(AppDatabase.java:87)
at com.testing.data.AppDatabase.getInstance(AppDatabase.java:70)
It works when I try to run it on my tablet, and it crashes when I try to run it on my phone:
Here is the setup:
Android versions:
`Phone: 4.4.2`
`Tablet: 5.1.1`
SDK Setup:
`compileSdkVersion: 25`
`minSdkVersion: 15`
`targetSdkVersion: 24`
Could there possibly something conflicting? Seems unlikely, but they are both Util classes that are not being found.
Grade as requested:
apply plugin: 'com.android.application'
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile project(':volley')
compile group: 'commons-io', name: 'commons-io', version: '2.5'
compile 'com.android.support:appcompat-v7:25.0.0'
compile 'com.android.support:design:25.0.0'
compile 'com.android.support:support-v4:25.0.0'
compile 'com.android.support:recyclerview-v7:25.0.0'
compile 'com.google.android.gms:play-services:8.3.0'
compile 'com.google.android.gms:play-services-maps:8.3.0'
compile 'com.google.maps.android:android-maps-utils:0.3.+'
compile 'com.qozix:tileview:2.2.3'
compile 'com.facebook.android:facebook-android-sdk:4.7.0'
compile 'org.twitter4j:twitter4j-core:4.0.4'
compile 'com.readystatesoftware.sqliteasset:sqliteassethelper:+'
compile 'info.hoang8f:android-segmented:1.0.5'
}
android {
compileSdkVersion 25
buildToolsVersion "25.0.0"
defaultConfig {
applicationId "com.testing.base"
minSdkVersion 15
targetSdkVersion 25
versionCode 1
versionName "1.0.0"
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
dexOptions {
javaMaxHeapSize "4g"
}
packagingOptions {
exclude 'META-INF/DEPENDENCIES.txt'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/NOTICE'
exclude 'META-INF/LICENSE'
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/notice.txt'
exclude 'META-INF/license.txt'
exclude 'META-INF/dependencies.txt'
exclude 'META-INF/LGPL2.1'
}
}
repositories {
mavenCentral()
}