For a unknown reason Android Studio 3.1 Canary 3 is bugged and stopped to work, I updated gradle to 3.1-alpha03
and it stopped working, no matter if I download the project again, already downloaded Android Studio again too.
I've already checkout old versions of the project, but this message still show:
Gradle sync failed: com.android.tools.idea.gradle.project.model.AndroidModuleModel.getSelectedVariant()Lcom/android/tools/idea/gradle/project/model/ide/android/IdeVariant; (8s 806ms)
I've removed .idea
folder, .gradle
folder, did invalidate and restart
I don't know nothing more to do, cant run or use the IDE.
Edit:
Edit2:
New Projects doesnt work too
Open your gradle. properties file in Android Studio. Restart Android Studio for your changes to take effect. Click Sync Project with Gradle Files to sync your project.
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.
It's a problem with Kotlin 1.1.60-release-Studio3.0-1
plugin.
Uninstall it from Android Studio and fetch an older version from here: https://plugins.jetbrains.com/plugin/6954-kotlin
To solve this issue, you have to either upgrade or downgrade your kotlin plugin
Solution 1: Upgrade Plugin
First go to Tools menu > Select Kotlin > Configure Kotlin Plugin Updates > Select one of the kotlin plugin & press download (stable or early access, i chose early access to solve this issue)
And finally change the kotlin version in build.gradle(Project:) according to the downloaded version
Solution 2: Downgrade Plugin
If your on mac then press: Command + ,
to open preference, then select plugin & search for kotlin & uninstall it, it will rollback to previous version: 1.1.51
On Windows machine, press Control + Alt + S
to open settings dialog, then select plugins & search for kotlin & uninstall it, it will rollback to previous version: 1.1.51
Please Note: Do not uncheck kotlin in plugins else it will disable kotlin & fail to recognise kotlin file & syntax
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