How to Install Android Studio-Majaro-Linux
Open your terminal
Type: git clone https://aur.archlinux.org/android-studio
You should then see android studios repo being cloned to your machine.
Once this process is complete,you can verify that the clone was successful by going into your home folder.You should see an android studio directory as seen in the image below:
With your terminal still open,navigate to your android-studo directory
cd android-studio/
then in your terminal type: makepkg -s
If you get an error that says Cannot find fake binary:
To fix this,in your terminal type :
sudo pacman -S — needed base-devel.
This will install all the missing packages of base-devel group.Then try makepkg -s again:
But if you do not get any fake binary error on your terminal,makepkg -s will execute successfully as seen below:
To see the contents of your android-studio directory as well as to identify the newly built and exact android studio package name for the final step,execute ls on your terminal.
NB: make sure you are still in the android-studio(cd android-studio/) directory in order to see the newly built android studio packages.
Now we simply install android studio using pacman by execute this command in our terminal:
sudo pacman -U — noconfirm android-studio-ide-202.7486908-linux.tar.gz
the name of the directory should match the exact package built you saw in your terminal.To avoid typing it out,you can copy if directly from the terminal by highliting the name,copy(to copy:ctrl+shift+c) and pasting the package name after sudo pacman -U — noconfirm (to paste:ctrl+shift+v) in your terminal.
sudo pacman -U — noconfirm android-studio-ide-202.7486908-linux.tar.gz
The terminal will prompt you for your user password because we are afterall running the command as root(sudo).
Now in some instances such as my case,you might not be able to execute the package,unzip and install directly from your terminal:
This might be the case because you have aliases.And to resolve this,you would have to include the alias to your terminal installation command.But since we already have our package available and accessible from our AUR in pacman.The easiest way out of this is to install android studio directly from pacman.To do this,go to your start menu and type add in the search bar.
open Add/Remove Software
Open the menu and select Install Local Packages
You then navigate to your home folder where your android studio folder is located
Open the folder(Open)
You should be able to see your package.If you are unable to see the android studio package,return to your terminal and rebuild the package using force(-f)..then try to access the folder again using pacman GUI.
But if your package is already available or after you have successfully rebuilt it and navigated to install from local packages using your pacman GUI.You should be able to now install android studio.
Select the android studio package.
Select Apply
You have now installed Android Studio and should be able to see Android Studio in your start menu.
To run Android Studio,select it from your start menu by typing android or android studio in the start menu search area.
In the next tutorial,we will learn how to setup android studio in Majoro Linux.