2016-02-22 170 views
2

我的工作設定Android工作室在Ubuntu中,我試圖安裝谷歌提到的64位操作系統在Ubuntu上安裝Android Studio中:無法運行mksdcard SDK工具

sudo dpkg --add-architecture i386 
sudo apt-get update 
sudo apt-get install libncurses5:i386 libstdc++6:i386 zlib1g:i386 

,但仍無法正常工作的包,並顯示該錯誤: enter image description here

這裏是終端登錄:

~/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

嘗試在命令行運行'mksdcard',看看是什麼錯誤,你得到。 – CommonsWare

+1

可能重複[錯誤:無法在ubuntu中運行mksdcard SDK工具](http://stackoverflow.com/questions/29241640/error-unable-to-run-mksdcard-sdk-tool-in-ubuntu) – tripleee

回答

3

只需使用

sudo apt-get install lib32stdc++6 

這引起了我的排序。

0

Android開發者網站有在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。

因此,要獲得OpenJDK的只是跟着OpenJDK的文檔: http://openjdk.java.net/install/

對於Ubuntu的這個工作得很好:

sudo apt-get install openjdk-8-jre 
相關問題