I'm trying to run google firebase example but got an "Project isn't linked with Gradle" error when opens gradle file. Also files visible only in "project-veiw". It looks it because projet use gradle.kts. How i need to set it up to make project working?
Open the Project pane from the left side of the IDE and select the Android view. Right-click on the module you would like to link to your native library, such as the app module, and select Link C++ Project with Gradle from the menu.
For this, you have to connect your PC to the internet and you have to open your Android studio. After opening your project click on the Sync Project with Gradle files option. This will automatically download the new Gradle files and will fix the issue which is caused by the Gradle files.
I had similar issue.
I have Added empty build.gradle file in the root of the project that uses Gradle Kotlin DSL (projects may use build.gradle.kts for config, however empty build.gradle file is required by grade to function correctly)
Update:
You should also add this line to settings.gradle.kts
file:
rootProject.buildFileName = "build.gradle.kts"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With