After updating to Android Studio 2.2, I keep getting the error "Unresolved reference" in all kotlin files.
The specific failing gradle task is:
:app:compileStagingDebugKotlinAfterJava (for a variant called StagingDebug)
The only solution I've found so far is to run clean. But I don't want to run this every time in do changes in my code. Any help?
Make sure the kotlin plugin version in Android studio and the kotlin version that you are using(check build.gradle) are the same.
After updating AS please configure your project again like described below: https://kotlinlang.org/docs/tutorials/kotlin-android.html
Always choose Stable channel for Kotlin updates.
I don't think that 1.0.4 version is already in stable channel. Why? The latest version is compatible with the latest version of IntelliJ IDEA, so it may cause problems in the Aandroid Studio which does not follow IDEA versions.
Hope it will help
Related
I was going to upgrade from Android Studio Bumblebee to Android Studio Dolphin. However, I seem to get an unexpected warning from Android Studio:
As you can see the text in red, it shows that newer Android Studio's build does not support Kotlin! However, in details of Android Studio Dolphin, and image shows Kotlin files being programmed, which means Android Studio Dolphin's build actually supports Kotlin:
Should I update or not, and how should I fix this error, as I am a Kotlin Programmer.
Can somebody please help? Would appreciate it.
Edit
As for the Kotlin version, I have the latest Kotlin Version already:
Full answer:
I faced with the same issue and after research I found people say that reinstalling Kotlin plugin or removing it and update Studio should solve the issue, because Dolphin already includes the Kotlin plugin by default.
BUT For sure you should NOT remove the Kotlin plugin, because otherwise Android Studio will fail launching and after that you need to find on your PC the file named 'disabled_plugins.txt' and remove from it Kotlin. OR completely remove Android Studio and reinstall it from the scratch.
Personally I ignored this issue and just updated the Studio. Works well and Kotlin plugin installed. Also I noticed that before update I had Kotlin version 1.7.10 and AS didn't ask for update the plugin. After update I've got 1.7.20.
Good luck :)
For both the Kotlin and Material Theme plugins I get the message that they are "incompatible with the current android studio version." Kotlin files fail to be read as anything other than plaintext, and I get a notification saying, "Plugin supporting feature (Facet[kotlin-language]) is currently not installed."
What's going wrong here? Is anyone else having this problem?
I had the same issue after just installing the latest version of IntelliJ IDEA. I realized that there are some versions listed on their website that weren't compatible. I went to the home menu IntelliJ IDEA -> Check for Updates... and realized there were new Kotlin updates, even though I thought I had just installed the latest Kotlin version on my prior version of IntelliJ a few minutes before. After installing the Kotlin updates, everything worked again.
https://plugins.jetbrains.com/plugin/6954-kotlin
After having this issue on Mac OSX, I reinstalled everything for Android Studio. (Studio itself, SDK's), ... Gradle Sync just does not work anymore. Anybody experiences this also? JAVA SDK Installed is 1.8.0_161.
"Uninitialized object exists on backward branch 70" on gradl sync (see screenshot)
error
android studio version
Bintray was experiencing an outage this morning. This is where a lot of Gradle's Android dependencies are hosted, so it was most likely affecting your Gradle Sync Process. Keep an eye on the status page here, and try again if it turns green. http://status.bintray.com/
This is a bug of JDK old versions. Go to the project structure and change your project to latest JDK version like 1.80_72 or later
After upgrading my Android Studio (on Ubuntu 14.04) to version 3.1.4 I also experienced a build problem:
Gradle sync failed: Uninitialized object exists on backward branch 70
Exception details: error in bytecode
Found out it was due to an old JDK version I have installed locally.
Instead of updating my local JDK I changed the project settings to use the embedded JDK, which, by the way, Android Studio says is the recommended option, and that solved the problem.
To load a fresh APK I am required to clean every time before building. It is like the compiler isn't noticing my code changes.
Here are my configurations:
My project is entirely in Kotlin
Kotlin version 1.1.60
Gradle version 4.4
Android Build Tools version 3.1.0-alpha04
Android Studio 3.0 (stable)
Java 8
Databinding is enabled
Using Kapt
Instant run is disabled
I haven't confirmed if Java code would show the same problems or not.
Has anyone seen this and found a way around it?
I had a android project in Kotlin that worked fine in Idea 14. But on update to 14.1, I seem to have lost support for Kotlin in the IDE. There is no option to create a new Kotlin file on right clicking a package, no syntax highlighting, auto complete etc. whatsoever for Kotlin files. The Kotlin plugin is installed and enabled.
Anyone else facing the issue?
What Version of the Kotlin-Plugin is installed?
Because it seems like a known bug:
Latest Kotlin Plugin not compatible with IntelliJ 14.1