简体   繁体   English

使用 Android 工作室创建和导出.apk 文件

[英]Create and export .apk file using Android studio

I've created an Android app, I want to export it as.apk file so that I can share it with others, can anyone tell me how to create and share.apk file?我创建了一个 Android 应用程序,我想将其导出为 .apk 文件以便与他人共享,谁能告诉我如何创建和共享.apk 文件? Using Android Studio.使用 Android Studio。

Select Build > Build Bundle(s)/APK(s) > Build APK(s) from the toolbar menu. Select Build > Build Bundle(s)/APK(s) > Build APK(s) 从工具栏菜单。 APK file in the following path within your project folder项目文件夹中以下路径中的 APK 文件

app/build/outputs/apk/debug应用程序/构建/输出/apk/调试

İf you want to generate a signed APK file, open the Build menu from the toolbar and select Generate Signed Bundle/APK.如果您想生成签名的 APK 文件,请从工具栏中打开 Build 菜单并 select Generate Signed Bundle/APK。 In next screen you can check APK radio button.在下一个屏幕中,您可以检查 APK 单选按钮。

Next step you'll be asked about your Key store path, Key store password, Key alias, and the Key password To do so, select Create new.下一步将询问您的密钥存储路径、密钥存储密码、密钥别名和密钥密码。 You will find it underneath the input field where you enter the key store path.您将在输入密钥存储路径的输入字段下方找到它。 In the new window, enter the path for your new key store, and then enter a password to protect it.在新的 window 中,输入新密钥存储的路径,然后输入密码以保护它。

Then next screen you can choose debug or release and select V2 (Full APK Signature) and click Finish.然后下一个屏幕,您可以选择调试或发布和 select V2(完整 APK 签名),然后单击完成。

You will find apk in your project folder in the您将在您的项目文件夹中找到 apk

app/release应用程序/发布

To build apk you need to type the command./gradlew assemble in android studio terminal.要构建 apk,您需要在 android 工作室终端中键入命令./gradlew assemble。 This command will create an APK which will be located at {project_path}/{your_module}/build/outputs/apk/此命令将创建一个位于 {project_path}/{your_module}/build/outputs/apk/ 的 APK

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

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