I have recently installed Android Studio on Manjaro Linux, but I am experiencing issues every time I have to run the application from the scratch. Namely, in order to start application, I have to be logged in as root, then I have to validate JAVA_HOME environmental variable and finally start the application with ./studio.sh
Here is the full code of that:
[nikodroid@manjaro ~]$ cd /usr/share/applications/android-studio/bin
bash: cd: /usr/share/applications/android-studio/bin: Permission denied
[nikodroid@manjaro ~]$ sudo su
[sudo] password for nikodroid:
[root@manjaro nikodroid]# cd /usr/share/applications/android-studio/bin
[root@manjaro bin]# ./studio.sh
which: no java in (/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/usr/bin/vendor_perl:/usr/bin/core_perl)
ERROR: Cannot start Android Studio\nNo JDK found. Please validate either STUDIO_JDK, JDK_HOME or JAVA_HOME environment variable points to valid JDK installation.
[root@manjaro bin]# cd /usr/java/
[root@manjaro java]# export JAVA_HOME=/usr/java/jdk1.7.0_21/
[root@manjaro java]# export PATH=$PATH:$JAVA_HOME/bin
[root@manjaro java]# cd /usr/share/applications/android-studio/bin/
[root@manjaro bin]# ./studio.sh
So, obviously this runs only when I am keeping the terminal session, once I exit, the application stops working. My question is, what can I do in order to not do this all every time I want to run the application?
Just to mention, I put the following line
JAVA_HOME=/usr/java/jdk1.7.0_21/
in /etc/environment/ in order to persist this environment variable, but it seems that it didn't work.
Thanks!
The experience is identical on all three operating systems, because Android Studio is platform-agnostic. It's a bog-standard JetBrains IDE written in Java. Nothing changes. There are others who claim that Linux is better because it is less resource-intensive.
Linux performs better for Android Studio than Windows. Android Studio needs at least 8 GB RAM to run better. Change your Hard Disk to SSD. Loading/Compiling/Designing/Writing time will be reduced even in 4GB RAM.
Get Started with Android application development using Linux and Android SDK. Developers interested in the Android mobile operating system are able to use the Android SDK and various IDE software to code applications. These apps can then be made available and marketed to Android users around the world.
If the emulator fails to launch due to the error vulkan-1. dll cannot be found , you probably need to update the emulator. To update the emulator in Android Studio, go to Tools > SDK Manager and install the latest stable version of Android platform.
install JRE and JDK with apt
for JRE: sudo apt-get install default-jre for JDK: sudo apt-get install default-jdk
check if all is ok with: java -version
then continue installation Android Studio
It really was a permission issue, as I looked and found out that the owner and group were messed up, so what I did is changing the permission/ownership with:
chown -R root:root android-studio
After this, I just changed the dir with:
cd /usr/share/applications/android-studio/bin
and ran
./studio.sh
It loaded the application without any errors.
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