0

当我尝试使用 parse.com facebook login 登录时,我的应用程序崩溃了。我尝试调试,发现代码从来没有得到回调,这里是登录代码:

ParseFacebookUtils.logIn(thisActivity, new LogInCallback() {
                  @Override
                  public void done(ParseUser user, ParseException err) {
                    if (user == null) { // the code never gets here
                      Log.d("MyApp", "Uh oh. The user cancelled the Facebook login.");
                    } else if (user.isNew()) {
                      Log.d("MyApp", "User signed up and logged in through Facebook!");
                    } else {
                      Log.d("MyApp", "User logged in through Facebook!");
                    }
                  }
                });

这是logcat(找不到任何错误):

06-24 21:04:39.760: D/dalvikvm(2634): GC_FOR_ALLOC freed 80K, 7% free 2612K/2796K, paused 26ms, total 28ms
06-24 21:04:39.760: I/dalvikvm-heap(2634): Grow heap (frag case) to 3.107MB for 480016-byte allocation
06-24 21:04:39.830: D/dalvikvm(2634): GC_FOR_ALLOC freed <1K, 6% free 3080K/3268K, paused 64ms, total 64ms
06-24 21:04:39.850: D/dalvikvm(2634): GC_CONCURRENT freed <1K, 6% free 3082K/3268K, paused 4ms+2ms, total 23ms
06-24 21:04:39.990: D/libEGL(2634): loaded /system/lib/egl/libEGL_tegra.so
06-24 21:04:39.990: E/(2634): file /data/data/com.nvidia.NvCPLSvc/files/driverlist.txt: not found!
06-24 21:04:39.990: I/(2634): Attempting to load EGL implementation /system/lib//egl/libEGL_tegra_impl
06-24 21:04:40.000: I/(2634): Loaded EGL implementation /system/lib//egl/libEGL_tegra_impl
06-24 21:04:40.000: D/libEGL(2634): loaded /system/lib/egl/libGLESv1_CM_tegra.so
06-24 21:04:40.000: D/libEGL(2634): loaded /system/lib/egl/libGLESv2_tegra.so
06-24 21:04:40.060: I/(2634): Loading GLESv2 implementation /system/lib//egl/libGLESv2_tegra_impl
06-24 21:04:40.060: D/OpenGLRenderer(2634): Enabling debug mode 0
06-24 21:04:40.390: D/dalvikvm(2634): GC_CONCURRENT freed 247K, 10% free 3257K/3608K, paused 4ms+3ms, total 25ms
06-24 21:04:40.940: D/TextView(2634): Constructor - Got Res id for appearance for textColorPrimaryInverse
06-24 21:04:40.940: W/ResourceType(2634): Skipping entry 0x1060001 in package table 0 because it is not complex!
06-24 21:04:40.940: D/TextView(2634): Constructor - Got appearance for textColorPrimaryInverse
06-24 21:04:40.940: D/TextView(2634): Constructor -- Got mEditTextBackgroundColor
06-24 21:04:40.970: D/TextView(2634): Constructor - Got Res id for appearance for textColorPrimaryInverse
06-24 21:04:40.970: W/ResourceType(2634): Skipping entry 0x1060001 in package table 0 because it is not complex!
06-24 21:04:40.970: D/TextView(2634): Constructor - Got appearance for textColorPrimaryInverse
06-24 21:04:40.970: D/TextView(2634): Constructor -- Got mEditTextBackgroundColor
06-24 21:04:40.990: D/dalvikvm(2634): GC_FOR_ALLOC freed 222K, 9% free 3381K/3708K, paused 21ms, total 21ms
06-24 21:04:40.990: I/dalvikvm-heap(2634): Grow heap (frag case) to 3.858MB for 480016-byte allocation
06-24 21:04:41.010: D/dalvikvm(2634): GC_FOR_ALLOC freed <1K, 8% free 3849K/4180K, paused 19ms, total 19ms
06-24 21:04:41.030: D/dalvikvm(2634): GC_CONCURRENT freed 32K, 9% free 3818K/4180K, paused 2ms+2ms, total 16ms
06-24 21:04:41.050: D/dalvikvm(2634): GC_FOR_ALLOC freed <1K, 9% free 3818K/4180K, paused 13ms, total 13ms
06-24 21:04:41.050: I/dalvikvm-heap(2634): Grow heap (frag case) to 4.285MB for 480016-byte allocation
06-24 21:04:41.060: D/dalvikvm(2634): GC_FOR_ALLOC freed 0K, 8% free 4287K/4652K, paused 16ms, total 16ms
06-24 21:04:41.080: D/dalvikvm(2634): GC_CONCURRENT freed <1K, 8% free 4287K/4652K, paused 1ms+1ms, total 15ms

编辑 *编辑: * 我想我找到了问题的根源,当我试图访问我正在获取此页面的声明时:类文件编辑器(logIn)。此外,我通过从库中删除旧的 sdk 并添加新的 sdk 及其内容(总共 4 个文件和文件夹),将我的 parse sdk 版本从 1.2.4 更新到 1.3。ParseFacebookUtilsthe jar of this class file belongs to container 'android dependencies' which does not allow modification to source attachments on its entries.

为什么应用程序崩溃?为什么没有错误??谢谢你的帮助。

4

2 回答 2

0

尝试清除 logcat/clear 项目并重新启动 eclipse,有时这就是没有显示错误的原因

于 2013-09-25T14:01:04.037 回答
0

问题出在我的清单上(一些错误的属性)。

于 2013-09-26T08:04:09.997 回答