eclipse 将应用程序移至手机
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/3595433/
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
Move app to phone
提问by Alan
yesterday I posted the question ‘How do I convert eclipse app for phone?' I have used eclipse to design an android app which runs fine on the emulator and I now want to transfer it to my phone. Sixten Otto kindly offered some advice regarding how to test/debug my app on my phone straight from Eclipse's Run menu. (See Developing on a Device from the Android developer site.)
昨天我发布了一个问题“如何将 eclipse 应用程序转换为手机?” 我已经使用 eclipse 设计了一个在模拟器上运行良好的 android 应用程序,现在我想将它传输到我的手机上。Sixten Otto 就如何直接从 Eclipse 的“运行”菜单在我的手机上测试/调试我的应用程序提供了一些建议。(请参阅 Android 开发人员网站上的在设备上进行开发。)
- Step 1, declare application as ‘debuggable' – done, no problem.
- Step 2, turn on USB debugging on phone – done, no problem.
- Step 3, Setup your system to detect your device – been at this for hours, still no closer to achieving. (And yes I do have the usb driver in the Android sdk).
- 第 1 步,将应用程序声明为“可调试”——完成,没问题。
- 第二步,开启手机USB调试——完成,没问题。
- 第 3 步,设置您的系统以检测您的设备 - 已经这样做了几个小时,仍然没有接近实现。(是的,我确实在 Android sdk 中有 USB 驱动程序)。
All I want to do is move my very simple app from my computer to my phone, for my own use only. I have Samsung Kies on my PC for file transfer and I have a load of files generated by eclipse. Surely there is a simple way of getting an app from PC to phone. Any help appreciated while I still have some hair left. Thanks.
我想要做的就是将我的非常简单的应用程序从我的电脑移到我的手机上,仅供我自己使用。我的 PC 上有用于文件传输的 Samsung Kies,并且我有大量由 eclipse 生成的文件。当然,有一种简单的方法可以将应用程序从 PC 传输到手机。在我还有一些头发的时候,任何帮助表示赞赏。谢谢。
回答by Juri
On your Android device goto Settings/Applications and activate the checkbox "Unknown sources". Then open the folder of your Eclipse Android app project and you'll find the according apk file in the output folder.
在您的 Android 设备上,转到设置/应用程序并激活复选框“未知来源”。然后打开 Eclipse Android 应用程序项目的文件夹,您将在输出文件夹中找到相应的 apk 文件。
You have then several possibilities to transfer this app to your Android powered device:
然后,您有几种可能性将此应用程序传输到您的 Android 设备:
Install over Mail (simplest/fastest/minimum setup required)
Simply send the apk file to your own Gmail account to which you have also access from your mobile Android. Open it from there and the installation will automatically start.
通过邮件安装(最简单/最快/最少需要设置)
只需将 apk 文件发送到您自己的 Gmail 帐户,您也可以从您的移动 Android 访问该帐户。从那里打开它,安装将自动开始。
Deploy on some publicly accessible URL
Alternatively you may have some hosting space somewhere. In such a case what you may do is to create a simple HTML page showing a "Download app" link which starts the download of your APK file (which you deployed on the server). To speed up a bit, you could use the Chrome-to-phone extension for pushing the page to your mobile, or you could create a QR codepointing to your deployed APK file and scan that from your mobile.
Although by having a FTP connection to your webspace you may be quite fast in deploying a new version of your app, this whole process is still quite tedious. Moreover it may not be granted that you have a webspace :)
部署在一些可公开访问的 URL 上
或者,您可能在某处有一些托管空间。在这种情况下,您可以做的是创建一个简单的 HTML 页面,显示一个“下载应用程序”链接,该链接开始下载您的 APK 文件(您部署在服务器上)。为了加快速度,您可以使用 Chrome-to-phone 扩展程序将页面推送到您的手机,或者您可以创建一个指向您部署的 APK 文件的二维码并从您的手机扫描它。虽然通过 FTP 连接到您的网站空间,您可能会很快部署新版本的应用程序,但整个过程仍然相当乏味。此外,您可能无法获得网站空间 :)
Use Dropbox!(my favourite)
Personally my favorite one is to use Dropbox. It requires some setup steps, but Dropbox will be useful for a lot of other things too.
使用 Dropbox!(我最喜欢的)
我个人最喜欢的是使用 Dropbox。它需要一些设置步骤,但 Dropbox 对许多其他事情也很有用。
- Get a Dropboxaccount and install it on your computer
- Install Dropbox on your Android phone
- Create a folder within your Dropbox folder for placing your apk file
- Open Dropbox on Android and browse to the folder. Click on the apk file and the installation will start
- 获取一个 Dropbox帐户并将其安装在您的计算机上
- 在您的 Android 手机上安装 Dropbox
- 在 Dropbox 文件夹中创建一个文件夹以放置您的 apk 文件
- 在 Android 上打开 Dropbox 并浏览到该文件夹。单击apk文件,安装将开始
This is nice once you have set up everything because you don't have to send emails back and forth. Moreover you have publicly accessible folders in Dropbox which allows you to share your app also with your friends (by sending the according URL).
一旦您设置了所有内容,这很好,因为您不必来回发送电子邮件。此外,您在 Dropbox 中有可公开访问的文件夹,允许您也与朋友共享您的应用程序(通过发送相应的 URL)。
I've taken this from a blog postI've written a couple of month ago.