简体   繁体   English

在真实设备上运行Android应用程序

[英]Running Android Application on Real Device

I'm trying to run my Android App on a real android phone. 我正在尝试在真正的android手机上运行我的Android应用程序。 I've done this previously, but now I have a different android phone I want to connect. 我以前已经做到了,但是现在我要连接另一部Android手机。 The phone is a HTC Wildfire A3333 - Android Version 2.2.1 (old I know)... if that's any help. 手机是HTC Wildfire A3333-Android版本2.2.1(我知道是旧版本)...如果有帮助的话。

I have connected the device and shows up in the Windows device manager.. 我已连接设备并显示在Windows设备管理器中。

在此处输入图片说明

I've connected the driver for the phone within the manager, in the same location that worked previously for me ( sdkhome\\extras\\google\\usb_driver\\i386 ) and it always says the driver is up-to date. 我已经将管理器内电话的驱动程序连接到了以前为我工作的同一位置( sdkhome\\extras\\google\\usb_driver\\i386 ),它始终表示驱动程序是最新的。

I just can't get it to appear in the android device list at all! 我只是无法使其完全出现在android设备列表中!

在此处输入图片说明

Even after killing the adb sever and starting it again, it comes up with the connected device in command prompt but still doesn't show in the android device chooser. 即使杀死adb服务器并再次启动它,它也会在命令提示符下显示连接的设备,但仍不会在android设备选择器中显示。 I've restarted my PC and reconnected the phone many times. 我已经重新启动PC并重新连接了电话多次。

在此处输入图片说明

Can anybody help me out here? 有人可以帮我吗?

@ecrip @ecrip

Dude your app needs 2.3.6 [GingerBread API 10] minimum target but you have a 2.2.1(Froyo API 8) device as you said 杜德,您的应用需要最低目标2.3.6 [GingerBread API 10]但您说的是2.2.1(Froyo API 8)设备

<uses-sdk
        android:minSdkVersion="10"
        android:targetSdkVersion="18" />

In your prompt its asking for API 10 you have android 2.2.1(Froyo API 8) as you said so its not listing it here but showing in command prompt this is the problem 在您的提示符下询问API 10,您说的是android 2.2.1(Froyo API 8) ,因此它不在此处列出,而是在命令prompt显示,这就是问题所在

Solution

Either use newer version device or lower minSdkVersion of your application 使用较新版本的设备或较低的minSdkVersion应用程序

@ecrip if adb is listed on command then make sure the min sdk or your application must be less than or equal to your device api version @ecrip(如果命令中列出了adb),请确保最小sdk或您的应用程序必须小于或等于设备api版本

This is very common issue with adb The most common solution if it suddenly stop showing connected device or make it offline and never become online Then 这是adb的一个非常常见的问题。最常见的解决方案是,它突然stop showing连接的设备,或者使其offline并且从不online然后

Restart Eclipse

or Reboot System Reboot System

Alternatively 或者

if usb debugging is enable do this on command prompt move to <sdk>/platform-tools 如果启用了USB调试,请在命令提示符下将此操作移至<sdk> / platform-tools

adb kill-server

adb start-server

adb devices

Note: 注意:

  1. In my cmd i am directly commanding adb cause i have set the adb path to Environmental Variable 在我的cmd我直接命令adb因为我已将adb路径设置为Environmental Variable
  2. If you know the Device ip connected to pc then you can connect it using the following 如果您知道Device ip已连接到PC,则可以使用以下命令进行连接

    adb connect <Your iP address> adb connect <您的IP地址>

在此处输入图片说明


if usb-debugging is desabled do one of following 如果禁用USB调试,请执行以下任一操作

Keep usb debugging enabled on you Android device For Android 2.3.6 在Android设备上启用USB调试对于Android 2.3.6

Settings >> Application Settings >> Development 设置>>应用程序设置>>开发

For Android 4.2 Tab 对于Android 4.2 Tab

Dev Settings 开发设置

在此处输入图片说明

对于Android 2.3.6

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM