Here is the problem. I want to run my Android Studio apps on my device (Samsung Galaxy Ace 2). But nothing works for me. Tell me what I've missed:
问题是这样的。我想在我的设备(三星Galaxy Ace 2)上运行我的Android Studio应用程序,但是没有什么适合我。告诉我我错过了什么:
1) USB debugging is on
1) USB调试启动
2) ADB driver is installed (in device manager i can see Android Composite ADB Interface)
2)安装ADB驱动程序(在设备管理器中可以看到Android组合ADB接口)
3) ADB device list is still clear, even if i reset server(adb kill-server, adb start-server, adb devices - list of devices is clear)
3) ADB设备列表仍然是清晰的,即使我重新设置服务器(ADB killserver, ADB start-server, ADB设备列表也是清晰的)
4) in google usb driver directory, in android_winusb.inf file I added my device identificators
4)在谷歌usb驱动目录中,android_winusb。inf文件我添加了设备标识符
5) Android device manager still cannot connect to my device, showing this error when I reset it: "adb connection error an existing connection was forcibly closed by the remote host"
5)Android设备管理器仍然无法连接到我的设备,当我重新设置时显示这个错误:“adb连接错误一个现有连接被远程主机强制关闭”
So I will be glad to hear any advices. Hope you'll help me
所以我很高兴听到任何建议。希望你能帮助我
16 个解决方案
#1
65
Did you try to configure the "Media Mode" in "Camera (PTP)" instead of "Media device (MTP)"? This is sometimes solving the issue. Its in the USB Computer Connection options of your Android device, you should see an "authorize" dialog then.
您是否尝试在“Camera (PTP)”而不是“Media device (MTP)”中配置“Media Mode”?这有时会解决问题。在你的Android设备的USB电脑连接选项中,你应该会看到一个“授权”对话框。
Update 04/2017: looks like it has been fixed in Android 7.1.2
更新04/2017:看起来它已经在Android 7.1.2中修复了
#2
41
Try swapping the USB port the cable is plugged into.
试着交换插入电缆的USB接口。
Sounds crazy but after 20 minutes of debugging this worked for me.
听起来很疯狂,但经过20分钟的调试后,这个方法对我起了作用。
#3
37
I have done numerous ways of handling that issue. Finally it has worked! I am using LG Optimus II
, but I believe the following steps are generic to other Android devices as well.
我已经用了很多方法来处理这个问题。终于有工作了!我正在使用LG Optimus II,但我相信以下步骤也适用于其他Android设备。
Step 1:
Make sure your device is enabled for development. If yes, go to Step 2, otherwise go to Settings > About phone
and tap Build number
seven times which is magic number :-). Now Developer Options
is available in the Settings
.
确保您的设备已为开发启用。如果是,请转到步骤2,否则转到设置>关于电话,点击7次Build number,这是神奇的数字:-)。现在开发人员选项在设置中可用。
Step 2:
Before you plug your device to PC, Go to Settings > Developer Options
and select USB Connection method
.
在您将设备插入PC之前,转到设置>开发人员选项并选择USB连接方法。
Step 3:
Plug the phone to the PC, you are given options for the USB Connection method
, and please select Internet connection
. Make sure you have connected to the Internet. By the way, I have changed MTP
to PTP
, it did not work for me. Therefore, I tried Internet connection mode
, then it worked.
将手机插入电脑,你可以选择USB连接方式,请选择Internet连接。确保你已经连接上了互联网。顺便说一下,我把MTP改成了PTP,这对我来说是行不通的。因此,我尝试了互联网连接模式,然后成功了。
Step 4:
Run the app in the Android Studio
, it will ask you to authorize the device for development, and select YES!.
在Android Studio中运行app,它会要求您授权设备进行开发,并选择YES!
Step 5:
Run the application via Android Studio
and choose the device, not emulator, and BINGO! Welcome to Android development board.
通过Android Studio运行应用程序,选择设备,而不是模拟器,然后使用BINGO!欢迎来到Android开发委员会。
#4
30
I also tried above solutions but got no luck. So here's what I did:
我也尝试了以上的解决方案,但是没有成功。这就是我所做的:
- Download and install PdaNet+ to fix connection issues between my computer and android device
- 下载并安装PdaNet+以修复我的电脑和android设备之间的连接问题
- Enable USB debugging on my android device
- 在我的android设备上启用USB调试
- Run my app and voila! My android device is now recognized by Android Studio
- 运行我的应用,瞧!我的android设备现在被android Studio识别了
#5
15
Although my computer could recognise my phone, I had to install the official drivers from the Samsung developer site to get adb/Android Studio to recognise it:
虽然我的电脑可以识别我的手机,但我必须安装来自三星开发者网站的官方驱动程序,才能让adb/Android Studio识别它:
Samsung Android USB Driver for Windows
三星Android USB驱动程序。
#6
9
Click Revoke USB debugging authorization in Developer option and try it again.
在Developer选项中单击Revoke USB调试授权并再次尝试。
#7
1
I am sorry that i bothered you all. The problem was my device is cloned in different places in device manager. It was gone when I tried to update driver for my phone in "Other devices" list, and before i have been updating it in wrong sections. Thank you all.
对不起,打扰你们大家了。问题是我的设备在设备管理器的不同地方被克隆。当我试图在“其他设备”列表中更新我的手机驱动程序时,它就消失了,在我将它更新到错误的区域之前。谢谢大家。
#8
1
LG Optimus Zone 2 pp415 d\n connect in mtp, but does work in internet connection mode. Lost lots of time messing with it. There's no doc for this, but I'd suggest trying all 4 of the connection options. Only 1 that works for me is Internet Connection->Ethernet, then win 8 auto-detects a driver and installs it. In MTP mode despite all drivers being registered with device manager, adb doesn't pick it up.
LG Optimus Zone 2 pp415 d\n connect在mtp,但在互联网连接方式工作。浪费了很多时间。这里没有文档,但是我建议尝试所有的4个连接选项。只有一个对我有效的是Internet连接——>以太网,然后win8自动检测驱动并安装它。在MTP模式下,尽管所有的驱动程序都在设备管理器中注册,adb仍然不会接收它。
#9
1
I had the same problem. So here is what i did
我也有同样的问题。这就是我所做的
- reinstalled the device driver
- 重新安装设备驱动程序
- changed the USB computer connection from MTP to Mass storage(UMS)
- 将USB计算机连接从MTP改为Mass storage(UMS)
And it worked.
它工作。
#10
1
Solution for those working with Huawei phones - You will get this error when ADB interface is not installed. Check if you have installed Huawei HiSuite. USB driver gets installed when you install HiSuite (I suppose this is true for most of the new phones that come with a Sync Software). If the ADB interface is installed on your computer you should see 'Android Composite ADB Interface' under Android Phone in your Device Manager as shown in this picture.
为那些使用华为手机的人提供解决方案——当未安装ADB接口时,您将会得到此错误。检查是否安装了华为HiSuite。当你安装HiSuite时,USB驱动程序就会被安装(我想对于大多数带有同步软件的新手机来说都是如此)。如果ADB界面安装在您的计算机上,您应该在设备管理器中看到Android Phone下的“Android Composite ADB界面”,如图所示。
#11
1
For me, I tried the above. Turns out my USB cable was bad. I changed the cable and then it worked.
对我来说,我尝试过上面的方法。原来我的USB线坏了。我换了电缆,然后它就工作了。
#12
0
In my case it was due to already running and hanged adb.exe on another user under my PC. I had two users on my PC, the second user had the adb.exe process hanged even when I tried to end the process. It worked with me after (End Process Tree) from the Task Manager.
在我的情况下,这是由于已经运行和绞死了亚行。在我个人电脑下的另一个用户。我的电脑上有两个用户,第二个用户是adb。exe进程挂起,即使我试图结束该进程。它在任务管理器(结束过程树)之后与我一起工作。
Hope this will help someone with multiple users :)
希望这能帮助拥有多个用户的人:)
Ahmad
艾哈迈德
#13
0
In addition to the above configurations, I had to set deployment target to "Open Select Deployment Target Dialog", run once (choosing my device from the options listed), and from then on Android Studio was able to see my device even after changing the deployment setting back to "USB Device". My SWAG is that since Android Studio uses its own internal cache to find your device, it has to be initialized first.
除了上述配置之外,我还必须将部署目标设置为“打开选择部署目标对话框”,运行一次(从所列出的选项中选择我的设备),然后从那时起,Android Studio就可以看到我的设备,甚至在将部署设置返回到“USB设备”之后。我的建议是,由于Android Studio使用自己的内部缓存来查找设备,所以必须首先初始化它。
#14
-1
Change the connection method Build-In CD ROM it works for me
更改内置CD ROM的连接方法,它为我工作
#15
-1
I was on Samsung S8 and had same problem too. After I installed Samsung Kies, issues was resolved for me, as I believe it had updated the correct driver required for my Samsung S8.
我使用的是三星S8,也有同样的问题。在我安装了三星Kies之后,问题就解决了,因为我相信它更新了我的三星S8所需的正确驱动程序。
#16
-3
On HTC mini one 2, besides enabling the Developer Options, the following worked for me:
在HTC mini 2上,除了启用开发者选项外,以下为我工作:
- Go to More in Wireless & Networks
- 去更多的无线和网络
- Mobile Network Sharing
- 移动网络共享
- In USB network setting
- 在USB网络设置
- Select Internet pass-through
- 选择互联网直通
#1
65
Did you try to configure the "Media Mode" in "Camera (PTP)" instead of "Media device (MTP)"? This is sometimes solving the issue. Its in the USB Computer Connection options of your Android device, you should see an "authorize" dialog then.
您是否尝试在“Camera (PTP)”而不是“Media device (MTP)”中配置“Media Mode”?这有时会解决问题。在你的Android设备的USB电脑连接选项中,你应该会看到一个“授权”对话框。
Update 04/2017: looks like it has been fixed in Android 7.1.2
更新04/2017:看起来它已经在Android 7.1.2中修复了
#2
41
Try swapping the USB port the cable is plugged into.
试着交换插入电缆的USB接口。
Sounds crazy but after 20 minutes of debugging this worked for me.
听起来很疯狂,但经过20分钟的调试后,这个方法对我起了作用。
#3
37
I have done numerous ways of handling that issue. Finally it has worked! I am using LG Optimus II
, but I believe the following steps are generic to other Android devices as well.
我已经用了很多方法来处理这个问题。终于有工作了!我正在使用LG Optimus II,但我相信以下步骤也适用于其他Android设备。
Step 1:
Make sure your device is enabled for development. If yes, go to Step 2, otherwise go to Settings > About phone
and tap Build number
seven times which is magic number :-). Now Developer Options
is available in the Settings
.
确保您的设备已为开发启用。如果是,请转到步骤2,否则转到设置>关于电话,点击7次Build number,这是神奇的数字:-)。现在开发人员选项在设置中可用。
Step 2:
Before you plug your device to PC, Go to Settings > Developer Options
and select USB Connection method
.
在您将设备插入PC之前,转到设置>开发人员选项并选择USB连接方法。
Step 3:
Plug the phone to the PC, you are given options for the USB Connection method
, and please select Internet connection
. Make sure you have connected to the Internet. By the way, I have changed MTP
to PTP
, it did not work for me. Therefore, I tried Internet connection mode
, then it worked.
将手机插入电脑,你可以选择USB连接方式,请选择Internet连接。确保你已经连接上了互联网。顺便说一下,我把MTP改成了PTP,这对我来说是行不通的。因此,我尝试了互联网连接模式,然后成功了。
Step 4:
Run the app in the Android Studio
, it will ask you to authorize the device for development, and select YES!.
在Android Studio中运行app,它会要求您授权设备进行开发,并选择YES!
Step 5:
Run the application via Android Studio
and choose the device, not emulator, and BINGO! Welcome to Android development board.
通过Android Studio运行应用程序,选择设备,而不是模拟器,然后使用BINGO!欢迎来到Android开发委员会。
#4
30
I also tried above solutions but got no luck. So here's what I did:
我也尝试了以上的解决方案,但是没有成功。这就是我所做的:
- Download and install PdaNet+ to fix connection issues between my computer and android device
- 下载并安装PdaNet+以修复我的电脑和android设备之间的连接问题
- Enable USB debugging on my android device
- 在我的android设备上启用USB调试
- Run my app and voila! My android device is now recognized by Android Studio
- 运行我的应用,瞧!我的android设备现在被android Studio识别了
#5
15
Although my computer could recognise my phone, I had to install the official drivers from the Samsung developer site to get adb/Android Studio to recognise it:
虽然我的电脑可以识别我的手机,但我必须安装来自三星开发者网站的官方驱动程序,才能让adb/Android Studio识别它:
Samsung Android USB Driver for Windows
三星Android USB驱动程序。
#6
9
Click Revoke USB debugging authorization in Developer option and try it again.
在Developer选项中单击Revoke USB调试授权并再次尝试。
#7
1
I am sorry that i bothered you all. The problem was my device is cloned in different places in device manager. It was gone when I tried to update driver for my phone in "Other devices" list, and before i have been updating it in wrong sections. Thank you all.
对不起,打扰你们大家了。问题是我的设备在设备管理器的不同地方被克隆。当我试图在“其他设备”列表中更新我的手机驱动程序时,它就消失了,在我将它更新到错误的区域之前。谢谢大家。
#8
1
LG Optimus Zone 2 pp415 d\n connect in mtp, but does work in internet connection mode. Lost lots of time messing with it. There's no doc for this, but I'd suggest trying all 4 of the connection options. Only 1 that works for me is Internet Connection->Ethernet, then win 8 auto-detects a driver and installs it. In MTP mode despite all drivers being registered with device manager, adb doesn't pick it up.
LG Optimus Zone 2 pp415 d\n connect在mtp,但在互联网连接方式工作。浪费了很多时间。这里没有文档,但是我建议尝试所有的4个连接选项。只有一个对我有效的是Internet连接——>以太网,然后win8自动检测驱动并安装它。在MTP模式下,尽管所有的驱动程序都在设备管理器中注册,adb仍然不会接收它。
#9
1
I had the same problem. So here is what i did
我也有同样的问题。这就是我所做的
- reinstalled the device driver
- 重新安装设备驱动程序
- changed the USB computer connection from MTP to Mass storage(UMS)
- 将USB计算机连接从MTP改为Mass storage(UMS)
And it worked.
它工作。
#10
1
Solution for those working with Huawei phones - You will get this error when ADB interface is not installed. Check if you have installed Huawei HiSuite. USB driver gets installed when you install HiSuite (I suppose this is true for most of the new phones that come with a Sync Software). If the ADB interface is installed on your computer you should see 'Android Composite ADB Interface' under Android Phone in your Device Manager as shown in this picture.
为那些使用华为手机的人提供解决方案——当未安装ADB接口时,您将会得到此错误。检查是否安装了华为HiSuite。当你安装HiSuite时,USB驱动程序就会被安装(我想对于大多数带有同步软件的新手机来说都是如此)。如果ADB界面安装在您的计算机上,您应该在设备管理器中看到Android Phone下的“Android Composite ADB界面”,如图所示。
#11
1
For me, I tried the above. Turns out my USB cable was bad. I changed the cable and then it worked.
对我来说,我尝试过上面的方法。原来我的USB线坏了。我换了电缆,然后它就工作了。
#12
0
In my case it was due to already running and hanged adb.exe on another user under my PC. I had two users on my PC, the second user had the adb.exe process hanged even when I tried to end the process. It worked with me after (End Process Tree) from the Task Manager.
在我的情况下,这是由于已经运行和绞死了亚行。在我个人电脑下的另一个用户。我的电脑上有两个用户,第二个用户是adb。exe进程挂起,即使我试图结束该进程。它在任务管理器(结束过程树)之后与我一起工作。
Hope this will help someone with multiple users :)
希望这能帮助拥有多个用户的人:)
Ahmad
艾哈迈德
#13
0
In addition to the above configurations, I had to set deployment target to "Open Select Deployment Target Dialog", run once (choosing my device from the options listed), and from then on Android Studio was able to see my device even after changing the deployment setting back to "USB Device". My SWAG is that since Android Studio uses its own internal cache to find your device, it has to be initialized first.
除了上述配置之外,我还必须将部署目标设置为“打开选择部署目标对话框”,运行一次(从所列出的选项中选择我的设备),然后从那时起,Android Studio就可以看到我的设备,甚至在将部署设置返回到“USB设备”之后。我的建议是,由于Android Studio使用自己的内部缓存来查找设备,所以必须首先初始化它。
#14
-1
Change the connection method Build-In CD ROM it works for me
更改内置CD ROM的连接方法,它为我工作
#15
-1
I was on Samsung S8 and had same problem too. After I installed Samsung Kies, issues was resolved for me, as I believe it had updated the correct driver required for my Samsung S8.
我使用的是三星S8,也有同样的问题。在我安装了三星Kies之后,问题就解决了,因为我相信它更新了我的三星S8所需的正确驱动程序。
#16
-3
On HTC mini one 2, besides enabling the Developer Options, the following worked for me:
在HTC mini 2上,除了启用开发者选项外,以下为我工作:
- Go to More in Wireless & Networks
- 去更多的无线和网络
- Mobile Network Sharing
- 移动网络共享
- In USB network setting
- 在USB网络设置
- Select Internet pass-through
- 选择互联网直通