I try to install android studio on ubuntu machine. I download android studio zip file from here. I run /android-studio/bin$ sh studio.sh command on terminal, it says that OpenJDK 6 is not supported. Please use Oracle Java or newer OpenJDK. To fix this problem, I run sudo apt-get install openjdk-7-jre. But this way cannot solve my problem. What should I do?
try to install ORACLE JAVA 8 IN UBUNTU VIA PPA, this for ubuntu 15.04, 14.10, 14.04, 12.04 and 10.04
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java8-installer
EDIT:
This command will give you a list of alternative java options, which you will then be able select a JDK instead of JRE:
sudo update-alternatives --config java
first install java by using these commands.
wget --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn-pub/java/jdk/8u25-b17/jdk-8u25-linux-x64.tar.gz
sudo mkdir /opt/jdk
sudo tar -zxf jdk-8u25-linux-x64.tar.gz -C /opt/jdk
sudo update-alternatives --install /usr/bin/java java /opt/jdk/jdk1.8.0_25/bin/java 100
sudo update-alternatives --install /usr/bin/javac javac /opt/jdk/jdk1.8.0_25/bin/javac 100
now these steps will install Android studio
sudo add-apt-repository ppa:paolorotolo/android-studio
sudo apt-get update && sudo apt-get install android-studio
sudo /opt/android-studio/bin/studio.sh
this will do.
I want to do UI automation for opening an url in a real android device. For that I want to install and run appium on my linux system, please guide me how to do? Also suggest me Is there anyway to open an url in chrome browser using eclipse??
Install appium on Linux 18.04
If you have node.js installed you can try :
sudo npm install -g appium --unsafe-perm=true --allow-root
it worked for me.
I guess all the information you need to run Appium in Linux is in this here:
http://appium.io/docs/en/about-appium/getting-started/
how to run your test
http://appium.io/slate/en/master/?ruby#running-tests
and a bunch of sample code here
https://github.com/appium/sample-code
and if you want to run your test in Chrome Browser you will need Chromedriver, it's already integrated in the appium project. More info here:
https://sites.google.com/a/chromium.org/chromedriver/getting-started
Install Appium on Linux(Fedora 22)
$ sudo dnf update -y
$ sudo dnf groupinstall -y "Development Tools"
$ sudo dnf install -y autoconf automake libtool gettext git scons cmake flex bison libcurl-devel curl ncurses-devel ruby bzip2-devel expat-devel
$ git clone https://github.com/Homebrew/linuxbrew.git ~/.linuxbrew
Until LinuxBrew is fixed, the following is required.
Add to .bashrc:
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/usr/local/lib64/pkgconfig:/usr/lib64/pkgconfig:/usr/lib/pkgconfig:/usr/lib/x86_64-linux-gnu/pkgconfig:/usr/lib64/pkgconfig:/usr/share/pkgconfig:$PKG_CONFIG_PATH
## Setup linux brew
export LINUXBREWHOME=$HOME/.linuxbrew
export PATH=$LINUXBREWHOME/bin:$PATH
export MANPATH=$LINUXBREWHOME/man:$MANPATH
export PKG_CONFIG_PATH=$LINUXBREWHOME/lib64/pkgconfig:$LINUXBREWHOME/lib/pkgconfig:$PKG_CONFIG_PATH
export LD_LIBRARY_PATH=$LINUXBREWHOME/lib64:$LINUXBREWHOME/lib:$LD_LIBRARY_PATH
$ ln -s $(which gcc) ~/.linuxbrew/bin/gcc-4.4
$ ln -s $(which g++) ~/.linuxbrew/bin/g++-4.4
$ brew update
$ brew install node # get node.js
$ npm install -g appium # get appium
$ npm install wd # get appium client
$ appium & # start appium
Hello appium installation is very simple , please check below steps
1)Install Latest Node.js
curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
sudo apt-get install -y nodejs
More information please check official website : https://nodejs.org/en/download/package-manager/
2) Install latest Appium
npm install -g appium
or
sudo npm install -g appium
More information please check official documentation :
https://www.npmjs.com/package/appium
install on nvm
sudo apt install build-essential checkinstall
sudo apt install libssl-dev
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.31.0/install.sh | bash
node -v
npm -v
npm install -g appium
I seem to be having difficulties switching to Android Studio. I created a new Project in Android Studio 0.4.3 on Ubuntu 13.10. but I have been plagued with issues. I originally had issues on a windows box when it was first distributed which is why i ignored it until recently. I fixed a few things with gradle but seem to still be having other issues and I ended up following a few suggestions from the links bellow though nothing helped. Does anyone have any suggestions.
mergedebugresources-exception
installing android studio in ubuntu
How to Install Android studio in ubuntu 13.10
I've also installed fastboot and adb in terminal and I have also arbitrarily uninstalled whatever jdk I was using prior had and re-installed java 7 instead of 8 (since it would not install for some reason) via
sudo apt-get purge openjdk*
sudo rm /var/lib/dpkg/info/oracle-java7-installer*
sudo apt-get purge oracle-java7-installer*
sudo rm /var/lib/dpkg/info/oracle-java8-installer*
sudo apt-get purge oracle-java8-installer*
sudo rm /etc/apt/sources.list.d/*java*
sudo apt-get update
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java7-installer
bellow is the error message i am currently receiving
Execution failed for task ':helloandroid:mergeDebugResources'.
Error: Failed to run command:
/home/kyle/Development/android-studio/sdk/build-tools/19.0.1/aapt s -i /home/kyle/Development/AndroidStudioProjects/HelloAndroid/helloandroid/build/exploded-bundles/ComAndroidSupportAppcompatV71901.aar/res/drawable-hdpi/abc_textfield_search_right_default_holo_light.9.png -o /home/kyle/Development/AndroidStudioProjects/HelloAndroid/helloandroid/build/res/all/debug/drawable-hdpi/abc_textfield_search_right_default_holo_light.9.png
Error Code:
127
Output:
/home/kyle/Development/android-studio/sdk/build-tools/19.0.1/aapt: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory
Use lib32z1 - worked for me.
sudo apt-get install lib32z1
I want to install Calabash Android on Ubuntu(13.10). I have gem (1.8.23) and ruby (1.9.3p194) installed and tried to run "sudo gem install calabash-android" but keep getting messages saying "Failed to build gem native extension", below is the full messages:
Building native extensions. This could take a while...
ERROR: Error installing calabash-android:
ERROR: Failed to build gem native extension.
/usr/bin/ruby1.9.1 extconf.rb
/usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in require': cannot load such file -- mkmf (LoadError)
from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:inrequire'
from extconf.rb:1:in `'
Gem files will remain installed in /var/lib/gems/1.9.1/gems/gherkin-2.12.2 for inspection.
I tried "sudo apt-get update" but it didn't fix the issue. And I also checked gcc so it shouldn't be build issue. Does anyone have any suggestions? Thanks in advance!
While installing ruby, select development version or full version, so on my system with ubuntu 12.04, i would use
sudo apt-get install ruby1.9.1-full
also please make sure android home path and ant path is proper
Thanks
You can use rbenv that manage perfectly ruby gems versions like nvm does for node.js:
$ sudo apt-get update
$ sudo apt-get install git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev python-software-properties libffi-dev
$ git clone git://github.com/sstephenson/rbenv.git .rbenv
$ echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc
$ echo 'eval "$(rbenv init -)"' >> ~/.bashrc
$ git clone git://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build
$ echo 'export PATH="$HOME/.rbenv/plugins/ruby-build/bin:$PATH"' >> ~/.bashrc
$ git clone https://github.com/sstephenson/rbenv-gem-rehash.git ~/.rbenv/plugins/rbenv-gem-rehash
$ sudo apt-get install rbenv
$ exec $SHELL
$ rbenv install 2.2.2
$ rbenv global 2.2.2
$ ruby -v
$ echo "gem: --no-ri --no-rdoc" > ~/.gemrc
$ gem install bundler
When I run my android app from eclipse, I get this error.
Unexpected exception 'Cannot run program "/home/antz/Development/adt-bundle-linux/sdk/platform-tools/adb": error=2 No such file or directory' while attempting to get adb version from /home/antz/Development/adt-bundle-linux/sdk/platform-tools/adb
COPY PASTE FROM Eclipse Error
[2012-11-26 13:43:08 - adb] Unexpected exception 'Cannot run program "/home/antz/Development/adt-bundle-linux/sdk/platform-tools/adb": error=2, No such file or directory' while attempting to get adb version from '/home/antz/Development/adt-bundle-linux/sdk/platform-tools/adb'
However my adb is exactly in the location where it says it's not.
What is wrong and how do I fix this?
I cd into the directory where adb is (/home/antz/Development/adt-bundle-linux/sdk/platform-tools/) and I typed in adb and it says
antz#antz-90X3A:~/Development/adt-bundle-linux/sdk/platform-tools$ ls
aapt aidl dexdump fastboot llvm-rs-cc renderscript
adb api dx lib NOTICE.txt source.properties
antz#antz-90X3A:~/Development/adt-bundle-linux/sdk/platform-tools$ adb
bash: /home/antz/Development/adt-bundle-linux/sdk/platform-tools/adb: No such file or directory
adb is green which means its an executable, correct?
for example, dx is also green and when I typed in dx into the command prompt, it works... whats wrong with adb?
On Linux, Android SDK platform-tools package containing adb used to be 32bit. It worked fine on 32bit systems. But on 64bit systems you need to manually install the IA32 library.
For Debian based distributions try this:
sudo apt-get install libc6-i386 lib32stdc++6 lib32gcc1 lib32ncurses5
But since v24.0 platform-tools contains only 64bit binaries - so 32bit libraries no longer required.
You can no longer install ia32-libs, so you must the individual 32 bit libraries needed by adb
sudo apt-get install libc6-i386 lib32stdc++6 lib32gcc1 lib32ncurses5
And for Ubuntu 13.10:
sudo apt-get install libc6-i386 lib32stdc++6 lib32gcc1 lib32ncurses5 lib32z1
You have to install the 32 bit glibc:
in Fedore 64 bit machine
# yum install glibc.i686
This removes the misleading 'no such file or directory' message when trying to execute a 32 bit binary. With that the 64 bit Fedora system is capable of executing 64 bit binaries.
This also removes the misleading 'not a dynamic executable' message of ldd when calling ldd on a 32 bit dynamic executable.
Now you have to install missing 32 bit libraries the binaries under adt-bundle-linux/sdk/platform-tools are linked against:
# yum install zlib.i686 libstdc++.i686 ncurses-libs.i686 libgcc.i686
Thats it.
I'm using Ubuntu 14.04 LTS 64-bit and the following code works for me;
sudo apt-get install lib32z1 lib32z1-dev
sudo apt-get install lib32stdc++6
Summary:
After I tried apt-get install ia32-libs, but apt package tool suggest that;
Package ia32-libs is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or is only available from another source.
However the following packages replace it:
lib32z1 lib32ncurses5 lib32bz2-1.0
Then the above code works for me.
This works great in Ubuntu 13.04 64bit version
You can no longer install ia32-libs, so you must the individual 32 bit libraries needed by adb
sudo apt-get install libc6-i386 lib32stdc++6 lib32gcc1 lib32ncurses5
On Arch linux:
Enable the "multiarch" repositories in /etc/pacman.conf
then run:
root#box#pacman -Syu
root#box#pacman -S lib32-glibc lib32-zlib lib32-libstdc++5 lib32-ncurses lib32-gcc-libs
I am running Ubuntu 12.04 LTS and this command is the only thing that worked for me:
sudo apt-get install lib32z1 lib32z1-dev
Once I ran that from a command line, I was able to get the R.java file to generate (the tell-tale sign that something in your Android SDK tools installation is not quite right) by doing a Project > Clean in Eclipse.
For multiarch Debian 7.0, add:
dpkg --add-architecture i386
apt-get install libc6:i386 libncurses5:i386 libstdc++6:i386
On Fedora 17 or 18:
sudo yum install redhat-lsb.i686
You need to install the ia32-libs (IA32 libraries) package for this to work.
I did it in my Linux Mint 12:
chmod +x PATH/adb
if you're having this problem in 64bits, try this (worked for me):
$ apt-get install lib32gcc1 libc6-i386 lib32z1 lib32stdc++6
$ apt-get install lib32ncurses5 lib32gomp1 lib32z1-dev lib32bz2-dev
$ apt-get install g++-multilib
http://sixarm.com/about/ubuntu-apt-get-install-ia32-for-32-bit-on-64-bit.html
From the Ubuntu Multiarch HOWTO:
Some users using the Android SDK might encounter problems when trying to run build-tools or platform-tools on amd64 bit platform. As replacement for ia32-libs, users should be fine just installing the following libraries:
dpkg --add-architecture i386
aptitude update
aptitude install libstdc++6:i386 libgcc1:i386 zlib1g:i386 libncurses5:i386
Install these libraries in linux apt-get install ia32-libs
Run these commands below. Its worked for me
sudo apt-get dist-upgrade
sudo apt-get install ia32-libs
in ubuntu 64 bits [12.04]-[14.10] and Elementary OS 64 bits
sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt-get install libncurses5:i386 libstdc++6:i386 zlib1g:i386
Sometimes it's just a matter giving sdk files the necessary permissions.
sudo chmod -R +x /path/to/android-sdk-linux
Restart Android Studio and see if that fix it.
Permission issues typically occur when you copy/move sdk files from a NTFS partition or copying from another computer.
sudo apt install adb
adb not installed in your pc
Try this.
http://abhinavasblog.blogspot.sg/2013/10/working-with-ubuntu-1304-and-1310-java.html
the blog explain resolution to Ubuntu 13.10 for installing Chrome, Java and Fixing Android SDK.
The correct current combo for Arch Linux is as follows: :
[This part is unchanged] Uncomment the following section in /etc/pacman.conf:
...
[multilib]
Include = /etc/pacman.d/mirrorlist
...
Then:
sudo pacman -Syu && sudo pacman -S multilib/lib32-libstdc++5 multilib/lib32-zlib
The difference with the other answer is that package names include the multilib/ part now.
(from Arch Wiki: Multilib#Enabling, Android#Troubleshooting)