简体   繁体   English

如何使用Android Studio安装APK文件?

[英]How do I install an APK file using Android Studio?

I have an APK file and my developer assistant said to use it to install the app onto my phone, question is, how can I do it? 我有一个APK文件,我的开发人员助理说可以用它将应用程序安装到手机上,问题是,我该怎么办? Just click run? 只需单击运行? I think I tried it and it's not working, only the workshop files were editable ones and could run. 我想我尝试了一下,但它不起作用,只有研讨会文件是可编辑的文件,并且可以运行。

If you have an APK file you don't need android studio. 如果您有APK文件,则不需要android studio。

Copy the file to the device you want to run it on and open it. 将文件复制到要在其上运行的设备上并打开它。 You'll be promoted to either enable developer mode or trust the app as a one off occasion. 您将被提升为启用开发人员模式或一次性信任该应用程序。

You'll then be given the option to install the app. 然后,您将获得安装应用程序的选项。

if you have ADB (android debugger) installed and set as environment path: 如果您已安装ADB(Android调试器)并将其设置为环境路径:

1st option: 第一种选择:

i'd use that from cmd line. 我会从cmd行使用它。 First you have to setup unknown sources from Settings menu and enable developer mode, and then trust USB Debug Options from your device. 首先,您必须从“设置”菜单设置未知来源并启用开发人员模式,然后再从设备信任USB调试选项。 Go to system and you have to tap the version number a few times, you can google this. 进入系统,您必须点击几次版本号,就可以用谷歌搜索。 (That's how it used to be). (过去就是这样)。

From Mac/Windows/Linux: type: 在Mac / Windows / Linux中:输入:

To see if it's in path it should give you help: 要查看它是否在运行中,它应该为您提供帮助:

adb

To enumerate devices connected via USB 枚举通过USB连接的设备

adb devices

To install apk on your local machine to device (force install) 要将本地计算机上的APK安装到设备上(强制安装)

adb install -r ~/Desktop/some.apk

Or in Windows you can put your full path (force install) 或者在Windows中,您可以输入完整路径(强制安装)

adb install -r c:\Users\something\Desktop\some.apk

2nd option: 第二个选择:

You can put APK on google drive, or some website you can access, even one drive or via email, then you can save it onto your device. 您可以将APK放置在Google驱动器或您可以访问的某些网站上,甚至可以驱动一个驱动器或通过电子邮件,然后将其保存到设备上。 Using ES File Manager, or some files manipulation tool, you can install it directly from there. 使用ES File Manager或某些文件操作工具,可以从那里直接安装它。

3rd option: 第三种选择:

Use Google Play Beta or Alpha delivery methods. 使用Google Play Beta或Alpha交付方式。 You can do a closed or open beta, and post it up there. 您可以进行封闭或开放测试版,然后将其发布在那里。 That way all you need is a play.google link and then you will be able to install it, and manage updates via this method. 这样,您只需要一个play.google链接,便可以安装它,并通过此方法管理更新。 I use this as I test alpha/beta APK Android Game deployment, and am able to distribute a URL (for open beta/alpha), and users can easily test it via this method. 我在测试Alpha / Beta APK Android游戏部署时会用到它,并且能够分发URL(适用于开放的Beta / Alpha),并且用户可以通过此方法轻松对其进行测试。 Amazon App Store and iTunes App Connect (iOS) has similar type options, too, but I'm just assuming you would distribute this App/Game via Play. Amazon App Store和iTunes App Connect(iOS)也具有类似的类型选项,但我只是假设您将通过Play分发此App / Game。

Remember if it's unsigned apk, you need to be able to enable side-loaded apks via your settings, app sources. 请记住,如果它是未签名的apk,则需要能够通过您的设置和应用程序源启用侧面加载的apk。 If it's signed by a trusted developer then this shouldn't be a problem. 如果它是由受信任的开发人员签名的,那么这应该不是问题。

Try PdaNet+. 尝试使用PdaNet +。

It will easily install android studio application to your android mobile. 它将轻松地将android studio应用程序安装到您的android手机上。

Download PdaNet+ for PC. 下载适用于PC的PdaNet +。

In mobile open Debugging.For Debugging go to Settings -> About phone -> SoftwareInfo -> Build Number -> Click 7 to 8 times on Build Number.It will open Developer Option.Go back to Setting there you see Developer option.Then in Developer Option search for USB Debugging and open it.Then connect your mobile to PC with USB. 在移动设备中打开Debugging。对于Debugging,请转到Settings-> About phone-> SoftwareInfo-> Build Number->在Build Number上单击7到8次,它将打开Developer Option。开发人员选项搜索USB调试并打开它,然后使用USB将您的手机连接到PC。

Insatll PdaNet+ it ask to connect mobile,connect it with USB it will download mobile software. Insatll PdaNet +要求连接手机,将其与USB连接将下载手机软件。

After completing your program,in Android studio click on 'Run App' (Green symbol as Play Button) then it will show your Android Mobile in Connected Device.Then it will install Android Studio application to your mobile. 完成程序后,在Android Studio中单击“运行应用程序”(绿色符号为“播放按钮”),它将在连接的设备中显示您的Android Mobile。然后,它将Android Studio应用程序安装到您的移动设备上。

First you need to turn on "download from other sources" or something(I can not remember the option exactly) from your phone's setting. 首先,您需要从手机设置中打开“从其他来源下载”或其他功能(我无法完全记住该选项)。 You can upload the apk file to google drive. 您可以将apk文件上传到Google驱动器。 And navigate to the directory use you phone, click and download file. 并使用您的电话导航到目录,单击并下载文件。 And then you should be able to run and install the app to your phone. 然后,您应该能够运行该应用程序并将其安装到手机上。

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

相关问题 如何使用Android Updater脚本安装APK - How do I install APK using Android updater script 我已经使用 ionic 和 angular 构建了一个简单的应用程序? 如何在不使用 android studio 的情况下生成带电容器的 apk 文件? - I have build an simple app using ionic with angular ? How do i generate apk file with capacitor without using android studio? 如何使用android studio在Android设备上安装驱动程序? - How do I install a driver on an android device using android studio? 如何在 Visual Studio 中生成 install.apk 文件? - How can I install .apk file generated in Visual Studio? 如何在 android studio 上为 Android Apk 文件生成 SHA512 校验和 - How do I generate SHA512 checksum for an Android Apk file on android studio 如何使用android studio使用proguard来混淆android .apk文件? - How to obfuscate android .apk file using proguard using android studio? 如何在 Android 模拟器中安装 APK 文件? - How do you install an APK file in the Android emulator? 如何在 Android Studio 中的设备中简单地安装 apk - How to simply install apk in device in Android Studio 如何在 Android Studio 的模拟器上安装 apk? - How to install an apk on the emulator in Android Studio? 如何在android模拟器中安装.apk文件? - How do I Install .apk files in the android emulator?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM