I have just updated my Android Studio to version 1.5 (latest available for this time).
But in my project I am using Android Annotations. The problem, that I cannot compile my project, it doesn't recognize generated classes by Android Annotations plugin. The greater part of the project is now underlined with red color (error Cannot resolve symbol).
My colleges have the same problem with new Android Studio and Android Annotations.
Is there any solution for this problem available now ? Or the best way is to downgrade studio ?
EDIT
After invalidating cache and restarting Android Studio project was built, but still all generated classes underlined as an error (Cannot resolve symbol)
Try in command-line gradle clean and gradle build outside AndroidStudio
Related
So I am very much a newcomer to the android studio, so I might've missed a few settings here and there, but
when I try to run a code with created java module, it doesn't recognize any of my code.
I attached the screenshot of what the ide returned to me.
I tried to reinstall the newest version of the android studio with the newest version of SDK (I attached another image file.) several times, but it doesn't seem to go anywhere.
For the SDK tools, I have the followings:
Android SDK Build-Tools
Android Emulator
Android SDK Platform-Tools
Also, I did try Build>Cealn Project.
Does anyone know how to fix this problem?
P.S. Here is my build gradle for the java module.
So I recently deleted the -studio64.exe.vmoptions file and the next time I launched it, it's unable to detect common libraries like 'String' and 'System'. I tried to download Jetbrains IDE also, and it throws the same error-
https://i.stack.imgur.com/EV3EV.png
What I have tried so far:
Change gradle build version
Reinstall Android studio
Uninstall Android studio completely- including jdk and sdk dependencies. Upon reinstallation (technically from scratch), the issue still persisted.
Any help will be appreciated. Thanks!
After creating a new empty project in android studio, I created a new module for Java or Kotlin library. But in the java class file keywords such as String, System shows 'Cannot resolve symbol' error. I've tried few things like clean project, rebuild project, invalidate cache/restart etc. nothing worked. I also updated gradle version. I'm using android studio Arctic Fox 2020.3.1 patch 4.
What can I do in this situation.
Project layout image
I download android studio version 1.4 because I want to compile apk from old android studio project, then when ask for jdk location I put jdk location. But android studio did not recognize it.
What is the correct path for jdk in android studio mac?image of error
I want to compile apk from old android studio project
As far as I know, latest Android Studio can compile old projects just fine. Gradle and its plugins are what build the project, not the IDE.
Maybe since you're using an older version, though, Java 12 would not be recognized as valid, and you'd have to get Java 8, possibly
I'm on Linux (Arch Linux) and using Android Studio 2.3.1
When creating a new empty project in Android Studio I get the error:
Gradle sync failed:
org.gradle.internal.jvm.UnsupportedJavaRuntimeException.assertUsingVersion(Ljava/lang/String;Lorg/gradle/api/JavaVersion;)V
Consult IDE log for more details (Help | Show Log)
It seems that there is something with the java version. I have openjdk-8 installed and also tried with Oracle JDK version 8 (also tried with version 7).
Things i've tried:
Using installed gradle or gradle that comes with Android Studio
Removing ~/.gradle and ~/.android.
Update:
If I enter the project directory and run gradle build i.e. using my installed gradle version it seem to build. However, being able to run gradle from Android Studio seem essential to even use Android Studio.
I upgraded to Android Studio 2.3.2 and then this particular problem was solved.
I did not use the package from AUR (Arch User Repository) when upgrading, instead I used the Android Studio "Check for updates" and upgraded that way. I don't know if that matters.
Update:
Happened again when upgrading to Android Studio 3.0.1 from AUR. Installing the official build from http://developer.android.com works though so it's some issue with the build in AUR for ArchLinux.
I had the same problem AFAIK.
Firstly I had a version previous to 3.0.1 of Android, then I downloaded the Android zip package from the official website, then installed it and kept the same old preference files (or so). Then this problem appeared. What I did is uninstalling (thus deleted the android-studio folder in terms of Ubuntu) and installing it back again and it was solved.