Closed StevenStarz closed 7 years ago
This is not a Picasso problem but one with your build system. The Picasso classes are not being included in your APK. Try a clean build, check ProGuard, use APK analyzer to check for the classes, etc. If you still cannot figure it out then I suggest you try asking on StackOverflow. There's nothing specific to Picasso about the problem, only that Picasso happens to the be the library omitted.
@JakeWharton i already included the picasso, but is working fine on sdk 25, once i change to 26 is not working at all, and i already clean the project, and rebuild as your advice but still got same issue
for more information, this is my gradle file
`buildscript { repositories { maven { url 'https://maven.fabric.io/public' } }
dependencies {
classpath 'io.fabric.tools:gradle:1.+'
}
} //plugins { // id 'com.onesignal.androidsdk.onesignal-gradle-plugin' version '0.7.0' //} apply plugin: 'com.android.application' apply plugin: 'io.fabric' //apply plugin: 'com.onesignal.androidsdk.onesignal-gradle-plugin'
allprojects { repositories { jcenter() maven { url 'http://www.idescout.com/maven/repo/' } maven { url "http://dl.bintray.com/pt-midtrans/maven" } maven { url 'https://maven.fabric.io/public' } maven { url 'https://maven.google.com' } } } android { compileSdkVersion 26 buildToolsVersion "26.0.1" useLibrary 'org.apache.http.legacy' defaultConfig { multiDexEnabled true applicationId "compro.a99vr" minSdkVersion 19 targetSdkVersion 26 versionCode 1 versionName "1.0" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" manifestPlaceholders = [onesignal_app_id : "90639a02-3b5b-49f9-a1c7-0d3d320e8308", // Project number pulled from dashboard, local value is ignored. onesignal_google_project_number: "REMOTE"] } buildTypes { debug { // Disable fabric build ID generation for debug builds ext.enableCrashlytics = false } release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } // Define Merchant BASE URL and CLIENT KEY for each flavors productFlavors { sandbox { buildConfigField "String", "BASE_URL", "\"https://merchant-url-sandbox.com/\"" buildConfigField "String", "CLIENT_KEY", "\"VT-CLIENT-sandbox-client-key\"" } } }
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' }) // // change the version to latest one
compile files('libs/activation.jar')
compile files('libs/additionnal.jar')
compile files('libs/mail.jar')
compile('com.crashlytics.sdk.android:crashlytics:2.7.1@aar') {
transitive = true;
exclude module: 'gson'
}
compile 'com.android.support:appcompat-v7:26.1.+'
compile 'com.android.support:support-v4:26.1.+'
compile 'com.android.support:design:26.1.+'
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 'com.android.support:cardview-v7:26.1.+'
compile 'com.github.arimorty:floatingsearchview:2.1.1'
compile 'com.squareup.okhttp:okhttp:2.4.0'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.github.chrisbanes:PhotoView:1.2.6'
compile 'com.nineoldandroids:library:2.4.0'
compile 'me.himanshusoni.quantityview:quantity-view:1.2.0'
// compile 'com.idescout.sql:sqlscout-server:2.0' compile 'com.android.volley:volley:1.0.0' compile 'com.android.support:support-v13:21.0.3' compile 'com.github.bumptech.glide:glide:3.7.0' compile 'pl.droidsonroids.gif:android-gif-drawable:1.2.+' compile 'com.android.support:recyclerview-v7:21.0.0' compile 'com.daimajia.swipelayout:library:1.2.0@aar' compile 'com.andreabaccega:android-form-edittext:1.3.+' compile 'com.google.android.gms:play-services-maps:11.2.+' compile 'com.google.android.gms:play-services:11.2.+' compile 'com.midtrans:uikit:1.10.0-SANDBOX' compile 'com.miguelcatalan:materialsearchview:1.4.0' compile 'com.android.support.constraint:constraint-layout:1.0.0-alpha7' compile 'com.google.code.gson:gson:2.8.2' // compile 'com.onesignal:OneSignal:[3.6.0, 3.99.99]' // compile project(path: ':SearchView') compile project(path: ':SwipeableLayout') compile project(path: ':bottomsheet') testCompile 'junit:junit:4.12' }`
The fact that you didn't change anything with Picasso is evidence that this isn't a Picasso problem.
On Wed, Nov 1, 2017 at 11:59 AM StevenStarz notifications@github.com wrote:
@JakeWharton https://github.com/jakewharton i already included the picasso, but is working fine on sdk 25, once i change to 26 is not working at all, and i already clean the project, and rebuild but still got same issue
— You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub https://github.com/square/picasso/issues/1697#issuecomment-341150490, or mute the thread https://github.com/notifications/unsubscribe-auth/AAEEEZdzSK82mVP7BD8HvQmQoS72MCxyks5syJVugaJpZM4QOW_d .
Ok @JakeWharton i will try to figure out again, thanks for the advice
Process: compro.a99vr, PID: 8099 java.lang.NoClassDefFoundError: Failed resolution of: Lcom/squareup/picasso/Picasso; at id.co.compro.mobile.a99vr_application.MainActivity.initSideMenuData(MainActivity.java:129) at id.co.compro.mobile.a99vr_application.MainActivity.showHomePage(MainActivity.java:111) at id.co.compro.mobile.a99vr_application.MainActivity.onCreate(MainActivity.java:74) at android.app.Activity.performCreate(Activity.java:5990) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1106) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2311) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2420) at android.app.ActivityThread.access$900(ActivityThread.java:154) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1321) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:135) at android.app.ActivityThread.main(ActivityThread.java:5294) at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java:372) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:904) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:699) Caused by: java.lang.ClassNotFoundException: Didn't find class "com.squareup.picasso.Picasso" on path: DexPathList[[zip file "/data/app/compro.a99vr-1/base.apk", zip file "/data/app/compro.a99vr-1/split_lib_dependencies_apk.apk", zip file "/data/app/compro.a99vr-1/split_lib_slice_0_apk.apk", zip file "/data/app/compro.a99vr-1/split_lib_slice_1_apk.apk", zip file "/data/app/compro.a99vr-1/split_lib_slice_2_apk.apk", zip file "/data/app/compro.a99vr-1/split_lib_slice_3_apk.apk", zip file "/data/app/compro.a99vr-1/split_lib_slice_4_apk.apk", zip file "/data/app/compro.a99vr-1/split_lib_slice_5_apk.apk", zip file "/data/app/compro.a99vr-1/split_lib_slice_6_apk.apk", zip file "/data/app/compro.a99vr-1/split_lib_slice_7_apk.apk", zip file "/data/app/compro.a99vr-1/split_lib_slice_8_apk.apk", zip file "/data/app/compro.a99vr-1/split_lib_slice_9_apk.apk"],nativeLibraryDirectories=[/data/app/compro.a99vr-1/lib/arm, /vendor/lib, /system/lib]] at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56) at java.lang.ClassLoader.loadClass(ClassLoader.java:511) at java.lang.ClassLoader.loadClass(ClassLoader.java:469) at id.co.compro.mobile.a99vr_application.MainActivity.initSideMenuData(MainActivity.java:129) at id.co.compro.mobile.a99vr_application.MainActivity.showHomePage(MainActivity.java:111) at id.co.compro.mobile.a99vr_application.MainActivity.onCreate(MainActivity.java:74) at android.app.Activity.performCreate(Activity.java:5990) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1106) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2311) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2420) at android.app.ActivityThread.access$900(ActivityThread.java:154) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1321) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:135) at android.app.ActivityThread.main(ActivityThread.java:5294) at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java:372) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:904) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:699) Suppressed: java.lang.ClassNotFoundException: com.squareup.picasso.Picasso at java.lang.Class.classForName(Native Method) at java.lang.BootClassLoader.findClass(ClassLoader.java:781) at java.lang.BootClassLoader.loadClass(ClassLoader.java:841) at java.lang.ClassLoader.loadClass(ClassLoader.java:504) ... 17 more Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack available``