I created a kotlin project with the command gradle init
, which I can build and run without issues. I know AndroidStudio uses gradle to build/deploy an android project. With this in mind, can i modify the generated kotlin project to also become an android project? I want that when gradle build
is issued, an apk
file is generated, instead of the jar
being generated right now. And, if possible, being able to deploy the apk
to the phone connected to the computer (either via usb or wi-fi).
You actually can, just add the AGP (Android Gradle Plugin) to your build.gradle
script.
And from there, structure your project to as Android Project.
Of course it's like manual type of doing it, It's easier just to start an Android Project from Android Studio cause it will generate all the files needed for Android Project.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.