Failed to load libGL.so on Android

前端 未结 26 1337
旧巷少年郎
旧巷少年郎 2020-12-04 06:05

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:

[201         


        
相关标签:
26条回答
  • 2020-12-04 06:45

    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
    
    0 讨论(0)
  • 2020-12-04 06:46

    I use Linux Mint 14 - 64 bit and for me, it worked :) :

    sudo apt-get install libgl1-mesa-glx libgl1-mesa-dev
    
    0 讨论(0)
  • 2020-12-04 06:46

    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.

    0 讨论(0)
  • 2020-12-04 06:48

    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,

    0 讨论(0)
  • 2020-12-04 06:49

    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.

    0 讨论(0)
  • 2020-12-04 06:49

    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
    
    0 讨论(0)
提交回复
热议问题