简体   繁体   English

使用USB电缆从我的电脑安装.apk文件到Android设备

[英]While installing .apk file from my pc to android device using usb cable

I am sorry to ask this again as this has been asked many times and there are many tutorials to this question. 我很遗憾再次问这个,因为已经多次询问过这个问题并且有很多教程。 But still I am not fully understood to do this. 但我仍然没有完全理解这样做。

What I have is a developed application's .apk file, Nexus 7 device and a USB cable. 我所拥有的是开发的应用程序的.apk文件,Nexus 7设备和USB电缆。 I am using windows xp. 我正在使用Windows XP。 I do not want to use any File Manager, I do not have external storage as well. 我不想使用任何文件管理器,我也没有外部存储。 I have .apk file in my C:\\Android folder. 我的C:\\ Android文件夹中有.apk文件。

I used: 我用了:

C:\Users\bShah\Android SDK\sdk\platform-tools>adb shell
shell@grouper:/ $adb install C:\Android\packageName.apk

Then I got error like can't find 'C:AndroidpackageName.apk to install . 然后我得到错误,就是找不到'C:AndroidpackageName.apk来安装 Please do not vote down my question. 请不要拒绝我的问题。 I think it makes sense to me. 我认为这对我有意义。 I could not solve myself that's why I came here. 我无法解决自己,这就是我来到这里的原因。

It's actually 实际上

adb install C:\\location\\to\\apk adb install C:\\ location \\ to \\ apk

You don't have to go into adb shell. 你不必进入adb shell。 When you go into adb shell, it's directed inside android. 当你进入adb shell时,它会被指向android内部。 Not on your machine. 不在你的机器上。

That's why when you type inside shell 这就是你输入shell时的原因

adb install C:\\Android\\packageName.apk adb install C:\\ Android \\ packageName.apk

it return Can't find error . 它返回Can't find error

You should try it with by: 您应该通过以下方式尝试:

D:\adt-bundle-windows-x86-20130729\sdk\platform-tools\adb install yourAPKname.apk

You should give your path of your adt bundle at where it will be located in your PC. 您应该将adt包的路径放在PC中的位置。

How big is the APK file? APK文件有多大? Can you not simply email it to an email account you can access from the device and save the attachment to the internal storage? 您是否可以直接通过电子邮件将其发送到可以从设备访问的电子邮件帐户并将附件保存到内部存储? I've used this method a number of times. 我多次使用过这种方法。

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

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