0

Hola no consigo poder probar mi projecto creado en Android Studio en mi emulador y en mi telefono

Este es el LogCat cuando corro la aplicacion:

09-06 10:33:39.688 21767-21767/? E/Zygote: v2
09-06 10:33:39.689 21767-21767/? I/libpersona: KNOX_SDCARD checking this for 10272
    KNOX_SDCARD not a persona
09-06 10:33:39.690 21767-21767/? E/Zygote: accessInfo : 0
09-06 10:33:39.691 21767-21767/? W/SELinux: SELinux selinux_android_compute_policy_index : Policy Index[2],  Con:u:r:zygote:s0 RAM:SEPF_SECMOBILE_7.0_0009, [-1 -1 -1 -1 0 1]
09-06 10:33:39.692 21767-21767/? I/SELinux: SELinux: seapp_context_lookup: seinfo=untrusted, level=s0:c512,c768, pkgname=com.example.julio.photogo 
09-06 10:33:39.701 21767-21767/? I/art: Late-enabling -Xcheck:jni
09-06 10:33:39.747 21767-21767/? D/TimaKeyStoreProvider: TimaKeyStore is enabled: try add TimaSignature Service and generateKeyPair Service
09-06 10:33:39.810 21767-21767/com.example.julio.photogo I/ResourcesManager: updateResourcesForOpenThemeChange for Desktop mode 
09-06 10:33:40.175 21767-21767/com.example.julio.photogo W/System: ClassLoader referenced unknown path: /data/app/com.example.julio.photogo-1/lib/arm64
09-06 10:33:40.197 21767-21767/com.example.julio.photogo D/AndroidRuntime: Shutting down VM
09-06 10:33:40.198 21767-21767/com.example.julio.photogo E/AndroidRuntime: FATAL EXCEPTION: main
    Process: com.example.julio.photogo, PID: 21767
    java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/android/gms/common/internal/zzbq;
        at com.google.firebase.provider.FirebaseInitProvider.attachInfo(Unknown Source)
        at android.app.ActivityThread.installProvider(ActivityThread.java:6420)
        at android.app.ActivityThread.installContentProviders(ActivityThread.java:6012)
        at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5951)
        at android.app.ActivityThread.-wrap3(ActivityThread.java)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1710)
        at android.os.Handler.dispatchMessage(Handler.java:102)
        at android.os.Looper.loop(Looper.java:154)
        at android.app.ActivityThread.main(ActivityThread.java:6776)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1520)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1410)
     Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.android.gms.common.internal.zzbq" on path: DexPathList[[zip file "/data/app/com.example.julio.photogo-1/base.apk", zip file "/data/app/com.example.julio.photogo-1/split_lib_dependencies_apk.apk", zip file "/data/app/com.example.julio.photogo-1/split_lib_slice_0_apk.apk", zip file "/data/app/com.example.julio.photogo-1/split_lib_slice_1_apk.apk", zip file "/data/app/com.example.julio.photogo-1/split_lib_slice_2_apk.apk", zip file "/data/app/com.example.julio.photogo-1/split_lib_slice_3_apk.apk", zip file "/data/app/com.example.julio.photogo-1/split_lib_slice_4_apk.apk", zip file "/data/app/com.example.julio.photogo-1/split_lib_slice_5_apk.apk", zip file "/data/app/com.example.julio.photogo-1/split_lib_slice_6_apk.apk", zip file "/data/app/com.example.julio.photogo-1/split_lib_slice_7_apk.apk", zip file "/data/app/com.example.julio.photogo-1/split_lib_slice_8_apk.apk", zip file "/data/app/com.example.julio.photogo-1/split_lib_slice_9_apk.apk"],nativeLibraryDirectories=[/data/app/com.example.julio.photogo-1/lib/arm64, /system/lib64, /vendor/lib64]]
        at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:380)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
        at com.google.firebase.provider.FirebaseInitProvider.attachInfo(Unknown Source) 
        at android.app.ActivityThread.installProvider(ActivityThread.java:6420) 
        at android.app.ActivityThread.installContentProviders(ActivityThread.java:6012) 
        at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5951) 
        at android.app.ActivityThread.-wrap3(ActivityThread.java) 
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1710) 
        at android.os.Handler.dispatchMessage(Handler.java:102) 
        at android.os.Looper.loop(Looper.java:154) 
        at android.app.ActivityThread.main(ActivityThread.java:6776) 
        at java.lang.reflect.Method.invoke(Native Method) 
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1520) 
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1410) 
09-06 10:33:40.258 21767-21767/? I/Process: Sending signal. PID: 21767 SIG: 9

Buld.Gradle:

// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {

    repositories {
        google()
        jcenter()
        mavenCentral()
        maven { url 'http://repo1.maven.org/maven2' }
        jcenter { url "http://jcenter.bintray.com/" }


    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.1.4'
        classpath 'com.google.gms:google-services:4.0.1' // google-services plugin
    }


        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }


