当我尝试使用parse.com facebook登录时,我的应用程序崩溃了。我试图调试并发现代码永远不会得到回调,这里是登录代码:
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
ParseFacebookUtils
the jar of this class file belongs to container 'android dependencies' which does not allow modification to source attachments on its entries.
的声明时,我想我找到了问题的根源。我正在获取此页面:类文件编辑器({{1}})。
此外,我已经将我的解析sdk版本从1.2.4更新为1.3,删除了libs中的旧sdk,并添加了新的内容(总共4个文件和文件夹)。
为什么应用程序崩溃了?为什么没有错误?谢谢你的帮助。
答案 0 :(得分:0)
尝试清除logcat / clear项目并重新启动eclipse,有时这就是没有出现错误的原因
答案 1 :(得分:0)
问题在于我的Manifest(一些错误的属性)。