I downloaded Android Studio using below commands.
sudo apt-add-repository ppa:paolorotolo/android-studio
sudo apt-get update
sudo apt-get install android-studio
Now I couldn't find the path where android studio is installed and don't know how to open it?
cd Downloads //location where installed file located
ls
cd android-studio/bin
./studio.sh
It will not truly 'install'. It is kind of an annoyance for first time users, but it is truly a stand-alone package, it will drop the SDK in your '/home' and you need the 'android-studio' and 'jdk1.8.0_45' folders at a fixed location.
First, you need to set the 'JAVA_HOME' path in your /etc/environment or ~/.bashrc configuration to the 'jdk1.8.0_45' folder before it will run.
After setting your 'JAVA_HOME', run 'studio.sh' again and it will boot the IDE. Then at the menu, hit the 'Configure' button then hit 'Create Desktop Entry'. You should now have a start menu icon, and desktop icon which you can easily use.
Next time you boot and create a project it should download the SDK required for building.
After installation from terminal, luncher icon should be displayed on unity dash board. Press the unity button ( if it is a windows designed keyboard it is the windows logo button in between alt and ctrl) and search for android-studio
Related
I have installed Android Studio in the F:\ drive. My Flutter project is in the E:\ drive.
The Flutter plugin is installed in the Android Studio. But when I open my project in Android Studio and I go to the SDK Manager, it shows the following error:
The android sdk location cannot be at the filesystem root
Every package is disabled and the checkboxes are disabled, so I cannot click them to install Android SDK. The "Edit" link next to the error is not working either.
I came with the same problem because of forgetting "sudo"
Using the new android studio (bumble bee version) .
Restart the app and make sure you have an internet access
That will be enough to create the SDK and it’s directories
Just press Edit ( It is clickable) then download and install the required components.
Download the SDK first, and restore the default settings.
You can find the "Restore default settings" feature here.
What you can do is that you click on edit to surely you will get some version of Android that installs it by default and you click on next it will open another configuration verification window and you click on the next one for last it will tell you or It will update the version of android that was downloaded by default and you click again to finish and you can just select other versions of Android. That worked for me. Linux Ubuntu 20.04.4 LTS
Step 1:
Step 2:
Step 3:
Step 4:
Ready!!
For me it was the system language on Windows, I have changed it to English and it worked.
TL; DR
Make sure:
Your user has write permission into Android SDK directory.
ANDROID_HOME is correctly defined with the correct SDK location.
Description
IMHO it is a really bad practice install SDK into user home directory because:
Packages added will be restricted to a single user.
System administrators won't be able to mirror OS images, thus each engineer will have to install SDK manually.
The old school way is according to Linux directory hierarchy as described at The Linux Documentation Project, which consists on:
Ensure your user has adm privileges
Export SDK environment variables
Obey the filesystem hierarchy, installing the IDE and SDK into /opt
The steps above work perfectly on Ubuntu 22.04 and shall work on other distros with minor adjustments.
1. Ensure your user has adm privileges
grep adm /etc/group | grep ${USER}
adm:x:4:syslog,ventura
lpadmin:x:122:ventura
2. Configure environment variables
/etc/profile.d/
├── ...
├── android.sh
├── ...
├── java.sh
└── ...
where android.sh contains
#!/usr/bin/env bash
export ANDROID_HOME=/opt/google/android/
export FLUTTER_HOME=${ANDROID_HOME}/flutter
TOOLS=${ANDROID_HOME}/platform-tools
TOOLS=${ANDROID_HOME}/tools/bin:${ANDROID_HOME}/tools:${TOOLS}
export PATH=${FLUTTER_HOME}/bin:${TOOLS}:${PATH}
and java.sh your JRE directory
#!/usr/bin/env bash
export JAVA_HOME=/usr/lib/jvm/java-18-openjdk-amd64
3. Install Android Studio and Android SDK
Download latest Android Studio and unpack it into /opt/jetbrains/:
VERSION=2021.2.1.16
sudo mkdir -p /opt/google/android
sudo mkdir -p /opt/jetbrains/studio
# Unpack Android Studio into a versioned folder
tar -xvzf android-studio-${VERSION}-linux.tar.gz
sudo mv android-studio /opt/jetbrains/studio/${VERSION}
# Grant write permission to administrators
sudo chown root:adm -R /opt/jetbrains/
sudo chmod g+w -R /opt/jetbrains/
sudo chown root:adm -R /opt/google/android
sudo chmod g+w -R /opt/google/android
Finally launch Android Studio and choose the SDK location:
This approach is extremely powerful because it allows system administrators duplicate development workstations using rsync -avz without relying onto any username or custom privileges.
I searched for many hours for an answer to this
I reinstalled:
I opened a new folder called Android in C:
Into it I reinstalled the android studio
You have created a new SDK folder within it
Then in the blank path, I entered C: \ Android \ sdk
And that's how it all worked.
Try it!
You can clear invalidate caches and restart android studio like follow picture:
Then start download sdk files :)
Make sure that your internet is working and try to close VPN connections if you have any. Then restart Android Studio and hope for the best.
To solve this issue, I had to close Android studio entirely. When I started the application again, it detected that it had a missing SDK problem and then went ahead with the installation process for it.
Your country should not be among the sanctioned countries (using VPN).
Android Studio by Run as Administrator open.
Download : Android SDK and Android SDK Platform.
Fix error: the android sdk location cannot be at the filesystem root.
For test The VPN is working properly.
Open website : https://developer.android.com/
this is the best solution to this error which is just under any drive you have on your laptop which C:// open a folder called "Android" and under the android folder open a folder called "sdk" and change the sdk file path to this recently created folder. That's All.
When running uiautomatorviewer, I am getting the following NullPointerException error:
I have installed and set up Appium following the setup process and set up environment variables for ANDROID_HOME and the Android SDK. The uiautomatorviewer command is using a Path user variable that points to the directory Sdk/tools/bin, where the uiautomatorviewer.bat file is located. From everything I've read online, running this executable should open up the UiAutomatorViewer application, so I can inspect elements on my Android app. Why isn't this working?
The correct fix for this issue:
Java SDKs 9 and 10 do not work with Appium and the Android SDK. You have to uninstall the Java SDK for the more recent version and install the Java 8 SDK instead.
For Linux
Follow this process:
brew cask uninstall java # uninstall java9
brew tap caskroom/versions
brew cask install java8 # install java8
touch ~/.android/repositories.cfg # without this file, error will occur on next step
brew cask install android-sdk
For Windows
Open Add or Remove Programs menu and uninstall Java 9/10.
Install Java 8 using the installer.
Can you just reconnect the device and restart it and the uiautomator? But make sure the test script is not running in the background. Or you can kill the adb server and restart it again.
You can go and check if you forgot any steps in UIAutomatorViewer Tutorial: Inspector for Android Testing.
I was using uiautomatorviewer with corretto-11.0.13 (after some edits in a .bat file) until I upgraded Android Studio to 2021.2.1 (Chipmunk) (to solve another issue in the Android build) and the problem didn't disappear. Moreover, more problems appeared. uiautomatorviewer didn't work again.
I rolled back to Android Studio 4.1.1, restored a change done in the find_java.bat file, and it worked again.
You must add the following Android/sdk/tools/bin/ in the system environment variable.
If you are using window os, you can do it like following:
Right-click on ‘This PC’ and select Properties.
Click 'Advanced system settings' and select ‘Environmental Variables’ option
Under the 'System variables", select 'Path' and click 'Edit'
Click 'New" and add the path of Android/sdk/tools/bin/ in the like
C:\Users\\AppData\Local\Android\Sdk\tools\bin
then you will be able to run uiautomatorviewer command in the command prompt.
The alternative way is to open command prompt in Android/sdk/tools/bin/ folder and then run uiautomatorviewer command.
I had download Android zip file from the web site developer.android.com
And I try to install like following command in Terminal.
#cd desktop/android-sdk/tools/
#./studio.sh
After this system shows the window with title Android SDK Manager
Is it the proper procedure to install?
You can use apt-get to install , its easier.
1st) Download the repository
sudo add-apt-repository ppa:paolorotolo/android-studio
2nd) Update
sudo apt-get update
3rd) install
sudo apt-get install android-studio
this will install a old version , you just have to update .
If you plan to run adb command you have to set the path on your .bashrc "OR" .profile.
export ANDROID_HOME=~/Android/Sdk
PATH=\$PATH:\$ANDROID_HOME:\$ANDROID_HOME/tools:\$ANDROID_HOME/platform-tools
export PATH
you can create a desktop entry form Android Studio , in case you don't find how to create you can create by creating a file:
/usr/share/applications/android-studio.desktop
inside this file add this lines
[Desktop Entry]
Version=1.0
Type=Application
Terminal=false
Name=Android Studio
Exec=/opt/android-studio/bin/studio.sh
Comment=Integrated Android developer tools for development and debugging.
Icon=androidstudio
Categories=GNOME;GTK;Development;IDE;
i create a script to do all this job but unfortunately i cant send it here.
PS: make sure you have the JAVA_HOME set .
How to install Android Studio in Ubuntu
Duplicate Question is why you are being voted down a simple google search of
android studio on ubuntu 14.04 top result is a referenced question that is protected here
Setting up Android Studio takes just a few clicks.
While the Android Studio download completes, verify which version of the JDK you have: open a command line and type javac -version. If the JDK is not available or the version is lower than 1.8, download the Java SE Development Kit 8.
To install Android Studio on Linux, proceed as follows:
Unpack the .zip file you downloaded to an appropriate location for
your applications, such as within /usr/local/ for your user profile,
or /opt/ for shared users.
To launch Android Studio, open a terminal, navigate to the
android-studio/bin/ directory, and execute studio.sh. Tip: Add
android-studio/bin/ to your PATH environment variable so you can
start Android Studio from any directory.
Select whether you want to import previous Android Studio settings
or not, then click OK.
The Android Studio Setup Wizard guides you though the rest of the
setup, which includes downloading Android SDK components that are
required for development.
Note: If you are running a 64-bit version of Ubuntu, you need to install some 32-bit libraries with the following command:
sudo apt-get install lib32z1 lib32ncurses5 lib32bz2-1.0 lib32stdc++6
If you are running 64-bit Fedora, the command is:
sudo yum install zlib.i686 ncurses-libs.i686 bzip2-libs.i686
Find the Instructions for install Android Studio for Linux from this link
All the information is there, yet feel free to ask anything.
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 installed the latest version of the ADT Bundle 32 bit on my ubuntu 14.04 32 bit. I created an AVD, but it doesn't launch. When I press the start button it shows this message:
Starting emulator for AVD 'NexusOne'
ERROR: 32-bit Linux Android emulator binaries are DEPRECATED, to use them
you will have to do at least one of the following:
- Use the '-force-32bit' option when invoking 'emulator'.
- Set ANDROID_EMULATOR_FORCE_32BIT to 'true' in your environment.
Either one will allow you to use the 32-bit binaries, but please be
aware that these will disappear in a future Android SDK release.
Consider moving to a 64-bit Linux system before that happens.
I tried to fix it by setting export ANDROID_EMULATOR_FORCE_32BIT=true to gedit .profile file and to gedit .bashrc file. Nothing changed.
Thank you for trying to help me!
i have one great solution.
you can start it with eclipse or netbeans.
try :
In Eclipse, click your Android project folder and then select Run > Run Configurations...
In the left panel of the Run Configurations dialog, select your Android project run configuration or create a new configuration.
Click the Target tab.
In the Additional Emulator Command Line Options field, enter:
-force-32bit
Run your Android project using this run configuration.
in netbeans you :
1. wher you choose debuger chose Customize...
in Emulator options write
-force-32bit
click ok. and run application
I solve this problem with the following:
export ANDROID_EMULATOR_FORCE_32BIT=true
Then I start the emulator from the command line. It works!
Hope it's helpful to you.
I did the following
go to the run configuration >target tab> scroll down to the last> Additional emulator command line options>-force-32bit
solution to this problem is given here
Open terminal in ubuntu, and then type gedit .profile
paste this text: export ANDROID_EMULATOR_FORCE_32BIT=true
refresh source i.e. in terminal type source .profile
When no effect, finishing that by restart your device (laptop,pc)
For Android Studio:
Run > Edit Configurations > Android > Android Application > app > Emulator tab
Enable the checkbox next to Additional command line options:
Enter -force-32bit
go to the run configuration >target tab> scroll down to the last> Additional emulator command line options>-force-32bit
I had same problem and now I solved,I have Ubuntu 15.10 And my solution was:
Open terminal
Locate path directory Android-studio at terminal
I wrote export ANDROID_EMULATOR_FORCE_32BIT=true, keyboard key enter
And execute the ./studio.sh locate in folder bin of Android-studio
ON LINUX MINT
Go to terminal
type gedit .profile
paste the below line at end of the page
export ANDROID_EMULATOR_FORCE_32BIT=true
type source .profile in terminal or restart system
ON UBUNTU
Go to terminal
type gedit .bashrc
paste the below line at end of that file
export ANDROID_EMULATOR_FORCE_32BIT=true
type source ~/.bashrc in terminal or restart system
create a shell script :
#!/bin/bash
#
# set export ANDROID_EMULATOR_FORCE_32BIT=true
export ANDROID_EMULATOR_FORCE_32BIT=true
/opt/adt-bundle-linux-x86-20140702/eclipse/eclipse
change the shell script executable and run it to active eclipse
"/opt/adt-bundle-linux-x86-20140702/eclipse/eclipse" is the path of eclipse