I can't install Android Studio - android

I use Ubuntu 14.04 LTS.
My JDK version is 1.8.0_31.
I downloaded Android Studio archive, unpacked it and ran a studio.sh file. But every time the installation begins an error occurs:
Refresh Sources:
Failed to fetch URL http ://dl-ssl.google.com/android/repository/addons_list-2.xml, reason: File not found
Fetched Add-ons List successfully
Refresh Sources
Failed to fetch URL http ://dl-ssl.google.com/android/repository/repository-10.xml, reason: File not found
Refresh Sources:
Failed to fetch URL http ://dl-ssl.google.com/android/repository/repository-10.xml, reason: File not found
There is nothing to install or update.
The following SDK components were not installed: build-tools-21.1.1, source-21, sys-img-x86-addon-google_apis-google-21, extra-android-m2repository, android-21, extra-google-m2repository, addon-google_apis-google-21, platform-tools
Moreover, when I run the studio.sh file following text appears in terminal:
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=350m; support was removed in 8.0
Also I tried to install the Android Studio from Paolo Rotolo's repository, but the same problem occurs.
I am rookie in Ubuntu, so I hope only for your help.

I also met this problem. Even I can download the xml files from browser, the android update sdk process keep reporting file not found. A search from google leads me to here:
https://code.google.com/p/android/issues/detail?id=76268
The first anwser reminds me of permission problem of ~/.android. I checked, and found that this hidden directory is not owned by me. Change the owner of the directory solve the problem.

Its not that tough actually, just follow the following steps:
first of all make sure your ubuntu is uptodate. open >Unity>Software updater.
Install latest Jdk - in my case its Java8
Installing java
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java8-installer
Make it default version
sudo apt-get install oracle-java8-set-default
Installing Android Studio
Download Android Studio from here, use All Android Studio Packages
Extract the archive file into an appropriate location for your applications, eg: /opt. Use the filename of your downloaded archive, in my example android-studio-ide-141.2178183-linux.zip
sudo unzip android-studio-ide-141.2178183-linux.zip -d /opt
To launch Android Studio, navigate to the /opt/android-studio/bin directory in a terminal and execute ./studio.sh. Or use a desktop file, see below. Make sure you type "./studio.sh"
You may want to add /opt/android-studio/bin to your PATH environmental variable so that you can start Android Studio from any directory.

sudo studio.sh
running it as root solved for me

Related

How to install Android sdk to Ubuntu 14.04?

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.

Cordova error while adding android in mac

I'm working on a macbook and developing with cordova. Now, I want to create an Android apk, but, when I type cordova platform add android I get this:
Error: The command "android" failed. Make sure you have the latest Android SDK installed, and the "android" command (inside the tools/ folder) is added to your path.
Ok, this message should be very clear about what to do next, but don't know what to do. When I search I keep getting how to solve this in Windows and can't follow steps.
What (and how) should I do?
Thanks
EDIT:
I've already installed Android SDK when trying to compile apk.
More info:
As I couldn't install ANT, I uninstalled it: brew uninstall ant. But when brew install antagain I got:
$ brew install ant
==> Downloading http://www.apache.org/dyn/closer.cgi?path=ant/binaries/apache-ant-1.9.3-bin.tar.gz
==> Best Mirror http://apache.rediris.es/ant/binaries/apache-ant-1.9.3-bin.tar.gz
curl: (22) The requested URL returned error: 404 Not Found
Error: Failed to download resource "ant"
Download failed: http://apache.rediris.es/ant/binaries/apache-ant-1.9.3-bin.tar.gz
Some things to make sure you have completed before starting w/ Android:
Make sure ANT is installed:
Try ant --version, if command not found you need to install ANT.
The easiest way I have found is to use Homebrew. If you do not have homebrew installed, get it here
Once installed run
homebrew update
homebrew install ant
Unpack Android SDK:
Download and unpack the SDK package, place it in an easy to find location.
Then add the tools and platform-tools paths to your global PATH, like this:
vi ~/.bash_profile
add this line:
export PATH=/path/to/android/sdk/tools:/path/to/adnroid/sdk/platform-tools:$PATH
Exit the terminal and re open the terminal.
Now you should be able to run cordova platform add android in your project folder.

the sdk manager won't open after trying everything

