如何在不发布和Eclipse的情况下在真机上安装Android应用程序?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/2084745/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to install an Android application on a real device without publishing and Eclipse?
提问by AndroiDBeginner
How can I install an application without any developer tools (Eclipse, Android SDK tools)?
如何在没有任何开发人员工具(Eclipse、Android SDK 工具)的情况下安装应用程序?
I've compiled and created an .apk file. Now I am gonna send this apk file to my friend.
我已经编译并创建了一个 .apk 文件。现在我要把这个apk文件发送给我的朋友。
He is not an Android developer; he doesn't know how to use Eclipse or the SDK. And I don't want to publish my application to android market.
他不是安卓开发者;他不知道如何使用 Eclipse 或 SDK。而且我不想将我的应用程序发布到 android 市场。
Is there a way to launch the application on a real device without publishing it or having access to a machine with the SDK?
有没有一种方法可以在不发布应用程序或访问带有 SDK 的机器的情况下在真实设备上启动应用程序?
采纳答案by Kshitij Aggarwal
You can deploy the .apk file on your local server(apache or jboss) with a static IP to make the file available for download. Now just open the download link of the apk file in your mobile browser. The device will automatically start the installation after the download completes.
您可以使用静态 IP 在本地服务器(apache 或 jboss)上部署 .apk 文件,以使该文件可供下载。现在只需在您的移动浏览器中打开 apk 文件的下载链接。下载完成后,设备将自动开始安装。
回答by Mark B
The way I usually do this is:
我通常这样做的方式是:
- Plug in my USB cable to my PC and mount my SD card on my computer
- Get the APK file somewhere on my SD card on the phone
- Unmount the SD card on my PC, allowing the phone to see the SD card contents again
- Use Astro File Manager or some similar app to browse to that file on the SD card and select it, which will prompt you if you want to install the app on your phone.
- 将我的 USB 电缆插入我的 PC 并将我的 SD 卡安装到我的计算机上
- 在手机上的 SD 卡上的某个位置获取 APK 文件
- 在我的电脑上卸载 SD 卡,让手机再次看到 SD 卡内容
- 使用 Astro 文件管理器或一些类似的应用程序浏览到 SD 卡上的该文件并选择它,它会提示您是否要在手机上安装该应用程序。
回答by Diego Torres Milano
You should set Settings -> Application -> Unknown sourcesto allow installation from non-Market. Then, once your application is published somewhere, you can download it an install it.
您应该设置 设置 -> 应用程序 -> 未知来源以允许从非市场安装。然后,一旦您的应用程序在某处发布,您就可以下载并安装它。
回答by user252634
Also you can use 'adb install ' to install apk's to your device.
您也可以使用“adb install”将 apk 安装到您的设备上。
Though this approach requires you to have adb available on your computer and adb is part of the sdk.
尽管这种方法要求您的计算机上有可用的 adb,并且 adb 是 sdk 的一部分。
Another, easier approach, is using DropBox. This enables you to save the apk in the dropbox/public folder, create a URI from there and supply this to your friend. Then have him download the apk. Android will notify him when it's done, so he only has to click the notification and Android will ask him whether or not he wants to install this software.
另一种更简单的方法是使用 DropBox。这使您可以将 apk 保存在 dropbox/public 文件夹中,从那里创建一个 URI 并将其提供给您的朋友。然后让他下载apk。完成后Android会通知他,所以他只需要点击通知,Android就会问他是否要安装这个软件。
回答by tnj
Try DeployGate. With the service you can generate a download page like this:
试试DeployGate。使用该服务,您可以生成这样的下载页面:
Then it will guide your friends to install your app and you can see how is going, e.g.which version is installed or updated, or app is crashed, in realtime.
然后,它会引导你的朋友来安装你的应用程序,你可以看到是怎么回事,如安装的版本或更新,或应用程序的崩溃,实时。
Though it's a very common question, there were no simple way to achieve it. Even if we can send people an APK file through whatever, they have to change the "Unknown Sources" setting before the installation. We have to take care of this kind stuff everyday. It's simply a waste of time. So we made DeployGate, a tester-friendly private app distribution service to help the developers just like you. :)
虽然这是一个非常常见的问题,但没有简单的方法来实现它。即使我们可以通过任何方式向人们发送 APK 文件,他们也必须在安装前更改“未知来源”设置。我们必须每天照顾这些东西。这简直是浪费时间。因此,我们开发了 DeployGate,这是一种测试人员友好的私有应用分发服务,以帮助像您一样的开发人员。:)
Disclaimer: I'm a developer of the service.
免责声明:我是该服务的开发人员。
回答by JSupport
Hopefully you will find the answer from here Install Android application on Android Device
希望您能从这里找到答案在 Android 设备上安装 Android 应用程序
Add your APK file to your device SD card and run it, you must allow to install non-market application on your device before you going to install.
将您的 APK 文件添加到您的设备 SD 卡并运行它,您必须允许在您的设备上安装非市场应用程序,然后才能安装。
Go to Setting -> Application Setting ->Unknown Sourceand tick check box which will allow to install non-market application on your device
转到设置 -> 应用程序设置 -> 未知来源并勾选允许在您的设备上安装非市场应用程序的复选框
回答by matty357
If doing from a windows based server with IIS 7.
如果从带有 IIS 7 的基于 Windows 的服务器执行。
Setup a website, with a page named default.asp
设置一个网站,页面名为 default.asp
Add this line to the asp page;
将这一行添加到asp页面;
Setup a mime with extension '.apk' and MIME type 'application/vnd.android.package-archive'
设置扩展名为“.apk”和 MIME 类型为“application/vnd.android.package-archive”的 mime
When you connect to the page http://yourUrl.co.uk, it will automatically start the download, and include it in the download manager so it can be selected from the drop down menu using default installer.
当您连接到页面http://yourUrl.co.uk 时,它会自动开始下载,并将其包含在下载管理器中,以便可以使用默认安装程序从下拉菜单中进行选择。
If the MIME isn't setup correctly then you will have to use a file explorer to open the apk with an installer.
如果 MIME 设置不正确,则必须使用文件资源管理器通过安装程序打开 apk。
回答by jay
Step-1 : Run Application in AVD First, then Close it.
步骤 1:首先在 AVD 中运行应用程序,然后关闭它。
Step-2 : See in bin/ folder contain AppNm.apk file.Just right click and copy it.
步骤 2:在 bin/ 文件夹中查看包含 AppNm.apk 文件。只需右键单击并复制它。
Step-3 : Now Connect Your Phone with Pc and Turn USB Storage on from your phone.
第 3 步:现在将手机与 PC 连接并从手机打开 USB 存储。
Step-4 : Now go to in your SD card Location and Paste it any location. just remember that location.
第 4 步:现在转到您的 SD 卡位置并将其粘贴到任何位置。只记得那个位置。
Step-5 : Eject/Remove Your phone from pc and check your file in SD card
第 5 步:从 PC 中弹出/移除您的手机并检查 SD 卡中的文件
Step-6 : Now click on it and install....
第 6 步:现在单击它并安装....
回答by revan
what i usually do is: 1. Through mail: i send the .apk to their mail id. 2. do open his mail in his mobile. and download the attached .apk. 3. it will ask for installation and do run.
我通常做的是: 1. 通过邮件:我将 .apk 发送到他们的邮件 ID。2.在他的手机上打开他的邮件。并下载随附的 .apk。3.它会要求安装并运行。