Building an apk
已回答
I created a simple helloworld in IDEA using Koplin, but I cannot figure out how to build an apk. I researched it on the web and the closest thing I can get is "Extract signed packages to deploy and run your applications on physical devices" and "Extract a Signed Android Application Package Wizard" and I can't find this option in any of the menu options in the IDE.
TIA
Paul
请先登录再写评论。
Hello,
There should be "Android Application" artifact type in "Project Structure | Artifacts": https://www.jetbrains.com/help/idea/generating-a-signed-apk-through-an-artifact.html
I don't like to go with any type of APK. We face some legal and security issues when using an APK.
Hello @...
TO generate an APK in IntelliJ IDEA, you follow the same steps as you mentioned above for Android Studio. Go to Build | Generate App Bundles or APKs | Generate APK, or you can choose Build | Generate Signed App Bundle or APK.
Also, if you run the project through the Run Configuration, you can get the APK:
app/build/outputs/apk/debug/app-debug.apkIf you’re using Kotlin in IntelliJ IDEA, Android Studio is usually the easier route, open the project there and use Build > Generate App Bundles or APKs > Generate APKs.
If you're using IntelliJ IDEA with Kotlin, the easiest way is to make sure the project is configured as an Android project with the Android Gradle plugin. Then open the **Build** menu and select **Build Bundle(s) / APK(s) → Build APK(s)**. For a release version, you can use **Generate Signed Bundle / APK**. The exact menu options may vary depending on your IDEA version and installed Android plugins.