我尝试使用 PPA 安装 andorid studio:
但安装运行后
sudo apt-get install android-studio
给出错误:-
Setting up android-studio (4.11.0-ubuntu0) ...
Archive: /opt/android-studio-ide-141.2117773-linux.zip
End-of-central-directory signature not found. Either this file is not
a zipfile, or it constitutes one disk of a multi-part archive. In the
latter case the central directory and zipfile comment will be found on
the last disk(s) of this archive.
unzip: cannot find zipfile directory in one of /opt/android-studio-ide-141.2117773-linux.zip or
/opt/android-studio-ide-141.2117773-linux.zip.zip, and cannot find /opt/android-studio-ide-141.2117773-linux.zip.ZIP, period.
find: `/opt/android-studio/': No such file or directory
find: `/opt/android-studio/': No such file or directory
dpkg: error processing package android-studio (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
android-studio
E: Sub-process /usr/bin/dpkg returned an error code (1)
答案1
如何安装Android Studio:
1-从以下网址下载适用于 Linux 的所有 Android Studio 软件包这里。
2 – 将下载的 ZIP 文件解压到适合您的应用程序的位置(例如,在您的主目录中)。
unzip android-studio-ide-141.2117773-linux.zip
3 – 输入以下android-studio/bin/
内容进入:
cd /home/<user_name>/android-studio/bin/
(替换<user_name>
为您的登录用户)
4 – 然后输入:
sudo chmod u+x studio.sh
5 - 按下回车键后,系统将提示您输入 root 密码,输入密码后,按回车键,然后输入:
./studio.sh
来源 :