如何从我的 android 项目转换为 .apk 文件?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/11034419/
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 convert from my android project to .apk file?
提问by Bala
I am beginner in android. I am successfully created one application. In that application name is Hello. It's successfully running in My Emulator. My questions are How to convert that application to .apk files. Because how to i run this application(Hello) to my android tablet. If it is possible please send information for how to convert taht application to .apk format. Otherwise if it is not possible send Reason. Please reply your answers and comments are valuable me. Thanks.
我是android初学者。我成功创建了一个应用程序。在该应用程序中,名称是 Hello。它在我的模拟器中成功运行。我的问题是如何将该应用程序转换为 .apk 文件。因为我如何在我的安卓平板电脑上运行这个应用程序(你好)。如果可能,请发送有关如何将 taht 应用程序转换为 .apk 格式的信息。否则,如果不可能发送原因。请回复您的回答和评论对我很有价值。谢谢。
回答by Praveenkumar
Simply try below existing answers -
只需尝试以下现有答案 -
Steps to Export an .apk
导出 .apk 的步骤
Right click your project -> Select Android tools -> Export Signed application package -> Next
Choose create new keystore -> set the new location using browse -> and give new name for key also
give the password & confirm the password also -> Next
Give alias name -> give new or old password & confirm the password also -> fill validity -> and below make one column to fill -> Next
set the .apk file's destination to existing location or new location -> Finish
右键单击您的项目 -> 选择 Android 工具 -> 导出已签名的应用程序包 -> 下一步
选择创建新密钥库 -> 使用浏览设置新位置 -> 并为密钥指定新名称
提供密码并确认密码 -> 下一步
给出别名 -> 给出新密码或旧密码并同时确认密码 -> 填写有效性 -> 以及下面的一栏填写 -> 下一步
将 .apk 文件的目的地设置为现有位置或新位置 -> 完成
回答by Dheeresh Singh
from eclipse
来自日食
refer link
参考链接
http://www.jetbrains.com/idea/webhelp/exporting-a-signed-android-package.html
http://www.jetbrains.com/idea/webhelp/exporting-a-signed-android-package.html
http://developer.android.com/guide/publishing/app-signing.html
http://developer.android.com/guide/publishing/app-signing.html
On the main menu, choose Tools | Android | Export Signed Android Package. The Export Signed Android Package Wizard starts.
在主菜单上,选择工具 | 安卓 | 导出已签名的 Android 包。导出签名的 Android 包向导启动。
from command line :
从命令行:
even it is also important to know about signing
甚至了解签名也很重要
http://developer.android.com/guide/publishing/app-signing.html
http://developer.android.com/guide/publishing/app-signing.html
回答by s.krueger
Rightclick your project in Eclipse -> Export -> Android -> Export Android Application -> Next -> Create new keystore -> Enter infos -> Follow remaining steps
在 Eclipse 中右键单击您的项目 -> 导出 -> Android -> 导出 Android 应用程序 -> 下一步 -> 创建新的密钥库 -> 输入信息 -> 执行剩余步骤
回答by RealTonyFS
Actually if you don't want to publish your app for now,and just want to get it working on your phone, then you just have to copy the yourApp.apk file from /workspace/yourProject/bin directory to your sdcard and then install it.
实际上,如果您现在不想发布您的应用程序,而只想让它在您的手机上运行,那么您只需将 yourApp.apk 文件从 /workspace/yourProject/bin 目录复制到您的 SD 卡,然后安装它。
回答by Barak
Eclipse does that for you (if you are only looking ot test it on your device rather than actually create an .apk, which is what it sounds like you really want to do).
Eclipse 会为您做到这一点(如果您只是想在您的设备上测试它,而不是实际创建一个 .apk,这听起来像是您真正想要做的)。
Simply plug in your device to your computer after you have installed the proper drivers for it and it should show up as a target if you go to Run -> Run Configurations, select your app and then click on the "Target" tab. Select the device and then you are set to run it on your device from Eclipse.
只需在为设备安装适当的驱动程序后将设备插入计算机,如果您转到“运行”->“运行配置”,选择您的应用程序,然后单击“目标”选项卡,它应该会显示为目标。选择设备,然后您就可以从 Eclipse 在您的设备上运行它。