Inside the android block, we can set manifest.srcFile to the new location of the AndroidManifest.xml. The good news are that we have the option to change this location on the adle! When I tried to build the app, I got an error saying "Cannot read packageName from src/main/AndroidManifest.xml". But when it comes to the Android source set, the name is not the expected androidMain but rather a plain main.Īs I wanted to keep a consistent and more clear naming for the source sets, I decided to rename the name of the folder main to androidMain. Open the project in Android Studio, and you’ll be prompted to setup the Gradle wrapper: Choose OK to configure the wrapper, which you’ll learn more about later in the tutorial. For the common and the iOS source sets, it uses names like commonMain and iOSMain. At minimum, you’ll need Android Studio 3.0 installed on your computer. When creating a new project, the template creates a few source sets for the common, the iOS, and the Android implementation. But what if for some reason we want to change this?įor me, one such case is the default Kotlin Native project. By default, Gradle expects an AndroidManifest.xml file on the root directory of the main source set of every Android project.
0 Comments
Leave a Reply. |