android - pagina - messenger facebook iniciar sesion
NoClassDefFoundError cuando se usa Parse.com para iniciar sesiĆ³n en Facebook (2)
Asegúrate de marcar la casilla de verificación en Java Build Path
-> Order and Export
-tab.
(Imagen de aquí )
Actualmente estoy usando parse.com como una solución de back-end para mi aplicación de Android. Intento usar Facebook para autenticar usuarios y actualmente estoy experimentando los siguientes errores. Intenté agregar ambos JARS (Parse y Facebook) a mi proyecto. También he limpiado mi proyecto varias veces, pero sigo recibiendo los siguientes errores:
Registro de errores :
03-03 15:01:18.273: E/dalvikvm(7423): Could not find class ''com.facebook.SharedPreferencesTokenCachingStrategy'', referenced from method com.parse.auth.FacebookAuthenticationProvider.authenticate
03-03 15:01:18.273: W/dalvikvm(7423): VFY: unable to resolve new-instance 1011 (Lcom/facebook/SharedPreferencesTokenCachingStrategy;) in Lcom/parse/auth/FacebookAuthenticationProvider;
03-03 15:01:18.277: D/dalvikvm(7423): VFY: replacing opcode 0x22 at 0x0033
03-03 15:01:18.277: E/dalvikvm(7423): Could not find class ''com.facebook.SharedPreferencesTokenCachingStrategy'', referenced from method com.parse.auth.FacebookAuthenticationProvider.restoreAuthentication
03-03 15:01:18.277: W/dalvikvm(7423): VFY: unable to resolve new-instance 1011 (Lcom/facebook/SharedPreferencesTokenCachingStrategy;) in Lcom/parse/auth/FacebookAuthenticationProvider;
03-03 15:01:18.277: D/dalvikvm(7423): VFY: replacing opcode 0x22 at 0x003b
03-03 15:01:18.277: D/dalvikvm(7423): DexOpt: unable to opt direct call 0x21d7 at 0x35 in Lcom/parse/auth/FacebookAuthenticationProvider;.authenticate
03-03 15:01:18.281: D/dalvikvm(7423): DexOpt: unable to opt direct call 0x21d7 at 0x3f in Lcom/parse/auth/FacebookAuthenticationProvider;.restoreAuthentication
03-03 15:01:18.324: D/AndroidRuntime(7423): Shutting down VM
03-03 15:01:18.328: W/dalvikvm(7423): threadid=1: thread exiting with uncaught exception (group=0x40dc6300)
03-03 15:01:18.371: E/AndroidRuntime(7423): FATAL EXCEPTION: main
03-03 15:01:18.371: E/AndroidRuntime(7423): java.lang.NoClassDefFoundError: com.facebook.SharedPreferencesTokenCachingStrategy
03-03 15:01:18.371: E/AndroidRuntime(7423): at com.parse.auth.FacebookAuthenticationProvider.authenticate(FacebookAuthenticationProvider.java:114)
03-03 15:01:18.371: E/AndroidRuntime(7423): at com.parse.ParseUser.authenticateAsync(ParseUser.java:1096)
03-03 15:01:18.371: E/AndroidRuntime(7423): at com.parse.ParseUser.logInWithAsync(ParseUser.java:1113)
03-03 15:01:18.371: E/AndroidRuntime(7423): at com.parse.ParseUser.logInWithAsync(ParseUser.java:938)
03-03 15:01:18.371: E/AndroidRuntime(7423): at com.parse.ParseFacebookUtils.logIn(ParseFacebookUtils.java:338)
03-03 15:01:18.371: E/AndroidRuntime(7423): at com.parse.ParseFacebookUtils.logIn(ParseFacebookUtils.java:363)
03-03 15:01:18.371: E/AndroidRuntime(7423): at com.example.chartviewer.FbLoginActivity.onCreate(FbLoginActivity.java:44)
03-03 15:01:18.371: E/AndroidRuntime(7423): at android.app.Activity.performCreate(Activity.java:5008)
03-03 15:01:18.371: E/AndroidRuntime(7423): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1079)
03-03 15:01:18.371: E/AndroidRuntime(7423): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2023)
03-03 15:01:18.371: E/AndroidRuntime(7423): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2084)
03-03 15:01:18.371: E/AndroidRuntime(7423): at android.app.ActivityThread.access$600(ActivityThread.java:130)
03-03 15:01:18.371: E/AndroidRuntime(7423): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1195)
03-03 15:01:18.371: E/AndroidRuntime(7423): at android.os.Handler.dispatchMessage(Handler.java:99)
03-03 15:01:18.371: E/AndroidRuntime(7423): at android.os.Looper.loop(Looper.java:137)
03-03 15:01:18.371: E/AndroidRuntime(7423): at android.app.ActivityThread.main(ActivityThread.java:4745)
03-03 15:01:18.371: E/AndroidRuntime(7423): at java.lang.reflect.Method.invokeNative(Native Method)
03-03 15:01:18.371: E/AndroidRuntime(7423): at java.lang.reflect.Method.invoke(Method.java:511)
03-03 15:01:18.371: E/AndroidRuntime(7423): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
03-03 15:01:18.371: E/AndroidRuntime(7423): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
03-03 15:01:18.371: E/AndroidRuntime(7423): at dalvik.system.NativeStart.main(Native Method)
Nuevo registro de errores después de agregar Jars:
03-03 15:15:09.472: E/AndroidRuntime(8203): FATAL EXCEPTION: main
03-03 15:15:09.472: E/AndroidRuntime(8203): java.lang.NoClassDefFoundError: com.facebook.SharedPreferencesTokenCachingStrategy
03-03 15:15:09.472: E/AndroidRuntime(8203): at com.parse.auth.FacebookAuthenticationProvider.authenticate(FacebookAuthenticationProvider.java:114)
03-03 15:15:09.472: E/AndroidRuntime(8203): at com.parse.ParseUser.authenticateAsync(ParseUser.java:1096)
03-03 15:15:09.472: E/AndroidRuntime(8203): at com.parse.ParseUser.logInWithAsync(ParseUser.java:1113)
03-03 15:15:09.472: E/AndroidRuntime(8203): at com.parse.ParseUser.logInWithAsync(ParseUser.java:938)
03-03 15:15:09.472: E/AndroidRuntime(8203): at com.parse.ParseFacebookUtils.logIn(ParseFacebookUtils.java:338)
03-03 15:15:09.472: E/AndroidRuntime(8203): at com.parse.ParseFacebookUtils.logIn(ParseFacebookUtils.java:363)
03-03 15:15:09.472: E/AndroidRuntime(8203): at com.example.chartviewer.FbLoginActivity.onCreate(FbLoginActivity.java:44)
03-03 15:15:09.472: E/AndroidRuntime(8203): at android.app.Activity.performCreate(Activity.java:5008)
03-03 15:15:09.472: E/AndroidRuntime(8203): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1079)
03-03 15:15:09.472: E/AndroidRuntime(8203): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2023)
03-03 15:15:09.472: E/AndroidRuntime(8203): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2084)
03-03 15:15:09.472: E/AndroidRuntime(8203): at android.app.ActivityThread.access$600(ActivityThread.java:130)
03-03 15:15:09.472: E/AndroidRuntime(8203): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1195)
03-03 15:15:09.472: E/AndroidRuntime(8203): at android.os.Handler.dispatchMessage(Handler.java:99)
03-03 15:15:09.472: E/AndroidRuntime(8203): at android.os.Looper.loop(Looper.java:137)
03-03 15:15:09.472: E/AndroidRuntime(8203): at android.app.ActivityThread.main(ActivityThread.java:4745)
03-03 15:15:09.472: E/AndroidRuntime(8203): at java.lang.reflect.Method.invokeNative(Native Method)
03-03 15:15:09.472: E/AndroidRuntime(8203): at java.lang.reflect.Method.invoke(Method.java:511)
03-03 15:15:09.472: E/AndroidRuntime(8203): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
03-03 15:15:09.472: E/AndroidRuntime(8203): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
03-03 15:15:09.472: E/AndroidRuntime(8203): at dalvik.system.NativeStart.main(Native Method)
Tengo solución al cambiar mi minSdkVersion (11 a 8)