Android Studio mergeDebugResources issue - android

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

Related

Unable to build react-native 2 project to phone

I have my react-naive project completely setup and have been trying to run it to my phone but kep getting the following error when i run the
react-native run-android
command.
Output:
java.io.IOException: Cannot run program "/home/webshinobis/Android/sdk/build-tools/23.0.1/aapt": error=2, No such file or directory
But i have checked the build tools and that file is right there. I have reinstalled the build tools for 23.0.1 but no change. any ideas to help? thanks.
Required libraries for 64-bit machines:
If you are running a 64-bit version of Ubuntu, you need to install some 32-bit libraries:
$sudo apt-get install libc6:i386 libncurses5:i386 libstdc++6:i386 lib32z1 libbz2-1.0:i386
If you are running 64-bit Fedora:
$sudo yum install zlib.i686 ncurses-libs.i686 bzip2-libs.i686
Ah thank you. I just followed this
sudo dpkg --add-architecture i386
sudo apt-get update
but I got an error said that couldn't found the package. Then I found answer in here .
To summarize it , you should add architecture i386 like this
sudo dpkg --add-architecture i386
sudo apt-get update
this work for me very well.

I am unable to install Android Studio on Linux mint 17.1

I have tried for a lot times, but failed.
The Problem Details: I used these commands
sudo apt-add-repository ppa:paolorotolo/android-studio
sudo apt-get update
sudo apt-get install android-studio
When i command the first line into the terminal it didn't notice me to getting any error. But after commanding the second line it got error..
There is the screenshot of that Error ...
The official distribution of Android Studio can be downloaded here. You're trying to use an unofficial repository maintained by someone from the community; there is absolutely no guarantee that it's going to work. Please consider downloading the official distribution instead.
So, first you want to make sure your Java is properly installed. You can do this manually or with a PPA.
Manual Method:
Get rid of the Open JDK that may be installed:
sudo apt-get update && apt-get remove openjdk*
Download Oracle JDK from here. You are looking for a linux version
with tar.gz extension. Also choose the right version from 32-bit
(x86) and 64bit (x64) one.
sudo mkdir -p /opt/java
Move the unzipped download to where it will live (I put the version
number in this example):
sudo mv jdk1.8.0_91 /opt/java
Make this JDK your system's default:
sudo update-alternatives --install "/usr/bin/java" "java" "/opt/java/jdk1.8.0_91/bin/java" 1
sudo update-alternatives --set java /opt/java/jdk1.8.0_91/bin/java
Finally, test your Java version:
java -version
PPA Method:
Get rid of the Open JDK that may be installed:
sudo apt-get update && apt-get remove openjdk*
ADD PPA
sudo add-apt-repository ppa:webupd8team/java
UPDATE
sudo apt-get update
INSTALL
sudo apt-get install oracle-java8-installer
Now Install Android Studio - either manually or via PPA:
Manual Method:
Download android studio:
Get it from http://developer.android.com/sdk/installing/studio.html#download then untar it under /opt/android-studio (recommended).
Launch it!
run ./studio.sh in the /opt/android-studio/bin directory. This will launch the setup and download all the SDKs and other necessary files on your first run, and this is what you will do to launch in the future. Just make a shortcut :)
PPA Method:
ADD PPA
sudo add-apt-repository ppa:paolorotolo/android-studio
UPDATE
sudo apt-get update
INSTALL
sudo apt-get install android-studio
NOTE: This PPA is maintained by Google, not just "someone from the community"

How to make Android's aapt and adb work on 64-bit Ubuntu without ia32-libs (works for versions 12, 13 and 14)

