1

estuve buscando alguna libreria que pudiese ayudarme con google directions, encontre esta, mi problema es que al momento de compilarla, tengo problemas con la libreria de picasso, sin ni siquiera agregar codigo, dejo el logatcat:

05-09 23:40:57.983 8028-8028/com.ciclomapp.ciclomapp.ciclomapp E/UncaughtException: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/squareup/picasso/Picasso;
                                                                                        at com.ciclomapp.ciclomapp.ciclomapp.MainActivity.onCreate(MainActivity.java:147)
                                                                                        at android.app.Activity.performCreate(Activity.java:5990)
                                                                                        at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1106)
                                                                                        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2332)
                                                                                        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2442)
                                                                                        at android.app.ActivityThread.access$800(ActivityThread.java:156)
                                                                                        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1351)
                                                                                        at android.os.Handler.dispatchMessage(Handler.java:102)
                                                                                        at android.os.Looper.loop(Looper.java:211)
                                                                                        at android.app.ActivityThread.main(ActivityThread.java:5371)
                                                                                        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:945)
                                                                                        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:740)
                                                                                     Caused by: java.lang.ClassNotFoundException: Didn't find class "com.squareup.picasso.Picasso" on path: DexPathList[[zip file "/data/app/com.ciclomapp.ciclomapp.ciclomapp-1/base.apk", zip file "/data/app/com.ciclomapp.ciclomapp.ciclomapp-1/split_lib_dependencies_apk.apk", zip file "/data/app/com.ciclomapp.ciclomapp.ciclomapp-1/split_lib_slice_0_apk.apk", zip file "/data/app/com.ciclomapp.ciclomapp.ciclomapp-1/split_lib_slice_1_apk.apk", zip file "/data/app/com.ciclomapp.ciclomapp.ciclomapp-1/split_lib_slice_2_apk.apk", zip file "/data/app/com.ciclomapp.ciclomapp.ciclomapp-1/split_lib_slice_3_apk.apk", zip file "/data/app/com.ciclomapp.ciclomapp.ciclomapp-1/split_lib_slice_4_apk.apk", zip file "/data/app/com.ciclomapp.ciclomapp.ciclomapp-1/split_lib_slice_5_apk.apk", zip file "/data/app/com.ciclomapp.ciclomapp.ciclomapp-1/split_lib_slice_6_apk.apk", zip file "/data/app/com.ciclomapp.ciclomapp.ciclomapp-1/split_lib_slice_7_apk.apk", zip file "/data/app/com.ciclomapp.ciclomapp.ciclomapp-1/split_lib_slice_8_apk.apk", zip file "/data/app/com.ciclomapp.ciclomapp.ciclomapp-1/split_lib_slice_9_apk.apk"],nativeLibraryDirectories=[/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 com.ciclomapp.ciclomapp.ciclomapp.MainActivity.onCreate(MainActivity.java:147) 
                                                                                        at android.app.Activity.performCreate(Activity.java:5990) 
                                                                                        at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1106) 
                                                                                        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2332) 
                                                                                        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2442) 
                                                                                        at android.app.ActivityThread.access$800(ActivityThread.java:156) 
                                                                                        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1351) 
                                                                                        at android.os.Handler.dispatchMessage(Handler.java:102) 
                                                                                        at android.os.Looper.loop(Looper.java:211) 
                                                                                        at android.app.ActivityThread.main(ActivityThread.java:5371) 
                                                                                        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:945) 
                                                                                        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:740) 
                                                                                        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)
                                                                                                ... 15 more
                                                                                     Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack available