allprojects {
    repositories {
        google()
        jcenter()


    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

build.gradle(app) :

apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'

android {
    signingConfigs {
    }
    compileSdkVersion 28
    defaultConfig {
        applicationId "com.example.julio.photogo"
        multiDexEnabled true
        minSdkVersion 15
        targetSdkVersion 28
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
        debug {
            debuggable true
            jniDebuggable false
        }
    }
}
//
//implementation 'com.android.support:cardview-v7:28.0.0-beta01'
dependencies {
    implementation fileTree(include: ['*.jar'], dir: 'libs')
    implementation 'com.facebook.android:facebook-android-sdk:[4,5)'
    //noinspection GradleCompatible
    implementation 'com.android.support:appcompat-v7:28.0.0-alpha1'
    implementation 'com.android.support.constraint:constraint-layout:1.1.2'
    implementation 'com.android.support:support-v4:28.0.0-alpha1'
    implementation 'com.google.android.gms:play-services-maps:15.0.1'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'com.android.support.test:runner:1.0.2'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
    implementation 'com.android.support:cardview-v7:28.0.0-alpha1'
    implementation 'com.android.support:design:28.0.0-alpha1'
    //noinspection GradleCompatible
    implementation 'com.google.firebase:firebase-core:9.0.2'
    implementation 'com.google.firebase:firebase-auth:9.0.2'
    implementation 'com.android.support:support-annotations:+'

    implementation 'com.google.android.gms:play-services:12.0.1'
    implementation files('libs/jtds-1.3.1.jar')



}

apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'
5
  • 1
    Pon tu fichero de dependencias gradle. Deberías tener alguna línea como la siguiente: implementation 'com.google.android.gms:play-services:12.0.1' Commented el 6 sept. 2018 a las 7:59
  • Entiendo que has seguido la documentación (developers.google.com/android/guides/google-services-plugin) y tienes puesta la línea para activar el plugin: apply plugin: 'com.google.gms.google-services' Commented el 6 sept. 2018 a las 12:38
  • Tienes en tu /app/build.grade la definición de Google Play Services ? agrega este archivo build.gradle @JulioMizrahi
    – Jorgesys
    Commented el 6 sept. 2018 a las 19:13
  • Y como lo agrego? @Jorgesys Commented el 6 sept. 2018 a las 19:19
  • @JulioMizrahi se encuentra en tu proyecto agregalo en tu pregunta, es diferente al que agregaste, debe encontrarse en el folder /app
    – Jorgesys
    Commented el 6 sept. 2018 a las 19:41

2 respuestas 2

0

Cambia en tu archivo build.gradle el bloque allprojects {} por lo siguiente, en mi caso yo uso la versión "4.0.1" de Google Play Services así que debes definir la que tengas configurada:

allprojects {
    repositories {

    configurations.all {
 resolutionStrategy.eachDependency { DependencyResolveDetails details ->
   def requested = details.requested
       if (requested.group == 'com.google.android.gms') {
          details.useVersion '4.0.1'
       }
       if (requested.group == 'com.google.firebase') {
          details.useVersion '4.0.1'
         }
       }
     }


     jcenter()
       maven {
         url "https://maven.google.com"
       }
     }
 }
1
  • Agregue este codigo y al sincronisarlo me aparecio este error: Failed to resolve: com.google.android.gms:play-services-maps:4.0.1 Install Repository and sync project Open File Show in Project Structure dialog Failed to resolve: com.google.firebase:firebase-core:4.0.1 Open File Show in Project Structure dialog Commented el 6 sept. 2018 a las 20:56
0

el error de

Didn't find class "com.google.android.gms.common.internal.zzbq" on path: DexPathList

Se puede solucionar si pones esta libreria en tu Graddle/app

dependencies {

        implementation 'com.android.support:multidex:1.0.3'
        ****Tus demas librerias***
}

tambien podrias ingresar esto en tu build.gradle (@Jorgesys)

android {
defaultConfig {
    ...
    multiDexEnabled true
}
...

}

Por el error puesto podrias agregar esto en tu build.gradle.

allprojects {
repositories {
    ***TUS OTROS REPOSITORIOS***
    maven {
        url "https://maven.google.com" 
    }
}

}

Me avisas si funciona.

6
  • Actualmente no es necesario definir en el build.gradle : 'com.android.support:multidex:1.0.3' solo activar la propiedad en caso de que esto sea lo que se necesite.
    – Jorgesys
    Commented el 6 sept. 2018 a las 15:29
  • lo pondre en mi respuesta :D
    – Carlosgub
    Commented el 6 sept. 2018 a las 16:03
  • Agregue el codigo, pero todavia no me corre en el telefono Commented el 6 sept. 2018 a las 19:08
  • Podria dar clic a File->Invalide Cache/Restart ->Invalide and Restart :D ?
    – Carlosgub
    Commented el 6 sept. 2018 a las 20:59
  • @Carlosgub lo hise y todavia el mismo error. Commented el 7 sept. 2018 a las 16:42

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.