Android wear project not getting compiled with gradle upgrade - java

I upgrade my Gradle to 2.1 and project started giving this error.
Error:Could not initialize class sun.management.ManagementFactoryHelper
Can anyone help me on this error?

I found out the solution. Firstly I cleared and rebuild the project then restarted android studio using "File --> Invalid cache/Restart" option.
Then after restarting studio gradle ask for fix some requirements. Which downloaded by studio And application started normally.
Cheers...!!!

Related

Why can I not resolve String and System symbols in java Android Studio

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!

Eclipse Oxygen android false missing dx.jar

I just tried to install Android SDK into Eclipse Oxygen.1a Release (4.7.1a) and I just generate the first Android project... "Hello world".
I connect my device, try to run it...and Eclipse show me into the console
"Failed to load C:\Users\Luca Lombardi\android-sdks\build-tools\27.0.0\lib\dx.jar"
"Unknown error: Unable to build: the file dx.jar was not loaded from the SDK folder!"
I checked into this folder, but the dx.jar already existes into this folder!
I already tried to:
Clear the cache and reloaded the package
Tried to install again the Android SDK
Copy the dx.jar into the folder
But nothing has work properly.
Have someone some ideas in order to fix this problem?
I don't beleive that is so difficult start to develop on android...
It happened to me, I also installed the latest Android SDK Build-tools(V 27.0.0), now I have changed to old Android SDK Build-tools(V 25.0.3). now it is fine for me.
new path:android-sdks\build-tools\25.0.3\lib

Android Studio Gradle Sync Failed - Unsupported Java

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.

I can't load any project after updating Android Studio to v2.3

I can't load any project after updating Android Studio to v2.3. Here is a picture of the error:
and it reads:
Cannot load project: com.intellij.ide.plugins.PluginManager$StartupAbortedException:
com.intellij.diagnostic.PluginException:
com/android/tools/idea/gradle/invoker/GradleInvoker$AfterGradleInvocationTask [Plugin: com.drakklord.gradle.metric.core]
After I tried to uninstall the Checkstyle plugin and reinstall Android Studio, I still get the same error. I have updated JDK to 1.8 version.
After removed cache directory also if it is not working, then look at the Terminal for error.
If it says,
[ 96470] ERROR - llij.ide.plugins.PluginManager - null
Then it is the problem with some plugins that you already installed in the IDE.
In my case it was BlackBerry Pugin for Android development. I just removed it from plugins and it worked.
Click on plugins from the bottom right dropdown and uninstall the plugin that you manually installed.
Found this in a similar thread:
• Close Android Studio
• Go to the directory home_dir/.AndroidStudio/system/cache
• Remove all the files in the cache directory.
• Then restart IntelliJ / Android Studio
I'd suggest making a backup of anything before removing.

Android studio 2.2.2 Gradle project refresh failed

I have installed Android studio 2.2.2 in Ubuntu14.04 LTS 32 - bit machine along with OpenJDK8. And it is installed successfully.
But when i create a project or importing sample project it showing => Gradle project refresh failed.
Error:Process 'command '/home/paradigm/ANDROIDSTUDIO/android-studio/jre/bin/java'' finished with non-zero exit value 2
After updating JDK location with embedded/jvm it not changed. I did re-installed studio also. Is there any problem with Studio 2.2.2 ..?
or anything we need to set properties ..? please any one can help on this? thank you
Try to replace JRE from "/home/paradigm/ANDROIDSTUDIO/android-studio/" folder with JRE from your JDK. I had similar error with Android Device Monitor, and this, solved my problem.

Categories

Resources