我有一个问题。我正在将操作系统从Windows更改为ubunty。在此之前,我将所有项目提交到bitbacket.Download它在新系统中稍后导入eclipse(ubunty)。启动我的应用程序并尝试登录facebook并获取用户电子邮件地址并获取空指针。 我也删除旧的Facebook应用程序并安装新的。
我的代码是和平的。有人可以帮助我吗?
private String[] permissions = new String[]{ "email"};
private LoginButton mFacebookLoginButton;
mFacebookLoginButton.setReadPermissions( permissions );
@Override
public void onCompleted( GraphUser user, Response response )
{
if( null != user )
{
mUserInfo = new UserInfo();
mUserInfo.userEmail = user.getProperty( "email" ).toString();
mUserInfo.userName = user.getName();
mUserInfo.firstName = user.getFirstName();
mUserInfo.lastName = user.getLastName();
mUserInfo.facebookId = user.getId();
mUserInfo.hassPassword = 0;
RegisterDevice regDevice = new RegisterDevice( getActivity() );
regDevice.setStoreDeviceId( this );
regDevice.execute();
}
}
我的日志中的是这样的消息
07-14 18:46:08.593: W/PackageManager(774): Unknown permission com.facebook.pages.app.provider.ACCESS in package com.facebook.katana
07-14 18:46:08.593: W/PackageManager(774): Not granting permission android.permission.BATTERY_STATS to package com.facebook.katana (protectionLevel=18 flags=0x88be44)
07-14 18:46:08.593: W/PackageManager(774): Unknown permission com.sec.android.provider.badge.permission.READ in package com.facebook.katana
07-14 18:46:08.593: W/PackageManager(774): Unknown permission com.sec.android.provider.badge.permission.WRITE in package com.facebook.katana
07-14 18:46:08.593: W/PackageManager(774): Unknown permission com.htc.launcher.permission.READ_SETTINGS in package com.facebook.katana
07-14 18:46:08.593: W/PackageManager(774): Unknown permission com.htc.launcher.permission.UPDATE_SHORTCUT in package com.facebook.katana
07-14 18:46:08.593: W/PackageManager(774): Unknown permission com.sonyericsson.home.permission.BROADCAST_BADGE in package com.facebook.katana
07-14 18:46:08.593: W/PackageManager(774): Unknown permission .home.permission.WRITE_BADGES in package com.facebook.katana
07-14 18:46:08.593: W/PackageManager(774): Unknown permission com.nokia.pushnotifications.permission.RECEIVE in package com.facebook.katana
07-14 18:46:08.593: W/PackageManager(774): Unknown permission com.amazon.device.messaging.permission.RECEIVE in package com.facebook.katana
07-14 18:47:45.613: W/PackageManager(774): Unknown permission com.facebook.pages.app.provider.ACCESS in package com.facebook.katana
07-14 18:47:45.613: W/PackageManager(774): Not granting permission android.permission.BATTERY_STATS to package com.facebook.katana (protectionLevel=18 flags=0x88be44)
07-14 18:47:45.613: W/PackageManager(774): Unknown permission com.sec.android.provider.badge.permission.READ in package com.facebook.katana
07-14 18:47:45.613: W/PackageManager(774): Unknown permission com.sec.android.provider.badge.permission.WRITE in package com.facebook.katana
07-14 18:47:45.613: W/PackageManager(774): Unknown permission com.htc.launcher.permission.READ_SETTINGS in package com.facebook.katana
07-14 18:47:45.613: W/PackageManager(774): Unknown permission com.htc.launcher.permission.UPDATE_SHORTCUT in package com.facebook.katana
07-14 18:47:45.623: W/PackageManager(774): Unknown permission com.sonyericsson.home.permission.BROADCAST_BADGE in package com.facebook.katana
07-14 18:47:45.623: W/PackageManager(774): Unknown permission .home.permission.WRITE_BADGES in package com.facebook.katana
07-14 18:47:45.623: W/PackageManager(774): Unknown permission com.nokia.pushnotifications.permission.RECEIVE in package com.facebook.katana
07-14 18:47:45.623: W/PackageManager(774): Unknown permission com.amazon.device.messaging.permission.RECEIVE in package com.facebook.katana
07-14 18:48:44.393: W/PackageManager(774): Unknown permission com.facebook.pages.app.provider.ACCESS in package com.facebook.katana
07-14 18:48:44.393: W/PackageManager(774): Not granting permission android.permission.BATTERY_STATS to package com.facebook.katana (protectionLevel=18 flags=0x88be44)
07-14 18:48:44.393: W/PackageManager(774): Unknown permission com.sec.android.provider.badge.permission.READ in package com.facebook.katana
07-14 18:48:44.393: W/PackageManager(774): Unknown permission com.sec.android.provider.badge.permission.WRITE in package com.facebook.katana
07-14 18:48:44.393: W/PackageManager(774): Unknown permission com.htc.launcher.permission.READ_SETTINGS in package com.facebook.katana
07-14 18:48:44.393: W/PackageManager(774): Unknown permission com.htc.launcher.permission.UPDATE_SHORTCUT in package com.facebook.katana
07-14 18:48:44.393: W/PackageManager(774): Unknown permission com.sonyericsson.home.permission.BROADCAST_BADGE in package com.facebook.katana
07-14 18:48:44.393: W/PackageManager(774): Unknown permission .home.permission.WRITE_BADGES in package com.facebook.katana
07-14 18:48:44.393: W/PackageManager(774): Unknown permission com.nokia.pushnotifications.permission.RECEIVE in package com.facebook.katana
07-14 18:48:44.393: W/PackageManager(774): Unknown permission com.amazon.device.messaging.permission.RECEIVE in package com.facebook.katana
07-14 18:50:18.323: W/PackageManager(774): Unknown permission com.facebook.pages.app.provider.ACCESS in package com.facebook.katana
07-14 18:50:18.323: W/PackageManager(774): Not granting permission android.permission.BATTERY_STATS to package com.facebook.katana (protectionLevel=18 flags=0x88be44)
07-14 18:50:18.323: W/PackageManager(774): Unknown permission com.sec.android.provider.badge.permission.READ in package com.facebook.katana
07-14 18:50:18.323: W/PackageManager(774): Unknown permission com.sec.android.provider.badge.permission.WRITE in package com.facebook.katana
07-14 18:50:18.323: W/PackageManager(774): Unknown permission com.htc.launcher.permission.READ_SETTINGS in package com.facebook.katana
07-14 18:50:18.323: W/PackageManager(774): Unknown permission com.htc.launcher.permission.UPDATE_SHORTCUT in package com.facebook.katana
07-14 18:50:18.323: W/PackageManager(774): Unknown permission com.sonyericsson.home.permission.BROADCAST_BADGE in package com.facebook.katana
07-14 18:50:18.323: W/PackageManager(774): Unknown permission .home.permission.WRITE_BADGES in package com.facebook.katana
07-14 18:50:18.323: W/PackageManager(774): Unknown permission com.nokia.pushnotifications.permission.RECEIVE in package com.facebook.katana
07-14 18:50:18.323: W/PackageManager(774): Unknown permission com.amazon.device.messaging.permission.RECEIVE in package com.facebook.katana
07-14 18:54:34.903: W/PackageManager(774): Unknown permission com.facebook.pages.app.provider.ACCESS in package com.facebook.katana
07-14 18:54:34.903: W/PackageManager(774): Not granting permission android.permission.BATTERY_STATS to package com.facebook.katana (protectionLevel=18 flags=0x88be44)
07-14 18:54:34.903: W/PackageManager(774): Unknown permission com.sec.android.provider.badge.permission.READ in package com.facebook.katana
07-14 18:54:34.903: W/PackageManager(774): Unknown permission com.sec.android.provider.badge.permission.WRITE in package com.facebook.katana
07-14 18:54:34.903: W/PackageManager(774): Unknown permission com.htc.launcher.permission.READ_SETTINGS in package com.facebook.katana
07-14 18:54:34.903: W/PackageManager(774): Unknown permission com.htc.launcher.permission.UPDATE_SHORTCUT in package com.facebook.katana
07-14 18:54:34.903: W/PackageManager(774): Unknown permission com.sonyericsson.home.permission.BROADCAST_BADGE in package com.facebook.katana
07-14 18:54:34.903: W/PackageManager(774): Unknown permission .home.permission.WRITE_BADGES in package com.facebook.katana
07-14 18:54:34.903: W/PackageManager(774): Unknown permission com.nokia.pushnotifications.permission.RECEIVE in package com.facebook.katana
07-14 18:54:34.903: W/PackageManager(774): Unknown permission com.amazon.device.messaging.permission.RECEIVE in package com.facebook.katana
07-14 18:58:22.553: I/ActivityManager(774): START u0 {cmp=com.facebook.katana/.ProxyAuth (has extras)} from pid 9085
07-14 18:58:22.573: I/ActivityManager(774): START u0 {cmp=com.facebook.katana/.ProxyAuthDialog (has extras)} from pid 7227
07-14 19:03:45.063: I/ActivityManager(774): START u0 {act=android.intent.action.UNINSTALL_PACKAGE dat=package:com.facebook.katana cmp=com.android.packageinstaller/.UninstallerActivity (has extras)} from pid 31047
07-14 19:03:46.023: I/ActivityManager(774): Force stopping com.facebook.katana appid=10086 user=-1: uninstall pkg
07-14 19:03:46.023: I/ActivityManager(774): Killing 7227:com.facebook.katana/u0a86 (adj 13): stop com.facebook.katana
07-14 19:03:46.023: W/ActivityManager(774): Scheduling restart of crashed service com.facebook.katana/com.facebook.push.mqtt.service.MqttPushService in 1000ms
07-14 19:03:46.023: I/ActivityManager(774): Killing 7490:com.facebook.katana:dash/u0a86 (adj 15): stop com.facebook.katana
07-14 19:03:46.033: I/ActivityManager(774): Force stopping service ServiceRecord{433b8f88 u0 com.facebook.katana/com.facebook.push.mqtt.service.MqttPushService}
07-14 19:03:46.143: W/PackageManager(774): Couldn't delete native library directory /data/app-lib/com.facebook.katana
07-14 19:03:46.143: I/PackageManager(774): Removing old permission: com.facebook.receiver.permission.ACCESS from package com.facebook.katana
07-14 19:03:46.143: I/PackageManager(774): Removing old permission: com.facebook.katana.permission.C2D_MESSAGE from package com.facebook.katana
07-14 19:03:46.143: I/PackageManager(774): Removing old permission: com.facebook.katana.permission.CROSS_PROCESS_BROADCAST_MANAGER from package com.facebook.katana
07-14 19:03:46.143: I/PackageManager(774): Removing old permission: com.facebook.permission.debug.SYSTEM_COMMUNICATION from package com.facebook.katana
07-14 19:03:46.143: I/PackageManager(774): Removing old permission: com.facebook.katana.provider.ACCESS from package com.facebook.katana
07-14 19:03:46.143: I/PackageManager(774): Removing old permission: com.facebook.katana.permission.RECEIVE_ADM_MESSAGE from package com.facebook.katana
07-14 19:03:46.143: I/PackageManager(774): Removing old permission: com.facebook.permission.prod.FB_APP_COMMUNICATION from package com.facebook.katana
07-14 19:03:46.153: W/PackageManager(774): Unknown permission com.facebook.katana.provider.ACCESS in package com.facebook.orca
07-14 19:03:46.233: I/ActivityManager(774): Force stopping com.facebook.katana appid=10086 user=0: pkg removed
07-14 19:03:46.523: D/BackupManagerService(774): Received broadcast Intent { act=android.intent.action.PACKAGE_REMOVED dat=package:com.facebook.katana flg=0x4000010 (has extras) }
07-14 19:03:46.793: W/PackageManager(774): Package named 'com.facebook.katana' doesn't exist.
07-14 19:04:13.453: W/PackageManager(774): Unknown permission com.facebook.katana.provider.ACCESS in package com.facebook.orca
07-14 19:04:29.003: I/ActivityManager(774): START u0 {act=com.google.android.finsky.NAVIGATIONAL_SUGGESTION dat=https://market.android.com/details?id=com.facebook.katana&feature=sugg flg=0x10000000 cmp=com.android.vending/.AssetBrowserActivity (has extras)} from pid 20908
07-14 19:04:40.583: W/ActivityManager(774): No content provider found for permission revoke: file:///data/data/com.android.vending/cache/gzipped/com.facebook.katana141515487.apk
07-14 19:04:40.753: W/ActivityManager(774): No content provider found for permission revoke: file:///data/data/com.android.vending/cache/gzipped/com.facebook.katana141515487.apk
07-14 19:04:46.333: W/PackageManager(774): Package com.facebook.katana desires unavailable shared library com.amazon.device.messaging; ignoring!
07-14 19:04:48.883: I/ActivityManager(774): Force stopping com.facebook.katana appid=10101 user=-1: update pkg
07-14 19:04:48.983: W/PackageManager(774): Unknown permission com.facebook.pages.app.provider.ACCESS in package com.facebook.katana
07-14 19:04:48.983: W/PackageManager(774): Not granting permission android.permission.BATTERY_STATS to package com.facebook.katana (protectionLevel=18 flags=0x8be44)
07-14 19:04:48.983: W/PackageManager(774): Unknown permission com.sec.android.provider.badge.permission.READ in package com.facebook.katana
07-14 19:04:48.983: W/PackageManager(774): Unknown permission com.sec.android.provider.badge.permission.WRITE in package com.facebook.katana
07-14 19:04:48.983: W/PackageManager(774): Unknown permission com.htc.launcher.permission.READ_SETTINGS in package com.facebook.katana
07-14 19:04:48.983: W/PackageManager(774): Unknown permission com.htc.launcher.permission.UPDATE_SHORTCUT in package com.facebook.katana
07-14 19:04:48.983: W/PackageManager(774): Unknown permission com.sonyericsson.home.permission.BROADCAST_BADGE in package com.facebook.katana
07-14 19:04:48.983: W/PackageManager(774): Unknown permission .home.permission.WRITE_BADGES in package com.facebook.katana
07-14 19:04:48.983: W/PackageManager(774): Unknown permission com.nokia.pushnotifications.permission.RECEIVE in package com.facebook.katana
07-14 19:04:48.983: W/PackageManager(774): Unknown permission com.amazon.device.messaging.permission.RECEIVE in package com.facebook.katana
07-14 19:04:49.283: D/BackupManagerService(774): Received broadcast Intent { act=android.intent.action.PACKAGE_ADDED dat=package:com.facebook.katana flg=0x4000010 (has extras) }
答案 0 :(得分:1)
转到facebook上的应用页面,然后添加新的密钥哈希值。它改变了,因为你的debug.keystore发生了变化(因为你切换到了Ubuntu)。