avdmanager hangs on "Loading local repository..." Linux - android

Repro:
Headless Ubuntu 18.04 LTS VM (kvm note enabled)
sudo apt-get update
sudo apt-get install -y wget openjdk-8-jre-headless libc6-i386 lib32stdc++6 python3-pip nginx unzip
sudo wget https://dl.google.com/android/repository/commandlinetools-linux-6200805_latest.zip
sudo unzip commandlinetools-linux-6200805_latest.zip -d /opt
sudo /opt/tools/bin/sdkmanager --install --sdk_root=/opt "system-images;android-19;default;armeabi-v7a" "platform-tools" "platforms;android-19"
/opt/tools/bin/avdmanager create avd -n arm -k "system-images;android-19;default;armeabi-v7a" -f
On step 7 in hangs with Loading local repository...
Notes:
Running the avdmanager as sudo doesn't help, and the image need's to be created by a user anyway.
Tried sudo setfacl -m u:username:rwx /opt/tools/bin/avdmanager didn't help
setting ANDROID_HOME=/opt and PATH=$PATH:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools doesn't help
newer version of command line tools don't help ether (step 4).
What is the problem? How can I investigate? Have I missed something?

It happened because since version (6200805) Command Line Tools should be placed inside cmdline-tools directory. It should be created manually in ANDROID_HOME.
Please see this answer.
With the mentioned configuration everything works fine.

I encountered the same problem. I believe there may be something wrong with the avdmanager or sdkmanager because it always identifies a wrong sdk_root path. For example, if I create a folder under my root on the server (e.g., /root/SDK) as the sdk root, the avdmanager does not search for folders like emulator, platform-tools, etc, under root/SDK. It turns out it always searches in an upper level folder (i.e., /root). If there are many things in the /root, the search process will take a lot of time, that's the reason why it hangs on "loading local repository". If you wait enough time, you will eventually see the result. So to word around this, my solution is to put sdk root in one deeper folder level (e.g., /root/SDK/android_sdk_linux). The avdmanager still starts searching in the upper level folder (i.e., /root/SDK), but it's very quick because there is nothing in /root/SDK. There can be some warnings output by avdmanager but you can ignore them because in my experience there is no side effects.

Related

Android Studio does not have write access

I am using android studio 3.4.2. When I try to update
the android studio it says
"Studio does not have write access to /app/extra. Please Run it by a privileged user to update"
How to solve it?
I would suggest to set your current user as owner of /usr/bin/android-studio
This will resolve the issue in long term:
sudo chown -R $USER:$USER /usr/bin/android-studio
Navigate to your Android studio folder via terminal then run android studio with administrator privileges, using sudo or su. If you provide more information, like which OS you are using, maybe I'll be able to tell you the exactly command line you should use.
Edit:
Open terminal application, then type de following :
cd ~/android-studio/bin *
Now we must run Android Studio script file studio.sh as administrator:
sudo ./studio.sh
If doesn't work try : sudo sh studio.sh
(Optional) To prevent this problem every time you want update android studio, see https://stackoverflow.com/a/37704528/8513494
And is it.
I'm assuming that your android studio is located on your user folder, if there's a problem with this step, you should check /opt/ directory and look out for android studio installation folder or see https://superuser.com/a/1080329
I would suggest setting up your current user as the owner of Android Studio
Linux
sudo chown -R $USER:$USER /usr/bin/android-studio
Mac
sudo chown -R $USER /Applications/Android\ Studio.app
or if you using android studio portable then you can use custom path like this.
sudo chown -R $USER: pathDirOfYourAndroidStudio/Android\ Studio\ Preview.app
For linux mint 20:
sudo chown -R $USER:$USER /opt/android-studio-4.2/android-studio/
Happens on Mac when you do not have Android studio in /Application directory. Move it there, if it is not resolved, try this answer.
Set access to Read and Write (default is Read only)
I'd suggest changing the owner of the android-studio directory, doing so depends on the path of your android studio. Here is mine
sudo chown -R $USER:$USER /opt/android-studio
But you might have the following path
sudo chown -R $USER:$USER /usr/bin/android-studio
Check well and enjoy
If you are a MAC user and running portable AS then the simple solution is to move the application within Application folder. Check this video. It solves my issue after wasting 3 hrs within the terminal but nothing is wasting of time. I am running MACOS 13(Ventura) & AS Electric Ele.

