I editted VM configurations under Help. However, the next time I launched Android Studio, it threw an error saying "Imporperly specified VM option". I tried some fixes I found on Stack Overflow, but none of them were helpful as there is no folder in the directory: "Users/$Username$/AppData/Roaming". I even tried to delete the studio64.exe.vmoptions AND/OR the studio.exe.vmoptions file under Android/Android Studio/bin. But this too, doesn't make the error go away.
How do I go about this issue?
Issue has been solved. For those of you who cannot find the folder with directory: SystemDrive/Users/$Username$/AppData/Roaming, use command line interface on your systems to go to that directory and then delete the .vmoptions file.
Command:
cd SystemDrive/Users/$Username$/AppData/Roaming/AndroidStudio20XX.1
del "*.vmoptions"
After this is done you should be able to launch android studio as per normal.
Related
After clean install of Android Studio I always get the error
Error:java.util.concurrent.ExecutionException:
java.lang.RuntimeException: No server to serve request. Check logs for
details.
and
Error:Execution failed for task ':Application:mergeDebugResources'.
Error: java.util.concurrent.ExecutionException: java.lang.RuntimeException: No server to serve request. Check logs for details.
Java is up to date and the path is set.
I am new to Android Studio, what should I try?
We ran into the same issue, and have been able to find the root cause: The error message means that Gradle cannot connect to some worker processes. In our case, the process was for 'aapt2'. Running 'ldd aapt2' indicated that some shared libraries were missing (mainly GLIBC). Since we're using Docker based on Alpine Linux, it comes with a reduced GLIBC (glibc-musl). The solution was to simply install glibc in the Docker container.
I suggest you run ldd build-tools/{version}/aapt2
to see which libraries are missing from the OS. You did not mention your OS, are you also using Docker and AlpineLinux ?
In my case, I did not need to re-download the sdk. I closed Android Studio and ran the following command in the Terminal:
sudo chmod 777 -R ~/Desktop/AndroidStudio
...where, ~/Desktop/AndroidStudio was the folder structure after Root which I needed to mention in order to provide permission to read all the SDK packages and perform required operation as and when necessary by the Android Studio, because my Sdk folder was inside "~/Desktop/AndroidStudio".
I am running Android Studio 3.0.1 on Ubuntu 16.04 LTS. This worked for me perfectly :-)
This error occurred because you might have accidentally remove the executable flag from aapt2 which is located in $ANDROID_HOME/build-tools/27.0.2.
Try this:
Re-download the sdk (recommended)
followed by-
sudo chmod 777 -R $ANDROID_HOME
Note:
$ANDROID_HOME is the location where I put android sdk
Hope this helps !!
Had to uninstall Android studio and delete the following
SDK folder in AppData folder
Delete .gradle folder
delete .AndroidStudio Projects folder
and did a fresh install which solved .
I had this problem on lubuntu-16 32bit (and also some other problems too). all of the problems were solved when I updated my system to lubuntu-16 64-bit.
Here how I fixed this Issue:
1.Deleted .gradle folder.
2.Closed android studio and run as administrator.
On Start android studio will rebuild the folder you deleted.
sudo chmod 777 -R $ANDROID_HOME
Note: $ANDROID_HOME is the location where you put android sdk
Hope this helps !!
If it is possible for you, please delete the build folder of project and test building android project with any other version of build-tools.
in my case, build-tools version: 26.0.2 had problem, I tested with 27.0.3 and it solved my problem unbelievably :)
I ran into the same problem, and it turned out I had messed up the file permissions inside the android-sdk folder (more specifically android-sdk/build-tools/{version}), and some binaries were missing execution permissions.
In my case, I simply gave x permissions to the relevant files in that directory, but if you're not sure, I suggest you uninstall the android sdk, completely remove its directory and then reinstall it again.
So after investigating the issue for long , I have a concrete solution .
Let`s look into it.
Go to Android Studio -> Help -> Show Log In Files
In the subsequent folder that opens, open idea.log
This would present you with a log file which contains logs of processes right from when the studio started. Now in this file, you have to search for the possible issue. For some the issue might be due to
java.io.IOException: Cannot run program "/home/mmt/Android-Sdk/android-sdk-linux_x86/emulator/emulator-check": error=13, Permission denied
For some others, it may be some other. The point is that this file contains lot of irrelevant logs and you have to identify the one that is causing this issue. For me , after discovering the above issue, I granted permission to that particular folder using the below commands
cd $ANDROID_HOME/sudo chmod -R 777 emulator/
After this, rebuild your project and tadaaa.. problem resolved.
for me it was a virus that corrupted my files from the "build tools" folder. so I uninstalled everything and made a new installation of android studio, SDK and build tools.
For me, this is the side effect of another issue that I haven't root caused yet. Every once in a while, I get aapt2 failures because some file /tmp/ld-linux-x86-64.so.2 is "busy", with the following error message.
AAPT err(Facade for 1745790725): cp: cannot create regular file '/tmp/ld-linux-x86-64.so.2': Text file busy
Slave 1745790725 failed to start java.lang.RuntimeException: AAPT slave failed to start. Please make sure the current build tools (located at ~/.../android-sdk-linux/build-tools/27.0.3/aapt2) are not corrupted.
When this happens I just rm that file and everything starts working again. I suspect this might be caused by me actually having two installs of adb (one through ubuntu via apt and one from Android studio) but I haven't had time to dive deeper.
I already had latest version of build-tool installed, so I just had to give permission to Android_home:
chmod 777 -R $ANDROID_HOME
and build again. This worked for me.
If you are on Windows 10 (sigh), close android studio and then right click on android studio icon and select 'Run as Administrator' from 'more' menu.
Build again.
You can run Android Studio as Admin.
I hope it will help you.
To Do So :
Right click
choose Run as Administrator
Best regards,
I installed JProfiler, after 2 days i uninstall Jprofiler (in Ubuntu) but when i run my application Netbeans IDE shows following Error:
Error occurred during initialization of VM
Could not find agent library /home/bsoft/jprofiler7/bin/linux-x86/libjprofilerti.so in absolute path, with error: /home/bsoft/jprofiler7/bin/linux-x86/libjprofilerti.so: cannot open shared object file: No such file or directory
Please help me to solve this problem.
Finally i solved the problem.
i just removed two files(startup_jprofiler.sh, setenv.sh) from my tomcat installation directory(/var/lib/tomcat6/bin).**
Please first make sure that, your JVM is working or not. Try to start JVM from command prompt. It you are able to launch java.exe file then there are some problems with your project.
You are using netbeans. So before starting netBeans remove cache of netBeans. There are changes that your netBeans is pointing to old class path of jProfiler.
Regards,
Gunjan.
I have installed jdk1.6 in E: drive of windows 7.I developed a simple .java file and try to run it through the command prompt using "javac" but it says javac is not recognized as internal or external command.So i checked just by running java it runs fine .so I thought that i should uninstall that jdk and reinstallit but i am getting windows 1723 error
opened a control panel and tried to remove jdk from there but got this "Error 1723.There is problem with this Windows Installer package.A DLL required for this install to complete could not be run.Contact your support personnel or package vendor"
to be able to run javac from the command line, you need to add the path to javac to the PATH environment variable.
It looks like the 1723 error describes a problem with the installer itself. I would follow the advice from Microsoft Answers and Oracle to fix the installation. A correct install of Java should add the necessary entry on the Windows PATH. Make sure you open a new DOS (or Command) window after installation otherwise the amended PATH might not be picked up.
Probably,you are facing the below issue: https://forums.oracle.com/forums/thread.jspa?threadID=2213081. You can use ccleaner to uninstall all the instance of jdk/jre.The issue is happening due to interrupting in installing/uninstalling.If ccleaer is not solving your problem registry cleaning is the only option as shown on the above link.
You probably have java.exe on your \windows\system32 folder... And since this folder is on the path env var it got confused. Try to delete this/these java*.exe files from \windows\system32 folder.
If you encountered a problem with Java error 1723 when you try to reinstall Java.
It may occur when you delete the Java directory by error
_ Go to your Microsoft Event Viewer you'll see one error line like this
Event viewer
_ Then copy an Java bin directory from an other server to have back the lost dlls in the directory mentioned in the events viewer
_ finally reinstall Java
Hope it helps
I have used Microsoft utility(fix-problems-that-block-programs-from-being-installed-or-removed) to resolve this error it saved me doing manual work and it is safe also :
https://support.microsoft.com/en-us/help/17588/fix-problems-that-block-programs-from-being-installed-or-removed
I'm trying to run the android tool from command line and I keep getting
sdkmanager.jar not found
I've seen a few other questions with this, but none had a clear answer on how to fix it. I believe it's a path problem. It seems obviously a path problem. But how do you change the path in Mac?
I'm an experienced windows user and have always had to install java instead of it coming with the software updates. I even downloaded the 1.7jdk preview port they have for mac that's still in beta.
I just don't know how to change the path so it works. The other person who posted this issue added a EXPORT PATH=/somedir/android-sdk/:$PATH to her .bash_profile but there was no response as to whether it worked. I've tried it. It doesn't, and I wouldn't expect it to because there's no sdkmanager.jar anywhere in the android-sdk-macosx they give you.
Every tutorial on android I've found using Mac has come with ALOT more files than the current sdk you download from android does. I have two empty addon/platform directories and a tools directory with scripts in them. No jar files or anything else.
Please help!
today I fixed this :-) on Mac Lion (server):
1- open Terminal
2- Type cd ~ to go to your home directory ( you will be there by default)
3- Type touch .profile to create a hidden file named profile
4- Type open -e .profile this will open the file you created in TextEdit
5- In the file, type export PATH=${PATH}:FULL_PATH_WHERE_ANDROID_SDK/android-sdk-mac_86/platform-tools
FULL_PATH_WHERE_ANDROID_SDK: where is sdk, don't forget / before, so it will be i.e.
/users/mmm/sdk
6- save file
7- exit TextEdit
8- quit Terminal, and Relaunch Terminal
9- Now type again : adb devices if you get
>List of devices attached
So you did it successfully ..
Good luck
It should be Export PATH=/somedir/android-sdk/:$PATH. This will append the android-sdk dir to the beginning of path. The example you posted is not exporting any variable.
I had installed Java in my PC and it was working perfectly. Suddenly something went wrong and now I m not able to open swing applications and its showing the error 'Java not found'. But I can run the Eclipse IDE which also needed Java to run. So I decide to reinstall the Java, but when I tried to uninstall the Java it shows the Error 1723 - There is a problem with this Windows Installer Package. So I have installed a new JDK in another location and set the PATH. Still I am not able to run the Swing application.
Can anybody help me on this?
How are you running your swing application?
If it's from the command line like java mySwingApp and you're getting java not found then your PATH isn't set properly. Make sure that the java/bin directory is on your PATH not just the top level directory. You can test your PATH by just typing java in a console window - it should print the java help page.
If you're not running from a terminal like above, then you may need to set a JAVA_HOME environment variable which points to your java installation folder. Here's a tutorial on setting JAVA_HOME
Setting JAVA_HOME
Hope this helps,
Will
This is close to jakob's answer, about trying to get your Java install setup correctly again, just with a little more detail.
I had a similar problem on my Windows 7 box where I was trying to uninstall Java and do a clean install of a newer version. Something got messed up and I would get the 1723 error message during the uninstall and attempted reinstall. Here's information about how I was able to fix the problem, and maybe this will help you:
Look at the log files for the uninstall/reinstall. On Windows 7 they can be found at c:\users\username\AppData\Local\Temp\
The java_install.logdidn't show any extra information, but I had several MSI##### log files that contained error messages about the failed uninstall. The message was: Error 1723.There is a problem with this Windows Installer package. A DLL required for this install to complete could not be run. Contact your support personnel or package vendor. Action UninstallJRE, entry: MSIUninstallJRE, library: C:\Program Files\Java\jre6\bin\regutils.dll
There was indeed no regutils.dll file, and not even the bindirectory was there. So I copied over a regutils.dll file from another computer, ran the uninstaller, and it worked. Then the new clean install of Java also worked.
So take a look at your logfiles and hopefully that will give you more detailed information about the 1723 error.
This usally happens when you delete Java files manually.
If you try to uninstall Java and it fails, it generates a log file.
Should be in C:\Users[Username]\AppData\Local\Temp
Almost at the end the missing file(s) can be found.
Try to copy that file(s) from a working installation to your computer.
Then you should be able to uninstall your Java and install a new version.