Since Ubuntu 13.10 no longer has ia32-libs I cannot get my android development environment running on a clean install of 13.10.
The error is ~/android-studio/sdk/build-tools/android-4.2.2/aapt": error=2, No such file or directory
This file does exist and is executable but it is a 32bit executable.
In previous installs I just installed ia32-libs to fix this but this solution no longer works for Ubuntu 13.10.
I have tried solutions proposed by askubuntu questions eg. this one https://askubuntu.com/questions/107230/what-happened-to-the-ia32-libs-package
but it isn't working for me.
From that askubuntu.com answer I see I should install separate packages with
sudo apt-get install package:i386
but I don't know which packages to install to make the android tools work again.
Has anyone else solved this problem and or does anyone have a list of packages which need to be installed for the android tools?
Another way(without adding i386 architecture)...
sudo apt-get install libc6-i386 lib32stdc++6 lib32gcc1 lib32ncurses5
sudo apt-get install lib32z1
Ref: Fix Android adb on Ubuntu 13.10 64bit
While dpkg --add-architecture i386 command is not needed in the current version of Ubuntu (13.10), it is required in the current Debian versions (7.x) and it will be required in the future Ubuntu versions as well. So I am going to leave it in. Just ignore it for Ubuntu 13.10.
sudo dpkg --add-architecture i386
sudo apt-get -qqy update
sudo apt-get -qqy install libncurses5:i386 libstdc++6:i386 zlib1g:i386
Update: aapt indeed requires zlib so I added it to the list. But you should not be needing any lib32 packages.
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.
On Ubuntu 14.04 LTS x64 and buildToolsVersion 21/22 it was enough to execute the following:
sudo apt-get install libc6:i386 libstdc++6:i386
sudo apt-get install zlib1g:i386
The error I was getting:
Execution failed for task ':core:processReleaseResources'.
> A problem occurred starting process 'command '/home/user/androidSDK/android-sdk/build-tools/21.1.2/aapt''
install 13.04 ia32-libs (raring ringtail)
instructions: http://bisonf.wordpress.com/2013/10/19/ubuntu-13-10-how-to-properly-install-ia32-libs-and-ia32-libs-multiarch/

adb error on Android SDK. Using Linux Ubuntu 64 bit 12.10

I looked on this site for this error I'm encountering:
Stopping ADB server failed (code -1).
Unable to run 'adb': Cannot run program "/home/ariel/Downloads/adt-bundle-linux-x86_64/sdk/platform-tools/adb": error=2, No such file or directory.
Starting ADB server failed (code -1).
I've used this command on the terminal provided from this topic.
Android SDK on a 64-bit linux machine
EDIT:
I've tried using this command on terminal:
sudo apt-get install ia32-libs
Sadly, it did nothing and it showed this:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package libc6-i386 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
E: Package 'libc6-i386' has no installation candidate
I had the same problem, but it's fine now with these commands :
*sudo apt-get install libstdc++6:i386 libgcc1:i386 zlib1g:i386 libncurses5:i386
for running the emulator you need that additional package:
*sudo apt-get install libsdl1.2debian:i386
then install ia32-libs:
*apt-get install ia32-libs
You need to add i386 packages to apt
dpkg --add-architecture i386
I just used
sudo apt-get install lib32bz2-1.0
For this problem, one may try :
sudo apt-get install libc6-i386 lib32stdc++6 lib32gcc1 lib32ncurses5

Android/Eclipse Installation on Ubuntu 11.04 - aapt and adb not working properly

I am a Linux n00b trying to setup my development environment in Eclipse. I have Eclipse and the Android SDK installed, but I am getting some errors when I start Eclipse or when I try to run ./aapt or ./adb.
jason#ubuntu:~/usr/android-sdk-linux_x86/platform-tools$ ./aapt
./aapt: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory
jason#ubuntu:~/usr/android-sdk-linux_x86/platform-tools$ ./adb
./adb: error while loading shared libraries: libncurses.so.5: wrong ELF class: ELFCLASS64
That ELF class error makes me think I installed a wrong version of the software but I do not recall being asked to choose between x86 and x86-64.
jason#ubuntu:~/usr/android-sdk-linux_x86$ echo $MACHTYPE
x86_64-pc-linux-gnu
Are you sure you followed this guide completely? Do you have ia32-libs installed?
Try this:
sudo apt-get install ia32-libs
I'm on Ubuntu 13.10 64 bit and the above solutions don't quite work (I'm also using Andriod Studio but that shouldn't matter). I guess the issue is that Google's ADK binary is a 32 bit application. This worked for me:
sudo dpkg --add-architecture i386
sudo apt-get install libc6:i386 libncurses5:i386 libstdc++6:i386 zlib1g:i386
apt-get install lib32ncurses5 lib32stdc++6
It depends on the Ubuntu version you running
If you running Ubuntu < 12.04 then run: sudo apt-get install ia32-libs
(ia32-libs was deprecated in 12.04)
If you running Ubuntu >= 12.04 then run: apt-get install lib32ncurses5 lib32stdc++6
To check your ubuntu version click on the cog icon in the top right corner and click "About this computer"

Categories

Resources