小编rob*_*ure的帖子

macbook adb无法打开界面

我遇到了通过USB调试Android ADB的问题.

使用Macbook Air 2013并尝试连接Nexus 6开发电话.

在MAC Android Studio上安装了android最新的sdk.

当我做

adb kill-server
adb devices
Run Code Online (Sandbox Code Playgroud)

我明白了:

adb I   661  9881 usb_osx.cpp:259] Found vid=18d1 pid=**** serial=*****
adb I   661  9881 usb_osx.cpp:259] 
adb E   661  9881 usb_osx.cpp:331] Could not open interface: e00002c5
adb E   661  9881 usb_osx.cpp:265] Could not find device interface
Run Code Online (Sandbox Code Playgroud)

因此,它发现设备,供应商ID,产品ID和串行匹配我在Nexus 6的系统信息中找到的内容.

我在网上找到以下建议后尝试了 - 但没有成功 - 以下解决方法:

  • 在电话上禁用和重新启用调试模式,还可以在USB配置之间切换充电,MTP,PTP,RNDIS,音频源,MIDI,始终确保对Mac的RSA指纹进行授权

  • 关闭Android Studio/DDMS,通过'kill-server'命令杀死adb以及通过Apple活动监视器终止进程

  • 以root身份运行adb

  • 重启Mac几次

  • 重新启动Nexus 6

  • 完全重新安装Android SDK

  • 与其它调试启用Android设备尝试(三星Galaxy Tab,这里还发现了亚行正确的设备信息,但不能访问与同样的错误接口)

  • 尝试使用3种不同的USB电缆,所有电缆最初都附带Android设备

通过谷歌,我了解到错误代码e00002c5意味着该设备已被其他驱动程序使用.

我最近安装了Sophos Home Antivir.认为这可能会阻止ADB打开设备界面,我使用提供的卸载程序完全卸载了Sophos并重新启动了Mac.

任何提示都表示赞赏:

  • 要解决哪些步骤?

  • 因为e00002c5似乎是另一个驱动程序正在使用该设备的明确指示,如何找出哪个进程以及如何阻止它执行该操作

macos usb android adb nexus6

54
推荐指数
2
解决办法
2万
查看次数

ios6 facebook集成登录永远不会打开FBSessionStateClosedLoginFailed

这个问题与iOS SDK设备上的iOS SDK非常相似,但由于我无法在那里发表评论,我提出了一个新问题.我认为问题不一样:

当我尝试更新我的应用程序的Facebook集成到Facebook 3.1我没有得到facebook会话打开sessionStateChanged回调总是在FBSessionStateClosedLoginFailed结束.在我的设置中,我在appdelegate中有回调

- (BOOL)application:(UIApplication *)application 
            openURL:(NSURL *)url
  sourceApplication:(NSString *)sourceApplication
         annotation:(id)annotation {
    // attempt to extract a token from the url
    //    return [self.session handleOpenURL:url]; 
    return [FBSession.activeSession handleOpenURL:url];
}
Run Code Online (Sandbox Code Playgroud)

但它永远不会被称为!不应该被称为?我按照facebook文档打电话

- (BOOL)openSessionWithAllowLoginUI:(BOOL)allowLoginUI {
    NSArray *permissions = [NSArray arrayWithObjects:@"publish_actions", nil];
    return [FBSession openActiveSessionWithPublishPermissions:permissions
                                              defaultAudience:FBSessionDefaultAudienceFriends
                                              allowLoginUI:allowLoginUI
                                         completionHandler:^(FBSession *session,
                                                             FBSessionState state,
                                                             NSError *error) {
                                             [self sessionStateChanged:session
                                                                 state:state
                                                                 error:error];
                                         }];
}
Run Code Online (Sandbox Code Playgroud)

我也试过了

openActiveSessionWithReadPermissionsnil用于权限与意向重新授权购买所述许可publish_actions facebook的教程示例.相同的结果:FBSessionStateClosedLoginFailed再次失败.

我甚至试过打电话

ACAccountStore *accountStore;
    ACAccountType *accountTypeFB;
    if ((accountStore = [[ACAccountStore alloc] init]) &&
        (accountTypeFB …
Run Code Online (Sandbox Code Playgroud)

facebook facebook-ios-sdk ios6

16
推荐指数
3
解决办法
2万
查看次数

iOS方向更改不起作用也未收到UIDeviceOrientationDidChangeNotification

我对iOS很陌生,我正拼命想要在我的应用程序中进行方向更改.在研究了我的工作后:

在我的应用程序中,我有一个NavigationController管理七个UIViewController子类.

在项目摘要选项卡中,我激活了所有4个设备方向.

每个UIViewcontroller子类都有一个xib文件,所有xib文件都激活了"autoresize子视图".

UIViewController子类都有:

    - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
    return (interfaceOrientation == UIInterfaceOrientationPortrait || 
            interfaceOrientation == UIInterfaceOrientationLandscapeLeft ||
            interfaceOrientation == UIInterfaceOrientationLandscapeRight );
}
Run Code Online (Sandbox Code Playgroud)

他们也都有:

- (void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation
Run Code Online (Sandbox Code Playgroud)

和:

- (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration
Run Code Online (Sandbox Code Playgroud)

用NSLog(...)语句实现(从不打印,调试器也从不输入这些方法).

我也试图使用:

    [[UIDevice currentDevice] beginGeneratingDeviceOrientationNotifications];

BOOL getOrientationUpdates = [[UIDevice currentDevice] isGeneratingDeviceOrientationNotifications];
NSLog(@"will receive orientation notifications: %@", getOrientationUpdates?@"YES":@"NO");

[[NSNotificationCenter defaultCenter] addObserver:self
                                         selector:@selector(orientationChanged:)
                                             name:UIDeviceOrientationDidChangeNotification
                                           object:nil];
Run Code Online (Sandbox Code Playgroud)

-(void)orientationChanged: (NSNotification*) notification { NSLog(@"orientationChanged"); }

[[UIDevice currentDevice] endGeneratingDeviceOrientationNotifications]; [[NSNotificationCenter defaultCenter] removeObserver:self]; 分别.

当我beginGeneratingDeviceOrientationNotifications在AppDelegate的- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 方法中执行等操作时,orientationChanged:在启动时被调用一次,但是我再也没有旋转设备,当我在其中一个UIViewController子类中执行它时,它永远不会被调用!

到目前为止,我想要实现的是获取方向通知来旋转UIImageView和UIImage(在不同的方向上没有任何布局更改).

UIDeviceOrientation o = …
Run Code Online (Sandbox Code Playgroud)

iphone notifications rotation orientation ios

4
推荐指数
1
解决办法
3098
查看次数