Android Studio 2.3.3 stucks when first run

I downloaded Android Studio 2.3.3 for Linux and unzipped the content to /usr/local
then
$ cd android-studio/bin
Edited the file idea.properties and appended a following line to it:
disable.android.first.run=true
Then launched Android Studio:
$ sudo sh studio.sh
Looking in classpath from com.intellij.util.lang.UrlClassLoader#1a7cec2 for /com/sun/jna/linux-x86/libjnidispatch.so
Found library resource at jar:file:/usr/local/android-studio/lib/jna.jar!/com/sun/jna/linux-x86/libjnidispatch.so
Trying /root/.AndroidStudio2.3/system/tmp/jna5562911082428971611.tmp
Found jnidispatch at /root/.AndroidStudio2.3/system/tmp/jna5562911082428971611.tmp
[ 40066] WARN - dea.updater.SdkComponentSource - File /root/.android/repositories.cfg could not be loaded.
^C[18124266] WARN - pl.local.NativeFileWatcherImpl - Watcher terminated with exit code 130
And it will stuck. After long waiting I termited it with Ctrl+C
Try attaching to the process with strace to see what it's doing (for example, waiting on a network or file). Or run it with strace like this:
strace -o foo.log -s1024 -f ./studio.sh
After a while, break it with Ctrl-C and examine the log file for syscalls like open, read, recvmsg.
Alternatively, while it's running, you can attach with a Java profiler to the jvm. For a start, you can launch jconsole or jvisualvm and attach to the Android Studio (it will show as an empty name, with only PID) and view stack traces of individual threads. In jvisualvm you can view the CPU usage sample and click on the hot event and see the stack trace.
Basically you need to find out what the app is trying to access for so long. Most likely some network resource.
I think all your problems happen because you ran as root (sudo) on your first run.
So try to unroot before doing a clean install like I suggest below:
Unroot the installation
cd to the folder where you unzipped Android Studio before
cd ..
Recursively change user and group:
sudo find <thedirname> -print0 | xargs -0 chown <yourusername>:<yourgroupname>
cd ~ or cd to go back to home
Recursively change user and group
sudo find .Android* -print0 | xargs -0 chown <yourusername>:<yourgroupname>
(I sudo because you've used root user previously).
Recursively change user and group
sudo find Android* -print0 | xargs -0 chown <yourusername>:<yourgroupname>
cd into the unzipped directory. Do chmod +x studio.sh.
Start Android Studio ./studio.sh
If it didn't help, do a:
Clean install
Download and unzip a fresh copy of Android Studio. I suggest version 3, it's pre released, but stable. It doesn't matter where you put it.
I believe you have Java installed, but make sure you have Java 8 as the default one: in command line: java -version, make sure it's 1.8.
Move any old installations out of the way, in case they are corrupt:
sudo mv ~/.Android* ~/tmp/
sudo mv ~/Android ~/tmp/
should do the trick. (I sudo because you've used root user previously).
cd into the unzipped directory. Do chmod +x studio.sh.
Start Android Studio ./studio.sh
Make sure all the files are owned by your username, and group as well.
I took some information from:
Stuck at “.android/repositories.cfg could not be loaded.”
Installing Android Studio in Ubuntu 14.04 64-Bit .android/repositories.cfg could not be loaded
The answers collectively say that:
Android Studio will run fine without repositories.cfg.
You can remove this warning by putting the following into repositories.cfg:
### User Sources for Android SDK Manager
count=0
After waiting some time it eventually goes beyond that step.
Patience is the key.
So, try waiting a little bit more. It always helps.
This is common. On your first run the gradle files are needed to be downloaded and installed in background. It's about 90 MB in size and even if your internet speed is high, the gradle servers may be slow taking it to maximum of 1 or 2 hours in the worst case. So open Android Studio and wait until it opens. Hope it helps.
I've found a potientaly useful link from AskUbuntu, the guy suggested creating an empty file called repositories.cfg. And that solved it.
Ref: https://askubuntu.com/questions/885658/android-sdk-repositories-cfg-could-not-be-loaded
Just remove /root/.AndroidStudio2.3 and /root/.android (after making a backup)
Maybe it has something to do with the script looking at the root location. Have you tried using chown on the unzipped content directory?
Try this to install
Download the studio
Extract to home
go to android-studio/bin/
Mouse right click than open terminal
type ./studio than press enter
now it will start to install studio. If you installing first time than It will download some files of SDK. and if you have already downloaded SDK than you can cancel download and set you SDK path from the setting from right bottom corner.
try creating repositories.cfg -- Because I see it as warning. Let's see what happens after that!
touch ~/.android/repositories.cfg /* Linux */
Extract your downloaded Android Studio setup zip file to your /home/<user_name> directory and in terminal follow the below commands
$ sudo chmod +x studio.sh
And hit enter
Now run the following command
$ ./studio.sh
And wait for some time to download the required libraries.

Android : Adb permission denied

I am using ubuntu 13.04 I have just set up eclipse and android sdk. But whenever i try to run program or even if I am switching DDMS perspective it shows me permission denied error.
How to tackle this issue.
#Manoj,
Try running following
cd /home/manoj/....../platform-tools
adb version
If you get a Permission denied error then
chmod 770 adb
adb version
you should get a response like "Android Debug Bridge Version x.x.xx"
If so the source of your problem was file permission and set the file permission appropriately
Also check if the $PATH includes the path to /home/manoj/....../platform-tools.
Disclaimer: I use Ubuntu 12.04 and adb at command prompt for my work. I hardly use eclipse for my current work.
Let us know your results
Good luck
Another issue might be adb's file permissions themselves, make sure the user you are using to run eclipse is the same as who owns the adb files. Also make sure that adb is actually executable. (These are both unlikely issues, but worth checking if the other solutions given don't fix it)
From the home directory, try 'adb' in terminal:
If 'adb' doesn't find the adb tool, then your path needs adjusted. (edit .bashrc with bash commands to append to the path the /tools directory of the android sdk, is probably the easiest way, then log out and back in to apply the settings)
If 'adb' says it needs root permission, then try 'sudo adb' and see if that works. (this shouldn't happen, but worth testing)
I'm not actually sure what it says for 'non executable' in 13.04, but it should be self explanatory.
I have solved this problem through following steps:
1. copy & unzip eclipse to /opt/android/android-sdk-linux/
2. x86= sudo apt-get install libgl1-mesa-dev
x64(Ubuntu 13.04 and earlier)= sudo apt-get install ia32-libs
x64(Ubuntu 13.10 and above)= sudo apt-get install libgl1-mesa-dev:i386
I use ubuntu 14 and on this version listed packages have multiple dependencies, so if you could not install this package use apt-get -f install (without package) . this statement install dependencies.
3. sudo gedit /etc/environment
:/opt/android/android-sdk-linux/tools
:/opt/android/android-sdk-linux/platform-tools
the same happened for me when i used adb version it showed adb server not installed ,and it showed how to fix it ,and now works fine ,install the adb server using the following code .
The program 'adb' is currently not installed. You can install it by typing:
sudo apt-get install android-tools-adb

ImportError: No Module named bz2 for Python 2.7.3 [duplicate]

I'm using Python 2.7.2 on Ubuntu 11.10. I got this error when importing the bz2 module:
ImportError: No module named bz2
I thought the bz2 module is supposed to come with Python 2.7. How can I fix this problem?
EDIT: I think I previously installed Python 2.7.2 by compiling from source. Probably at that point I didn't have libbz2-dev and so the bz2 module is not installed. Now, I'm hoping to install Python2.7 through
sudo apt-get install python2.7
But it will say it's already installed. Is there a way to uninstall the previous Python2.7 installation and reinstall?
I meet the same problem, here's my solution.
The reason of import error is while you are building python, system couldn't find the bz2 headers and skipped building bz2 module.
Install them on Ubuntu/Debian:
sudo apt-get install libbz2-dev
Fedora:
sudo yum install bzip2-devel
and then rebuild python
comes from another answer
#birryree's answer helps to back to the system's original python.
Okay, this is much easier to understand in answer form, so I'll move what I would write in my comment to this answer.
Luckily for you, you didn't overwrite the system version of python, as Ubuntu 11.10 comes with 2.7.2 preinstalled.
Your python binaries (python and python2.7) are located in /usr/local/bin, which is a directory where user-specific stuff is usually installed. This is fine, it means your system python is still there.
First, just try to run the system python. Type this from the command line:
/usr/bin/python -c "import bz2; print bz2.__doc__"
This should print out something like this:
λ > /usr/bin/python -c "import bz2; print bz2.__doc__"
The python bz2 module provides a comprehensive interface for
the bz2 compression library. It implements a complete file
interface, one shot (de)compression functions, and types for
sequential (de)compression.
If so, means you're fine.
So you just have to fix your PATH, which tells the shell where to find commands. /usr/local/bin is going to have priority over /usr/local, so there are some ways to fix this, in order of difficulty/annoyance/altering your system:
Remove the symlink python from /usr/local/bin
This will make it so that when you type python, it should go back to executing /usr/bin/python, which is an alias for the system's python 2.7.2.
sudo rm /usr/local/bin/python
Move /usr/bin to have higher precedence in the PATH
Might not be desirable if you already have stuff in /usr/local/bin that should have precedence over /usr/bin, but I'm adding this for completeness.
In your shell profile (not sure what Ubuntu's default is, but I'm using ~/.bash_profile, you can do this:
export PATH=/usr/bin:$PATH
Remove your python install
This is extreme and the first option I presented should be your first option.
Do you really need your own version of Python? If you want isolated python environments you probably really want virtualenv. You can probably remove yours unless there's a reason not to.
It's going to be a little annoying though, but basically:
Remove the python and python2.7 and pythonw and pythonw2.7 commands from /usr/local/bin.
Remove /usr/local/lib/python/2.7.2
This part is not complete because I forget what else there is.
In case, you must be used python2.7, you should run: (Centos 6.4)
sudo cp /usr/lib64/python2.6/lib-dynload/bz2.so /usr/local/lib/python2.7/
Maybe it will helps someone:
apt-get install libbz2-dev # for bz2
apt-get install libssl-dev # for _ssl
apt-get install libsqlite3-dev # for sqlite
apt-get install libreadline6-dev # for readline, _curses, _curses_panel
For Ubuntu/Debian:
sudo apt-get install libbz2-dev
For Fedora:
sudo yum install bzip2-devel
And then recompile the python and install it.
matocnhoi's answer works for me in centOS
sudo cp /usr/lib64/python2.6/lib-dynload/bz2.so /usr/local/lib/python2.7/
and I used virtualenv, so the command is
sudo cp /usr/lib64/python2.6/lib-dynload/bz2.so ../../../env/lib/python2.7/
I used a symlink between /usr/lib64/python2.6/lib-dynload/bz2.so /usr/local/lib/python2.7/lib-dynload/
Worked fine for me...
Make sure you bz2 installed, run sudo yum install bzip2-devel.
Centos 6
sudo cp /usr/lib64/python2.6/lib-dynload/bz2.so /python_install_path/lib/python2.7
Centos 7
sudo cp /usr/lib64/python2.7/lib-dynload/bz2.so /python_install_path/lib/python2.7
python_install_path usually is /usr/local/lib/python2.7/, you need replace that if you install python in a another path.
If your bz2 in /usr/lib64/python2.7/lib-dynload/ is named as: "bz2.x86_64-linux-gnu.so", remember to rename it to bz2.so when copying it to your path or it may not be correctly sourced:
cp /usr/lib64/python2.6/lib-dynload/bz2.x86_64-linux-gnu.so /python_install_path/lib/python2.7/bz2.so
I had the same problem with Python 2.17.15 and pyenv on Ubuntu. System python from /usr/bin/python worked fine. In my case it helped to install libbz2-dev and then to reinstall python 2.7.15:
sudo apt-get install libbz2-dev
pyenv uninstall 2.7.15
pyenv install 2.7.15

Failed to load libGL.so on Android

I am using Ubuntu 12.04 (Precise Pangolin) with the Oracle JDK 7, and when I am running the Android emulator from Eclipse, it's giving this error:
[2012-07-04 02:52:10 - Emulator] error libGL.so: cannot open shared object file: No such file or directory
[2012-07-04 02:52:10 - Emulator] Failed to load libGL.so
Also the emulator is very slow. How can I solve this problem?
I have the Android SDK installed into ~/android-sdk-linux_x86, so I did:
ln -s /usr/lib/libGL.so.1 ~/android-sdk-linux_x86/tools/lib/libGL.so
This solves errors just like linking to /usr/lib does, but it doesn't require root and doesn't mess with core system directories.
On 64-bit Ubuntu 12.04, do it like this:
$ sudo apt-get install git-core gnupg flex bison gperf build-essential \
zip curl libc6-dev libncurses5-dev:i386 x11proto-core-dev \
libx11-dev:i386 libreadline6-dev:i386 libgl1-mesa-glx:i386 \
libgl1-mesa-dev g++-multilib mingw32 openjdk-6-jdk tofrodos \
python-markdown libxml2-utils xsltproc zlib1g-dev:i386
$ sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.so
Source: Installing required packages (Ubuntu 12.04)
I am using Ubuntu 12.04 64-bit. Using the following command to solve the problem
sudo ln -s /usr/lib32/fglrx/libGL.so.1.2 /usr/lib/libGL.so
Note: This is applicable only to those who use the AMD/ATI graphic drivers.
For 32-bit Ubuntu 12.04 LTS, this worked:
sudo apt-get install libgl1-mesa-dev
None of the following worked:
cd /usr/lib/i386-linux-gnu/mesa/
sudo ln -s libGL.so.1.2 libGL.so
sudo ln -s libGL.so.1.2 /usr/lib/libGL.so
ln -s libGL.so.1.2 ~/android/android-sdk-linux/tools/lib/libGL.so
What works for me (ubuntu 12.04 64bit) was just to run :
sudo apt-get install libgl1-mesa-dev
I found that libGL.so exists in directory /usr/lib/x86_64-linux-gnu/
Installation of 32 bit version was not working.
On 64 bit Ubuntu 12.04, there is no /usr/lib64. It is /usr/lib only.
Also, on my machine, libGL.so isn't present. Instead the file is libGLEW.so
To install /usr/lib/LibGL.so you can run:
sudo apt-get install libgl1-mesa-dev
However, it didn't solve the problem for me. In fact, it probably screwed up my system.
This worked for me on 64 bit Ubuntu 12.10 and the ADT bundle:
ln -s /usr/lib/x86_64-linux-gnu/mesa/libGL.so.1 ~/adt-bundle-linux-x86_64/sdk/tools/lib/libGL.so
If you don't have /usr/lib/x86_64-linux-gnu/mesa/libGL.so.1 just install libgl1-mesa-glx
sudo apt-get install libgl1-mesa-glx
I think I got it right, no warnings and no slowness... This might not work with proprietary drivers, though.
Make sure libgl1-mesa-glx:i386 is installed (even if you got a x64 SO file). Then do:
sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1.2 /usr/lib/libGL.so
NVidia Optimus:
Running on dual graphics (intel and nvidia), I used the following:
Install Bumblebee (see: https://wiki.ubuntu.com/Bumblebee#Installation)
Install the required lib.
Run the emulator on the nvidia discrete card.
This should do the trick:
sudo add-apt-repository ppa:bumblebee/stable
sudo add-apt-repository ppa:ubuntu-x-swat/x-updates
sudo apt-get update
sudo apt-get install bumblebee bumblebee-nvidia linux-headers-generic
sudo apt-get install ia32-libs
Whenever you wish to run the emulator, just use optirun:
optirun emulator #<avd_name>
I should give a warning that I only installed Linux yesterday. So I don't really know what I'm doing….
Referring to http://developer.android.com/sdk/installing/index.html, I installed ia32-libs and did:
ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1.2 /usr/lib/i386-linux-gnu/mesa/libGL.so
That's all I did to solve this problem.
I use Linux Mint 14 - 64 bit and for me, it worked :) :
sudo apt-get install libgl1-mesa-glx libgl1-mesa-dev
On Ubuntu 12.04 64-bit, GNOME 3.4, I first referred to http://developer.android.com/sdk/installing/index.html and installed ia32-lib, which will generate /usr/lib/i386-linux-gnu/mesa/libGL.so.1.2.0
Then I run the below command and solved this problem:
sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1.2.0 /usr/lib/libGL.so
This is slightly different from gridstation's answer.
I guess there's no need to install the Mesa driver locally, which may cause issues with your real video drivers.
On Ubuntu 64 bit,
1. Check libGL,
$ locate libGL.so
/usr/lib/i386-linux-gnu/mesa/libGL.so.1
/usr/lib/i386-linux-gnu/mesa/libGL.so.1.2.0
/usr/lib/x86_64-linux-gnu/mesa/libGL.so.1
/usr/lib/x86_64-linux-gnu/mesa/libGL.so.1.2.0
2. Create a symlink where the SDK is installed
ln -s /usr/lib/x86_64-linux-gnu/mesa/libGL.so.1 /usr/local/android-studio/sdk/tools/lib/libGL.so
To make it work on a Ubuntu 12.10 (Quantal Quetzal) 64-bit, you have to do two things:
1) You have to initialize LD_LIBRARY_PATH
Example:
export LD_LIBRARY_PATH=~/tests/android/adt-bundle-linux-x86_64/sdk/tools/lib
Comments: change the path to your location
2) You have to create a symbolic link
a) Use locate libGL to find the correct library:
rudy#vsolutions:~$ locate libGL
/home/rudy/opt/android/android-sdk-linux/tools/lib/libGLES_CM_translator.so
/home/rudy/opt/android/android-sdk-linux/tools/lib/libGLES_V2_translator.so
/usr/lib/i386-linux-gnu/libGLU.so.1
/usr/lib/i386-linux-gnu/libGLU.so.1.3.1
...
/usr/lib32/nvidia-current/libGL.so.304.43
b) Create the soft link
sudo ln -s /usr/lib/x86_64-linux-gnu/mesa/libGL.so.1.2.0 /usr/lib/libGL.so
Comments: use a 64-bit library on a 64-bit operating system!
Now start the emulator
My system is Optimus, and I have installed Bumblebee. I can use "Intel Open Source Technology Center" "Mesa DRI Intel(R) Ironlake Mobile " "2.1 Mesa 9.0" or "NVIDIA Corporation" "GeForce GT 330M/PCIe/SSE2" "3.3.0 NVIDIA 304.43".
a) Intel
/home/rudy/tests/android/adt-bundle-linux-x86_64/sdk//tools/emulator64-arm -avd avd_42 -scale 0.46 -gpu on -verbose
b) Nvidia
optirun /home/rudy/tests/android/adt-bundle-linux-x86_64/sdk//tools/emulator64-arm -avd avd_42 -scale 0.46 -gpu on -verbose
Comments:
I didn't see any difference between the Intel and the Nvidia cards... It is certainly because the emulator is not GPU intensive.
On my system an Intel Core i5, it took almost 1 minute to start the emulator... Please be patient... I find the emulator rather fast after it is loaded (the 1 minute to wait). If you start the emulator from the Eclipse IDE, then the emulator does a software emulation (the GPU is off) and took 1 min 30 to start... It is much more slower than using the Intel or Nvidia cards!!!
verbose is the parameter to use to display more diagnostics
optirun is the command to make use of the Nvidia on Bumblebee. If you don't have Bumblebee don't use it!
avd is a virtual device
gpu on to make use of the graphical card
OSError: libGL.so: cannot open shared object file: No such file or directory
It may appear on Linux systems when you try to launch VNL for the first time.
To solve it, create (as administrator) a new link in /usr/lib :
sudo ln -s /usr/lib/libGL.so.1.2 /usr/lib/libGL.so
If you have a 64-bit Linux, use /usr/lib64 instead .
First check that you actually have libGL.so.1.2 in /usr/lib or /usr/lib64 ; it might be called libGL.so.1 or something else instead, or located in another directory, depending on the video drivers.
You can use locate libGL to find the correct file to link to.
I had the same issue. But in my case, I solved it another (I think, better) way.
In my situation (Lubuntu 13.10), it was enough to simply also install the library libgl1-mesa-dev through Synaptic Package manager (the libgl1-mesa-dri library was already installed by default when the Lubuntuu distro was set up).
That solves all the hassle of putting links from one file to the other and also prevents polluting your system:
How will you know after several months (or years) what dedicated links you've put to keep the system running?
What about a future updates, if you start to do those things yourself? Will something be broken/not updated due to "manual intervention"?
If you use the "system mechanism", it's all done for you. And correctly done. That's why those tools are there in the first place.
Best rgds,
Similar to user1289608, I was able to do a sym link from an existing install of Mesa:
sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1.2 /usr/lib/libGL.so
I am using Ubuntu 12.04 64-bit. Linking /usr/lib64/libGLC.so.0 to /usr/lib64/libGL.so seems to solve the problem.
EDIT: It stops the error messages, but the emulator is still slow for me.
This worked for me:
Restart the adb from the DDMS:
In Eclipse: Window > Open Perspective... > Other > DDMS. Select the emulator from the left side pane and select "Restart adb"
You can also restart the adb server from the terminal window.
android-sdk-linux/platform-tools/adb kill-server
android-sdk-linux/platform-tools/adb start-server
I found the folder for libGL by the command "locate"
It turned out to be in /usr/lib/i386-linux-gnu/
~$ locate libGL
/usr/lib/i386-linux-gnu/libGLEW.so.1.8
/usr/lib/i386-linux-gnu/libGLEW.so.1.8.0
/usr/lib/i386-linux-gnu/libGLEWmx.so.1.8
/usr/lib/i386-linux-gnu/libGLEWmx.so.1.8.0
/usr/lib/i386-linux-gnu/libGLU.so.1
/usr/lib/i386-linux-gnu/libGLU.so.1.3.1
/usr/lib/i386-linux-gnu/mesa/libGL.so.1
/usr/lib/i386-linux-gnu/mesa/libGL.so.1.2.0
For my Debian 7 'Wheezy' installation I used the following command:
ln -s /usr/lib/x86_64-linux-gnu/libGL.so.1 opt/android/tools/lib/libGL.so
sudo apt-get install libgl1-mesa-dev
cd ~/Development/adt-bundle-linux-x86_64-20140321/sdk/tools/lib
unlink libGL.so
ln -s /usr/lib/x86_64-linux-gnu/mesa/libGL.so.1.2.0 libGL.so
that's it!
I had this problem because I had checked "Use Host GPU" when creating my AVD. I tried it with that option unchecked and I was able to successfully start the emulator. This is acceptable for my testing purposes, but if using the host GPU is important you'll probably want to try some of the other solutions here.
I had the same problem. Reinstalling the Nvidia driver fixed the segmentation fault for me.
I solved this problem by reinstalling libgl1, both the 64- and 32-bit libraries:
$ sudo apt-get install --reinstall libgl1-mesa-glx libgl1-mesa-glx:i386
Background: Previously I switched from the free radeon driver back to fglrx. I guess this somehow screwed up my libgl1, because fglrx comes with its own version.
Besides, I think that the other solutions provided here are possibly dangerous, because it is wrong to symlink 32 bit shared libraries into the (64 bit) /lib/ directory.
Check if you have libgl1-mesa-* packages installed. If so, install the libgl1-mesa-dev package to get the unversioned shared objects.
You shouldn't have to do this -- it's the Android team's error. Give them a break, they're only Java developers.

Categories

Resources