我正在Ubuntu中设置Android Studio,我尝试安装google为64Bit OS提到的软件包
sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt-get install libncurses5:i386 libstdc++6:i386 zlib1g:i386
这是终端日志:
~/AndroidStudio/bin$ sh ./studio.sh
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=350m; support was removed in 8.0
[ 2252] WARN - api.vfs.impl.local.FileWatcher - Native file watcher is not executable: <a href="/home/ahmed/AndroidStudio/bin/fsnotifier64">/home/ahmed/AndroidStudio/bin/fsnotifier64</a>
[ 7618] WARN - dea.updater.SdkComponentSource - Couldn't find existing SDK
[ 72252] ERROR - ard.ConsolidatedProgressStep$1 - Unable to run mksdcard SDK tool.
com.android.tools.idea.welcome.install.WizardException: Unable to run mksdcard SDK tool.
at com.android.tools.idea.welcome.install.CheckSdkOperation.perform(CheckSdkOperation.java:128)
at com.android.tools.idea.welcome.install.CheckSdkOperation.perform(CheckSdkOperation.java:40)
at com.android.tools.idea.welcome.install.InstallOperation.execute(InstallOperation.java:68)
at com.android.tools.idea.welcome.install.InstallOperation$OperationChain.perform(InstallOperation.java:151)
at com.android.tools.idea.welcome.install.InstallOperation.execute(InstallOperation.java:68)
at com.android.tools.idea.welcome.install.InstallOperation$OperationChain.perform(InstallOperation.java:149)
at com.android.tools.idea.welcome.install.InstallOperation.execute(InstallOperation.java:68)
at com.android.tools.idea.welcome.install.InstallOperation$OperationChain.perform(InstallOperation.java:149)
at com.android.tools.idea.welcome.install.InstallOperation.execute(InstallOperation.java:68)
at com.android.tools.idea.welcome.install.InstallOperation$OperationChain.perform(InstallOperation.java:149)
at com.android.tools.idea.welcome.install.InstallOperation.execute(InstallOperation.java:68)
at com.android.tools.idea.welcome.wizard.InstallComponentsPath.runLongOperation(InstallComponentsPath.java:297)
at com.android.tools.idea.welcome.wizard.ConsolidatedProgressStep.doLongRunningOperation(ConsolidatedProgressStep.java:78)
at com.android.tools.idea.welcome.wizard.ConsolidatedProgressStep.access$000(ConsolidatedProgressStep.java:32)
at com.android.tools.idea.welcome.wizard.ConsolidatedProgressStep$1.run(ConsolidatedProgressStep.java:58)
at com.android.tools.idea.welcome.wizard.FirstRunWizardHost$LongRunningOperationWrapper.run(FirstRunWizardHost.java:434)
at com.intellij.openapi.progress.impl.CoreProgressManager$TaskRunnable.run(CoreProgressManager.java:563)
at com.intellij.openapi.progress.impl.CoreProgressManager$2.run(CoreProgressManager.java:152)
at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:452)
at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:402)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:54)
at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:137)
at com.intellij.openapi.progress.impl.ProgressManagerImpl$1.run(ProgressManagerImpl.java:126)
at com.intellij.openapi.application.impl.ApplicationImpl$8.run(ApplicationImpl.java:400)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
at org.jetbrains.ide.PooledThreadExecutor$1$1.run(PooledThreadExecutor.java:56)
[ 72254] ERROR - ard.ConsolidatedProgressStep$1 - Android Studio 1.5.1 Build #AI-141.2456560
[ 72255] ERROR - ard.ConsolidatedProgressStep$1 - JDK: 1.8.0_72
[ 72255] ERROR - ard.ConsolidatedProgressStep$1 - VM: Java HotSpot(TM) 64-Bit Server VM
[ 72255] ERROR - ard.ConsolidatedProgressStep$1 - Vendor: Oracle Corporation
[ 72255] ERROR - ard.ConsolidatedProgressStep$1 - OS: Linux
[ 72255] ERROR - ard.ConsolidatedProgressStep$1 - Last Action:
如何解决?谢谢!
答案 0 :(得分:3)
只需使用
sudo apt-get install lib32stdc++6
这让我的排序。
答案 1 :(得分:0)
您是否尝试过安装此软件包?
sudo apt-get install lib32z1 lib32ncurses5 lib32bz2-1.0 lib32stdc ++ 6
答案 2 :(得分:0)
Android Developer网站提供了在Linux上安装Android Studio的文档,它涵盖了这个问题: https://developer.android.com/studio/install.html
从链接引用:
64位计算机所需的库:
如果您运行的是64位版本的Ubuntu,则需要使用以下命令安装一些32位库:
sudo apt-get install libc6:i386 libncurses5:i386 libstdc++6:i386 lib32z1 libbz2-1.0:i386
如果您运行的是64位Fedora,则命令为:
sudo yum install zlib.i686 ncurses-libs.i686 bzip2-libs.i686
顺便说一句 - 你需要的另一件事是java。由于Android N切换到OpenJDK,我认为在开发Android应用程序时没有理由坚持使用Oracle。 https://arstechnica.com/tech-policy/2016/01/android-n-switches-to-openjdk-google-tells-oracle-it-is-protected-by-the-gpl/
因此,要获得OpenJDK,请遵循OpenJDK文档: http://openjdk.java.net/install/
对于Ubuntu,这很好用:
sudo apt-get install openjdk-8-jre