I have installed the Android SDK but I can't get the Adroid SDK manager to open.
I have looked everywhere on the internet and this is what I have already done which didn't help:
1. run sdk as administrator
2. adding a path pointing to the JDK in all of these forms :
C:\Program Files\Java\jdk1.7.0_21\bin;%SystemRoot%\system32;
C:\Program Files\Java\jdk1.7.0_21\bin;
C:\Program Files\Java\jdk1.7.0_21\
C:\Program Files\Java\jdk1.7.0_21
C:/Program Files/Java/jdk1.7.0_21/bin;
none of them worked ..:-(
3.
Step #1: Open up a command prompt.
Step #2: Use the cd command to move to wherever you installed your Android SDK.
Step #3: Run tools\android.
after doing it I got an error message that said that :
ERROR: No suitable Java found. In order to properly use the Android Developer
Tools, you need a suitable version of Java installed on your system.
4. deleting 3 times the sdk and reinstalling it.
5. Deleting the .android folder from the user (C:/Users/[User Name]) directory
By the way I have Windows 7 , and I have downloaded the 64 -bits sdk.
I am so helpless.. I ll appreciate a lot a solution...
Shiran
I had the same problem. Try to add an environment variable :
JAVA_HOME : "C:\Java\jdk1.7.0_25\".
It solves problem for me.
WRT Ubuntu 14.04:
You may not have java installed globally in your machine. My fix was to do:
sudo apt-get install openjdk-7-jdk
After was I able to run the SDK Manager.

Failed to parse the output of 'adb version'

I'm using Ubuntu 11.10 and Eclipse for android developing. I've already made a new project, but it contains error:
Failed to parse the output of 'adb version'
I will be thankful if anyone have an idea how can I fix that?
Install Oracle JRE using PPA:
sudo add-apt-repository ppa:ferramroberto/java
sudo apt-get update
sudo apt-get install sun-java6-jre sun-java6-plugin sun-java6-fonts
Install ia32-libs from software center.
Two options to solve this problem on windows:
Option 1:
Close the eclipse, if it is running.
Run the command prompt.
Go to the tools location of the android sdk.
run 'adb kill-server'
then run 'adb start-server'.
start the eclipse.
Option 2:
Open the task manager.
kill the adb process.
start the eclipse.
Problem should be solved.
The official Android SDK only runs on i386 JVM, so you need to manually specify the i386 JVM on Eclipse.
First install the Sun(Oracle) 32-bit JVM. Here is a step-by-step on how to do this:
Add the JVM to Eclipse. Navigate:
Window > Preferences > Java > Installed JREs > Add
Put the location of the JVM. Probably will be /usr/lib/jvm/java7/ (my is /usr/lib/jvm/java-7-sun-1.7.0.01). The external libraries will be automatically added when you put the location of the JVM.
Set the Sun (Oracle) 32-bit JVM as default.
if you run eclipse immediately after installing your java JDK, the java virtual machine MIGHT not be properly started. you will receive this error code when launching eclipse.
first check if when you installed your JDK, you copied a script file
/etc/init.d/jexec
if you did, before you do anything fancy, reboot your machine so that jvm starts properly. if you didnt, please decompress your jdk rpm file and extract the contents properly and then reboot.
worked for me, i just had this problem while installing adt bundle (and java jdk) on a virgin install of ubuntu 12.04 on a 64bit machine.
Delete the platform tools and then re-install them from the SDK manager
Copy the sdk\platform-tools contents to sdk\tool
also you must have a JAVA_HOME env var pointing to your java location
ex. JAVA_HOME=C:\Program Files\Java\jdk1.7.0_21

Failed when trying to create AVD is Android SDK

I am using the 64 bit Ubuntu 11.04 and Eclipse Indigo with the Open JDK and got the following libs
lib32asound2 is already the newest version.
lib32gcc1 is already the newest version.
lib32ncurses5 is already the newest version.
lib32stdc++6 is already the newest version.
lib32z1 is already the newest version.
ia32-libs is already the newest version.
Still when I try to create the Virtual Device in Android SDK I get the following error:
[2011-07-04 21:30:16 - SDK Manager] Failed to create the SD card.
[2011-07-04 21:30:16 - SDK Manager] Failed to create sdcard in the AVD folder.
How can i solve this? I googled but unable to get the right solution.
As this problem is with the write access, finally I found that we have to give read write and execute access for the all users to the following directories:
sdk_installation_directory/tools (chmod -R 777 )<br />
home/username/.android/avd (chmod -R 777) <br />
** Don't use 'directoryName/'
* Use Sun JDK
This problem may be due to not installing the i386 libraries required by Android Studio.
You have the libraries installed, but they may be the x64 versions!
Make sure you follow the installation instructions from https://developer.android.com/studio/install.html.
Also you may want to read about multiarch on Debian based distros: https://wiki.debian.org/Multiarch/HOWTO

Categories

Resources