Android Studio on Linux 無法線上更新

weixin_34320159發表於2017-12-16

最近打算在Linux上開發,選擇了Deepin,挺不錯的。

無法更新

重灌了Android Studio,裝的是2.3的版本,但是無法線上升級。

提示的大概意思是:無法刪除/opt/android-studio/lib/rt/xxxxx.jar中的某一個檔案

這句話讓我想起了這個錯誤:

Studio does not have write access to /opt/android-studio. Please run it by a privileged user to update 

沒有許可權,不能操作相應的資料夾。

執行以下命令,不要在root環境下執行

sudo chown -R $USER:$USER /opt/android-studio

這個樣子,就可以了。

模擬器啟動不了

提示:

上午11:21 Emulator: libGL error: unable to load driver: r600_dri.so

上午11:21 Emulator: libGL error: driver pointer missing

上午11:21 Emulator: libGL error: failed to load driver: r600

上午11:21 Emulator: libGL error: unable to load driver: r600_dri.so

上午11:21 Emulator: libGL error: driver pointer missing

上午11:21 Emulator: libGL error: failed to load driver: r600

上午11:21 Emulator: libGL error: unable to load driver: swrast_dri.so

上午11:21 Emulator: libGL error: failed to load driver: swrast

上午11:21 Emulator: X Error of failed request:  BadValue (integer parameter out of range for operation)

上午11:21 Emulator: Major opcode of failed request:  156 (GLX)

上午11:21 Emulator: Minor opcode of failed request:  24 (X_GLXCreateNewContext)

上午11:21 Emulator: Value in failed request:  0x0

上午11:21 Emulator: Serial number of failed request:  64

上午11:21 Emulator: Current serial number in output stream:  65

上午11:21 Emulator: Process finished with exit code 1

上午11:22 Emulator: libGL error: unable to load driver: r600_dri.so

上午11:22 Emulator: libGL error: driver pointer missing

上午11:22 Emulator: libGL error: failed to load driver: r600

上午11:22 Emulator: libGL error: unable to load driver: r600_dri.so

上午11:22 Emulator: libGL error: driver pointer missing

上午11:22 Emulator: libGL error: failed to load driver: r600

上午11:22 Emulator: libGL error: unable to load driver: swrast_dri.so

上午11:22 Emulator: libGL error: failed to load driver: swrast

上午11:22 Emulator: X Error of failed request:  BadValue (integer parameter out of range for operation)

上午11:22 Emulator: Major opcode of failed request:  156 (GLX)

上午11:22 Emulator: Minor opcode of failed request:  24 (X_GLXCreateNewContext)

上午11:22 Emulator: Value in failed request:  0x0

上午11:22 Emulator: Serial number of failed request:  64

上午11:22 Emulator: Current serial number in output stream:  65

上午11:22 Emulator: Process finished with exit code 1

上午11:22 Emulator: libGL error: unable to load driver: r600_dri.so

上午11:22 Emulator: libGL error: driver pointer missing

上午11:22 Emulator: libGL error: failed to load driver: r600

上午11:22 Emulator: libGL error: unable to load driver: r600_dri.so

上午11:22 Emulator: libGL error: driver pointer missing

上午11:22 Emulator: libGL error: failed to load driver: r600

上午11:22 Emulator: libGL error: unable to load driver: swrast_dri.so

上午11:22 Emulator: libGL error: failed to load driver: swrast

上午11:22 Emulator: X Error of failed request:  BadValue (integer parameter out of range for operation)

上午11:22 Emulator: Major opcode of failed request:  156 (GLX)

上午11:22 Emulator: Minor opcode of failed request:  24 (X_GLXCreateNewContext)

上午11:22 Emulator: Value in failed request:  0x0

上午11:22 Emulator: Serial number of failed request:  64

上午11:22 Emulator: Current serial number in output stream:  65

上午11:22 Emulator: Process finished with exit code 1

解決:

sudo apt-get install lib64stdc++6:i386
sudo apt-get install mesa-utils

cd /opt/android-sdk/emulator/lib64
mv libstdc++/ libstdc++.bak
ln -s /usr/lib64/libstdc++.so.6  libstdc++

然後啟動模擬器就可以了

相關文章