I download Android Studio - Arctic Fox | 2020.3.1 from their official website in my ubuntu 20.04 LTS.
My installation Process:
I downloaded the zip file and extracted it.
I cd into the /bin/ directory and executed the studio.sh file using ./studio.sh command.
The installation went through but now I'm having a lot of problems.
I want to completely uninstall it without altering anything but don't know how.
I would be glad if anyone could help me.
studio.sh is not an installer. It is the starter.
Uninstall is to delete the directory where you extract the package, no other steps.
BTW, I run Android Studio Arctic Fox on my Linux Mint very well, what are your problems? Mint suppose to be same as Ubuntu.
First, try to delete all the hidden files of Android from the home directory if any exist.
Then, type the following commands in Terminal.
$ cd /usr/local
$ sudo rm -r ./android-studio
sudo snap remove android-studio
As you installed with zip file go into directory where you installed it then do rm file created there
note if you have added it to you path also you need to remove it by rm -rf android-studio/bin/
Related
I'm facing a weird issue. Before I updated my Android Studio, everything went fine in flutter doctor. Once I've updated Android Studio, when I run the doctor, it's showing "Unable to find bundled Java version". I've already downloaded Java installer and installed it on my M1 Mac, but after I restarted, running flutter doctor still shows the same error. The weird thing is, when I uninstall the Arctic Fox version and re-install the older Android Studio version, everything goes fine again when running the doctor. How can I resolve this?
The answer is already posted here.
For Mac User:
Set Java_Home path using below article & then after applying this command.
after that type below command in terminal:
cd /Applications/Android\ Studio.app/Contents/jre
ln -s ../jre jdk
ln -s "/Library/Internet Plug-Ins/JavaAppletPlugin.plugin" jdk
flutter doctor -v
If you are using Android Studio Electric Eel | 2022.1.1.
On Mac
Open "Applications" in Finder. Then right click on Android Studio, select "Show Package Contents".
Inside it, open the "Contents" folder. Inside it you will see folder with named "jbr".
Simply duplicate the "jbr" folder. Then, rename the copy folder to "jre".
Then, flutter doctor. The "Unable to find bundled Java version" warning will disappear.
Thanks to #Javi for provided with alternative method.
For Step 2 & 3, ln -s jbr jre also can get the job done. And I think this is the best method to do.
Here is a little fuller answer for everything I had to do to get Android Studio set up on my M1.
Install Android Studio to the Applications folder
Create a symbolic link to from the jre folder to a new jdk folder. (Due to this bug)
cd /Applications/Android\ Studio.app/Contents/jre
ln -s ../jre jdk
Set the JAVA_HOME environment variable
nano ~/.zshrc
export JAVA_HOME="/Applications/Android Studio.app/Contents/jre/jdk/Contents/Home"
source ~/.zshrc
Install Android SDK Command-line Tools (needed for accepting license)
At this point it should work now (assuming you've also added flutter to your path)
flutter doctor
This is the Windows fix, and it appears to work for me. I am using Android Studio2022.1.1.19
First, right-click the Android Studio icon and open the file directory(location). Your installation folder should be at "C:\Program Files\Android\Android Studio".
When you are already at the Android Studio installation root folder, you will see two folders: "jbr" and "jre".
Copy all the files inside the "jbr" folder to the "jre" folder, then try it again.
Note: This fix is working on my end; just comment down below if it didn`t work on your end.
I did install a fresh version of JAVA SDK, flutter, Android Studio and run the below command directly on the terminal one by one to fix 'Unable to find bundled Java version. ' issue.
cd /Applications/Android\ Studio.app/Contents/jre
ln -s ../jre jdk
ln -s "/Library/Internet Plug-Ins/JavaAppletPlugin.plugin" jdk
flutter doctor -v
Now, you should be able to see the error is disappeared in flutter doctor description in terminal.
Run Flutter doctor, if there´s an error indicating that the java bundled can´t be found (specially if you have Android Studio version Artic Fox), run this commands if using Mac:
cd /Applications/Android\ Studio.app/Contents/jre
ln -s ../jre jdk
ln -s "/Library/Internet Plug-Ins/JavaAppletPlugin.plugin" jdk
Flutter Doctor
This solution is for M1 Mac User
Find your local Java version by typing /usr/libexec/java_home -V. If didn't exist, install the latest ARM Java version here
Set Java_Home path (in my case jdk-17.0.1.jdk) by typing /usr/libexec/java_home /Library/Java/JavaVirtualMachines/jdk-17.0.1.jdk/Contents/Home
Type all of these in terminal
cd /Applications/Android\ Studio.app/Contents/jre
ln -s ../jre jdk
ln -s "/Library/Internet Plug-Ins/JavaAppletPlugin.plugin" jdk
Finally run flutter doctor -v to see all the details changes
In my case, on a macOS Ventura with Intel processor, I had to follow the steps below in order to make Flutter work after upgrading Android Studio to Electric Eel:
cd /Applications/Android\ Studio.app/Contents/
ln -s jbr jre
flutter config --android-studio-dir /Applications/Android\ Studio.app/Contents
Step 3 was important, without it flutter doctor --android-licenses would always fail...
I had the same error after updating Android Studio to 2020.3.1 Patch 3 (on MAC).
After upgrading Flutter from 2.2.2 to 2.5.3 problem was solved.
I also installed "Android SDK Command-line Tools". It's installation is explained here: https://stackoverflow.com/a/68492909/6839552
The accepted solution worked with a slight modification for me. I had to add the -f (or use --force) option to make it work (this is because ln failed with file exists and I kept ignoring that - the existing file must have had a problem).
cd /Applications/Android\ Studio.app/Contents/jre
ln -s -f ../jre jdk
ln -s -f "/Library/Internet Plug-Ins/JavaAppletPlugin.plugin" jdk
flutter doctor -v
I'm running macOS Monterey
Perhaps the simplest option (MAC):
Navigate to: cd /Applications/Android\ Studio.app/Contents/jre
Create a directory: mkdir jdk
Create a soft link: ln -s Contents jdk/Contents
COPY folder
/Applications/Android Studio Preview.app/Contents/jre/Contents
to
/Applications/Android Studio Preview.app/Contents/jre/jdk/Contents
It's #crzorz 's additional answer worked for me. "YOUR_PATH/flutter/packages/flutter_tools/lib/src/android/android_studio.dart". At the bottom of the file, you'll see lines similar to "globals.fs.path.join(directory, 'jre', 'jdk', 'Contents', 'Home')" which #crzorz mentioned.
These lines clearly show on MacOS (old and new versions) and other OS how "flutter doctor" finds the so-called bundled Java.
I use Android Studio Electric Eel. What I did to fix the issue was "create a symbolic link named jre pointing to jbr". Because folder jbr (JetBean Runtime) has the java.exe and other Java Runtime files, but flutter doctor still tries to find a folder named jre.
Update to:
Android Estudio 2022.1 Electric eel + Java 19 + VS Code + Windows 10 x64
Before: Make sure you have JAVA_PATH correctly
1 - Run CMD as Administrator [Not POWERSHELL, because mklink only work for CMD]
2- Run the mklink /d "C:\Program Files\Android\Android Studio\jre" "C:\Program Files\Android\Android Studio\jbr"
3- Run command flutter doctor and Problem solved, but then apears the licenses problem, so
4- Run command flutter doctor --android-licenses wait and accept all
Other way doesn't work, thrown a error: " bla bla bla...already exist..." why?
Because the structure of mklink command: mklink [OPTIONS: /d /j /h rd del] "Path+Name folder/file you want {jre}" "Path+Name folder/file linked {jbr}"
Traduced to human language: Make a Symbolic link [mklink /d] "there with the name jre" to the folder "that is there with the name jbr"
Make sure to use "double quotes" for the files paths and say "please" and not "Just do it" (cmd smell your hurry).
If you dont do it like this, will have problems with sdkmanager and launch devices, because the new Android Estudio don't use jre and that's why many android devices don't launch, and have the 60 second problem.
Copying all contents of JDK and pasting it into a JRE file, worked for me.
After that, I updated my ENV path.
I am using android studio 3.4.2. When I try to update
the android studio it says
"Studio does not have write access to /app/extra. Please Run it by a privileged user to update"
How to solve it?
I would suggest to set your current user as owner of /usr/bin/android-studio
This will resolve the issue in long term:
sudo chown -R $USER:$USER /usr/bin/android-studio
Navigate to your Android studio folder via terminal then run android studio with administrator privileges, using sudo or su. If you provide more information, like which OS you are using, maybe I'll be able to tell you the exactly command line you should use.
Edit:
Open terminal application, then type de following :
cd ~/android-studio/bin *
Now we must run Android Studio script file studio.sh as administrator:
sudo ./studio.sh
If doesn't work try : sudo sh studio.sh
(Optional) To prevent this problem every time you want update android studio, see https://stackoverflow.com/a/37704528/8513494
And is it.
I'm assuming that your android studio is located on your user folder, if there's a problem with this step, you should check /opt/ directory and look out for android studio installation folder or see https://superuser.com/a/1080329
I would suggest setting up your current user as the owner of Android Studio
Linux
sudo chown -R $USER:$USER /usr/bin/android-studio
Mac
sudo chown -R $USER /Applications/Android\ Studio.app
or if you using android studio portable then you can use custom path like this.
sudo chown -R $USER: pathDirOfYourAndroidStudio/Android\ Studio\ Preview.app
For linux mint 20:
sudo chown -R $USER:$USER /opt/android-studio-4.2/android-studio/
Happens on Mac when you do not have Android studio in /Application directory. Move it there, if it is not resolved, try this answer.
Set access to Read and Write (default is Read only)
I'd suggest changing the owner of the android-studio directory, doing so depends on the path of your android studio. Here is mine
sudo chown -R $USER:$USER /opt/android-studio
But you might have the following path
sudo chown -R $USER:$USER /usr/bin/android-studio
Check well and enjoy
If you are a MAC user and running portable AS then the simple solution is to move the application within Application folder. Check this video. It solves my issue after wasting 3 hrs within the terminal but nothing is wasting of time. I am running MACOS 13(Ventura) & AS Electric Ele.
I have already downloaded the android studio IDE.zip and also downloaded the android SDK.
How do I install it, I'm new to Ubuntu ?
In Ubuntu you can use 2 approvach to install Android Studio First one is use the new Developer tools that Ubuntu Team integrated directly on ubuntu. For that you can follow this manual (is writted by an Ubuntu Team member)
https://paolorotolo.github.io/android-studio/
If you want to use the latest version you can simple unzip the file you already have and run the /bin/studio.sh file.
To do that, first check if the file studio.sh has run permissions pressing right click in the file, properties --> permission tab.
After that, open a terminal cntrl + alt + t and navigate to the folder where you unzip Android Studio.
Then after make cd /bin run studio.sh with ./studio.sh &
When you have Studio running you can go to Configure option and then select Create Desktop Entry to create a entry in your Unity launcher
You can install Android studio in Ubuntu with apt or apt-get command.
Please use the following commands:
sudo apt-add-repository ppa:paolorotolo/android-studio
sudo apt-get update
sudo apt-get install android-studio
I am unable to set the Android SDK Path on a fresh install of Android Studio for Ubuntu 14.04. Clicking 'Apply' and 'OK' do not do anything, even though the supplied path is valid.
This error does appear to be linked to file permissions. Another option rather than granting read write and execute rights to everyone is to change the owner/group of the files like so:
sudo chown -R UserNameHere:UserGroupHere android-studio
My Android SDK directory did not have the necessary permissions.
I blindly updated them with
$ sudo chmod -R 777 /urs/bin/android-studio/
and it now works.
I reported a bug for this: https://code.google.com/p/android/issues/detail?id=73155
I'm trying to get set up with an Android development environment using IntelliJ in Ubuntu 12.04. I create an Android Application Module, but when I try to build, I get the following error:
android-apt-compiler: Cannot run program "/home/jon/Programs/android-sdk-linux/platform-tools/aapt": java.io.IOException: error=2, No such file or directory
Several hours of scouring the internet hasn't helped.
By the way, I ran locate aapt in the terminal and found that aapt is located at /home/jon/Programs/android-sdk-linux/build-tools/17.0.0/aapt
It appears that the latest update to the r22 SDK release moved aapt and the lib jar from the platform-tools to the build-tools directory. While we wait for JetBrains to release an update, here's a quick fix using a couple of symbolic links:
From your AndroidSDK/platform-tools directory, run the following:
ln -s ../build-tools/17.0.0/aapt aapt
ln -s ../build-tools/17.0.0/lib lib
...and IntelliJ should be able to compile as normal.
update your IntelliJ to 12.1.4 by using beta releases as the update channel
In Windows it is enough to copy only aapt.exe, lib\dx.jar and dx.bat
from build-tools\android-4.2.2
to
platform-tools
The same problem occurred for me with android-studio. But, this probably applies to the IntelliJ IDE as well.
When checking the file location I saw, however, that aapt was in the expected location.
In my case the issue was that I was running a 64-bit Ubuntu linux system which cannot execute the 32-bit aapt executable.
Installing 32-bit compatibility libraries solved this issue in my case: sudo apt-get install ia32-libs
i solve it with this to line commands
ln -s ~/Programs/android-sdk-linux/build-tools/17.0.0/aapt ~/Programs/android-sdk-linux/platform-tools/aapt
ln -s ~/Programs/android-sdk-linux/build-tools/17.0.0/lib ~/Programs/android-sdk-linux/platform-tools/lib
I also noticed it.
ADT has been updated and they added this new build-tools where they moved everything.
Intellijidea is not updating paths so it's searching aapt in the old path.
I don't know how to solve it, so let me know if you find a solution...
UPDATE:
I think that you have only 2 options:
1) Use Android Build studio: http://developer.android.com/sdk/installing/studio.html
2) Copy (this is dirty but works) all content from build-tools/17.0.0/ to platform-tools/ and it will build
To complain to Jetbrains, go here: http://youtrack.jetbrains.com/issue/IDEA-107311
I reckon more votes will be a faster fix.
Thanks for the tip! On a mac running the Android 4.2.2 SDK, this worked great. You'll just need to update your paths accordingly. E.g.
ln -s ../build-tools/android-4.2.2/lib lib
ln -s ../build-tools/android-4.2.2/aapt aapt
I ran into this issue but with android-maven-plugin
and as a variant of your item #2 rather than copying the file(s) I simply created a symbolic/soft link for aapt
cd platform-tools
ln -s ../build-tools/17.0.0/aapt ./
This approach seemed to get all my builds functioning again.
Clone the android-maven-plugin on GitHub and install it in your repo
git clone https://github.com/jayway/maven-android-plugin.git
cd .../maven-android-plugin/
mvn clean install
Then update your pom to use version 3.5.4-SNAPSHOT of the plugin.
Everything should work properly !
I ran these three commands and my problem was resolved
mklink "%ANDROID_HOME%\platform-tools\aapt.exe" "%ANDROID_HOME%\build-tools\17.0.0\aapt.exe"
mklink /D "%ANDROID_HOME%\platform-tools\lib" "%ANDROID_HOME%\build-tools\17.0.0\lib"
mklink "%ANDROID_HOME%\platforms\android-17\tools" "%ANDROID_HOME%\build-tools\17.0.0\aidl.exe"
If you haven't set ANDROID_HOME Environmental variable the replace %ANDROID_HOME% with the path to your android SDK e.g. C:\Android\android-sdk
On Mac OS you need to
$ cd platform-tools
$ ln -s ../build-tools/android-4.2.2/aapt aapt
$ ln -s ../build-tools/android-4.2.2/lib lib
Goodlife once again.
Just incase of such an error clean project and you are good to go.