05-09 23:40:57.992 8028-8222/com.ciclomapp.ciclomapp.ciclomapp D/FA: Logging event (FE): _ae, Bundle[{_o=crash, timestamp=1494384057984, fatal=1}]
05-09 23:40:58.396 8028-8028/com.ciclomapp.ciclomapp.ciclomapp E/AndroidRuntime: FATAL EXCEPTION: main
                                                                                 Process: com.ciclomapp.ciclomapp.ciclomapp, PID: 8028
                                                                                 java.lang.NoClassDefFoundError: Failed resolution of: Lcom/squareup/picasso/Picasso;
                                                                                     at com.ciclomapp.ciclomapp.ciclomapp.MainActivity.onCreate(MainActivity.java:147)
                                                                                     at android.app.Activity.performCreate(Activity.java:5990)
                                                                                     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1106)
                                                                                     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2332)
                                                                                     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2442)
                                                                                     at android.app.ActivityThread.access$800(ActivityThread.java:156)
                                                                                     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1351)
                                                                                     at android.os.Handler.dispatchMessage(Handler.java:102)
                                                                                     at android.os.Looper.loop(Looper.java:211)
                                                                                     at android.app.ActivityThread.main(ActivityThread.java:5371)
                                                                                     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:945)
                                                                                     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:740)
                                                                                  Caused by: java.lang.ClassNotFoundException: Didn't find class "com.squareup.picasso.Picasso" on path: DexPathList[[zip file "/data/app/com.ciclomapp.ciclomapp.ciclomapp-1/base.apk", zip file "/data/app/com.ciclomapp.ciclomapp.ciclomapp-1/split_lib_dependencies_apk.apk", zip file "/data/app/com.ciclomapp.ciclomapp.ciclomapp-1/split_lib_slice_0_apk.apk", zip file "/data/app/com.ciclomapp.ciclomapp.ciclomapp-1/split_lib_slice_1_apk.apk", zip file "/data/app/com.ciclomapp.ciclomapp.ciclomapp-1/split_lib_slice_2_apk.apk", zip file "/data/app/com.ciclomapp.ciclomapp.ciclomapp-1/split_lib_slice_3_apk.apk", zip file "/data/app/com.ciclomapp.ciclomapp.ciclomapp-1/split_lib_slice_4_apk.apk", zip file "/data/app/com.ciclomapp.ciclomapp.ciclomapp-1/split_lib_slice_5_apk.apk", zip file "/data/app/com.ciclomapp.ciclomapp.ciclomapp-1/split_lib_slice_6_apk.apk", zip file "/data/app/com.ciclomapp.ciclomapp.ciclomapp-1/split_lib_slice_7_apk.apk", zip file "/data/app/com.ciclomapp.ciclomapp.ciclomapp-1/split_lib_slice_8_apk.apk", zip file "/data/app/com.ciclomapp.ciclomapp.ciclomapp-1/split_lib_slice_9_apk.apk"],nativeLibraryDirectories=[/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 com.ciclomapp.ciclomapp.ciclomapp.MainActivity.onCreate(MainActivity.java:147) 
                                                                                     at android.app.Activity.performCreate(Activity.java:5990) 
                                                                                     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1106) 
                                                                                     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2332) 
                                                                                     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2442) 
                                                                                     at android.app.ActivityThread.access$800(ActivityThread.java:156) 
                                                                                     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1351) 
                                                                                     at android.os.Handler.dispatchMessage(Handler.java:102) 
                                                                                     at android.os.Looper.loop(Looper.java:211) 
                                                                                     at android.app.ActivityThread.main(ActivityThread.java:5371) 
                                                                                     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:945) 
                                                                                     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:740) 
                                                                                    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)
                                                                                            ... 15 more
                                                                                  Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack available

dentro de la pagina, entrega codigo para el proguard, este es mi proguard actualmente:

# Add project specific ProGuard rules here.
# By default, the flags in this file are appended to flags specified
# in C:\Users\Javier\AppData\Local\Android\Sdk/tools/proguard/proguard-android.txt
# You can edit the include path and order by changing the proguardFiles
# directive in build.gradle.
#
# For more details, see
#   http://developer.android.com/guide/developing/tools/proguard.html

# Add any project specific keep options here:

# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
#   public *;
#}
-keep class com.akexorcist.** { ; }
-keep interface com.akexorcist.* { *; }
-keep class com.google.android.gms.maps.** { ; }
-keep interface com.google.android.gms.maps.* { *; }
-dontwarn retrofit2.**
-keep class retrofit2.** { *; }
-keepattributes Signature
-keepattributes Exceptions
-keepclasseswithmembers class * {
    @retrofit2.http.* <methods>;
-keep class com.akexorcist.googledirection.** { *; }
-keep class com.squareup.okhttp.** { *; }
-keep interface com.squareup.okhttp.** { *; }
-keep class retrofit.** { *; }
-keepclasseswithmembers class * {
@retrofit.http.* <methods>;
}
-dontwarn com.squareup.okhttp.**
-dontwarn rx.**
-dontwarn retrofit2.**
-dontwarn okio.**

espero puedan ayudarme, encontre la libreria mediante una referencia del foro en ingles.

edit: agrego el gradle como me lo solicitaron

apply plugin: 'com.android.application'

android {
    dexOptions {
        javaMaxHeapSize "4g"
    }
    signingConfigs {
        Firma {
            keyAlias 'androiddebugkey'
            keyPassword 'android'
            storeFile file('C:/Users/javie/.android/debug.keystore')
            storePassword 'android'
        }
    }
    compileSdkVersion 25
    buildToolsVersion "25.0.2"
    defaultConfig {
        applicationId "com.ciclomapp.ciclomapp.ciclomapp"
        minSdkVersion 18
        targetSdkVersion 20
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
        signingConfig signingConfigs.Firma
        multiDexEnabled true
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
            debuggable true
        }
        debug {
            signingConfig signingConfigs.Firma
        }
    }
    productFlavors {
    }
}
allprojects {
    repositories {
        maven { url 'https://jitpack.io' }
    }
}

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('de.keyboardsurfer.android.widget:crouton:1.8.5@aar') {
        exclude group: 'com.google.android', module: 'support-v4'
    }
    compile project(':jtds-1.3.1')
    compile 'com.google.android.gms:play-services-auth:10.2.0'
    compile 'com.github.rey5137:material:1.2.2'
    compile 'com.google.android.gms:play-services-auth:10.2.0'
    compile 'com.github.rey5137:material:1.2.2'
    compile 'com.android.support:appcompat-v7:25.3.0'
    compile 'com.google.android.gms:play-services:10.2.0'
    compile 'com.android.support:design:25.3.0'
    compile 'com.android.support:support-v4:25.3.0'
    compile 'com.facebook.android:facebook-android-sdk:[4,5)'
    compile 'com.scottyab:aescrypt:0.0.1'
    compile 'com.google.android.gms:play-services-maps:10.2.0'
    compile 'com.google.firebase:firebase-core:9.6.1'
    compile 'com.google.firebase:firebase-auth:10.0.1'
    compile 'com.google.firebase:firebase-messaging:9.6.1'
    compile 'com.squareup.picasso:picasso:2.5.2'
    compile 'com.github.SubhrajyotiSen:library:1.1.1'
    compile 'de.hdodenhof:circleimageview:2.1.0'
    compile 'com.android.support:multidex:1.0.1'
    compile 'com.google.maps.android:android-maps-utils:0.4.+'
    compile 'com.github.delight-im:Android-SimpleLocation:v1.0.1'
    compile 'com.synnapps:carouselview:0.0.10'
    compile 'com.github.dmytrodanylyk.circular-progress-button:library:1.1.3'
    compile 'com.alexzh:circleimageview:1.1.2@aar'
    compile 'com.mikhaellopez:circularimageview:2.0.1'
    compile 'com.sdsmdg.tastytoast:tastytoast:0.1.1'
    compile 'com.makeramen:roundedimageview:2.2.1'
    compile 'com.github.nguyenhoanglam:ImagePicker:1.1.3'
    compile 'com.afollestad.material-dialogs:commons:0.9.4.2'
    compile 'com.afollestad.material-dialogs:core:0.9.4.2'
    compile 'com.code-troopers.betterpickers:library:3.1.0'
    compile 'com.google.firebase:firebase-storage:10.0.1'
    compile 'com.github.SilenceDut:ExpandableLayout:1.2.0'
    compile 'com.github.kenglxn.QRGen:android:2.2.0'
    compile 'com.android.support.constraint:constraint-layout:1.0.2'
    compile 'com.getbase:floatingactionbutton:1.10.1'
    compile 'com.akexorcist:googledirectionlibrary:1.0.4'
    testCompile 'junit:junit:4.12'
}
apply plugin: 'com.google.gms.google-services'.
2
  • Y si subes tu graddle? Commented el 10 may. 2017 a las 8:10
  • actualize la pregunta y añadi el gradle
    – Tehz
    Commented el 10 may. 2017 a las 15:45

1 respuesta 1

0

El problema es que no encuentra la clase principal de Picasso Library:

Caused by: java.lang.ClassNotFoundException: Didn't find class "com.squareup.picasso.Picasso" on path: DexPathList[[zip file "/data/app/com.ciclomapp.ciclomapp.ciclomapp-1

Lo que necesitas es agregar la dependencia de Picasso a tu archivo app/build.gradle:

compile 'com.squareup.picasso:picasso:2.5.2'

Y sincronizar tu proyecto con los archivos build.gradle.


Tu proyecto es al parecer el que usa Picasso, puedes verificarlo en la clase MainActivity.java

java.lang.NoClassDefFoundError: Failed resolution of: Lcom/squareup/picasso/Picasso; at com.ciclomapp.ciclomapp.ciclomapp.MainActivity.onCreate(MainActivity.java:147

1
  • si, mi proyecto es el que usa picasso y la dependencia ya estaba agregada, lo que encuentro extraño es que el error se manifiesta al agregar la dependencia de la otra libreria de google directions
    – Tehz
    Commented el 10 may. 2017 a las 5:05

Tu Respuesta

By clicking “Publica tu respuesta”, you agree to our terms of service and acknowledge you have read our privacy policy.

¿No es la respuesta que buscas? Examina otras preguntas con la etiqueta o formula tu propia pregunta.