无法运行程序“xx / sdk // tools / emulator”:java.io.IOException:error = 2,没有这样的文件或目录

时间:2013-07-04 15:59:33

标签: android ubuntu adt apt

我在Ubuntu 12.10上成功安装了android SDK和android eclipse插件。 我在eclipse中创建了AVD,现在它还没有运行。这是我运行AVD时收到的输出错误:它提示:

Starting emulator for AVD 'avd'
Failed to start emulator: Cannot run program "/home/sancai/android/adt-bundle-linux-x86_64-20130522/sdk//tools/emulator": java.io.IOException: error=2, No such file or directory
我通过谷歌查找信息,大家都说这是因为我的系统版本是64,而adt只支持32,安装:sudo apt-get install ia32-libs,当我安装32位库时,其他问题出现如库文件关联到其他库,但没有其他库文件是完全的,它提示:

sancai@ubuntu:~$ sudo apt-get install ia32-libs
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 ia32-libs : Depends: ia32-libs-multiarch but it is not installable
E: Unable to correct problems, you have held broken packages.

sancai@ubuntu:~$ sudo apt-get install ia32-libs-multiarch
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package ia32-libs-multiarch is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'ia32-libs-multiarch' has no installation candidate

6 个答案:

答案 0 :(得分:28)

这应该有所帮助:

转到xx / sdk / tools并运行:

mv emulator emulator.bak
ln -s emulator64-arm emulator

无需安装任何ia32库。

答案 1 :(得分:10)

这是答案http://astroelec.blogspot.com/

(使用Debian) 由于debian已经转移到multiarch支持,因此安装ia32-libs将不再有效。 解。使用Multiarch Multiarch支持使得从i386发行版安装库变得容易......

sudo dpkg --add-architecture i386
sudo aptitude update
sudo aptitude install libstdc++6:i386 libgcc1:i386 zlib1g:i386 libncurses5:i386

现在启动eclipse,现在一切正常。

答案 2 :(得分:2)

在我的配置中,我已将虚拟设备设置为使用Intel Atom系统映像。来自伊利诺伊大学的劳伦斯·安格拉夫said in his Coursera androidapps101 course认为它的运行速度比ARM图像快。所以这对我有用:

mv emulator emulator_bak
ln -s emulator64-x86 emulator

答案 3 :(得分:1)

您不再需要安装包了!

在目录工具中,emulator有多种类型,而我的计算机则使用emulator64-arm!我的系统是Linux Mint 16 amd64!祝你好运!

./emulator64-arm @yxphone -sdcard yxsd -scale 0.8

答案 4 :(得分:1)

很简单,这是我的解决方案。 复制并粘贴,在您的终端中显示此行。

# Imports
import random
import sys

# Dictionary
Cards = {"1": 1, "2": 2, "3": 3, "4": 4, "5": 5, "6": 6, "7": 7, "8": 8, "9": 9,
         "10": 10, 'Jack': 10, 'Queen': 10, 'King': 10, 'Ace': 10}

# Welcome Print
print('Welcome to Blackjack!\n\nHere are your cards: \n ')
# Cards
keys = list(Cards)
# Beginning Cards
Card1 = random.choice(keys)
Card2 = random.choice(keys)
# Hit 1 Card
Card3 = random.choice(keys)
# Hit 2 Card
Card4 = random.choice(keys)
# Hit 3 Card
Card5 = random.choice(keys)
# Hit 4 Card
Card6 = random.choice(keys)
# Hit 5 Card
Card7 = random.choice(keys)
# Hit 6 Card
Card8 = random.choice(keys)

# Sum of Cards
# Beginning Total
Total = Cards[Card1] + Cards[Card2]
# Hit 1 Total
Total1 = Total + Cards[Card3]
# Hit 2 Total
Total2 = Total1 + Cards[Card4]
# Hit 3 Total
Total3 = Total2 + Cards[Card5]
# Hit 4 Total
Total4 = Total3 + Cards[Card6]
# Dealer's Total
DealerTotal = Cards[Card1] + Cards[Card2] + Cards[Card3]



### BEGINNING ###
print(Card1, 'and a', Card2, '. Your total is', Total)


### PHASE 1 ###
Choice = input('Would you like to hit or pass? (h = hit, p = pass): ')
# Hitting PHASE 1
if (Choice == 'h'):
    print('The dealer gives you a', Card3, '. Your new total is: '  , Total1)
    # Hitting & Losing HIT 1
    if (Total1 > 21):
        print('You lose! Try again later.')
        sys.exit()
# Passing PHASE 1
if (Choice == 'p'):
    # Confirmation whether you want to pass/hit
    Response1 = input('Are you sure? The dealer may have a better hand. (y = yes, n = no): ')
    # Reponse to hitting 'y'
    if (Response1 == 'y'):
        print('Your total is', Total, "The dealer's total is", DealerTotal)
        if (DealerTotal > 21 or 21 >= Total > DealerTotal):
            print("Congratulations, you've won!")
            sys.exit()
        elif (DealerTotal == Total):
            print('You have tied!')
        else:
            print('You lose! Try again later.')
            sys.exit()


### PHASE 2 ###
Choice1 = input('Would you like to hit or pass? (h = hit, p = pass): ')
# Hitting PHASE 2
if (Choice1 == 'h'):
    print('The dealer gives you a', Card4, '. Your new total is: ' , Total2)
    # Hittnig & Losing HIT 2
    if (Total2 > 21):
        print('You lose! Try again later.')
        sys.exit()
# Passing PHASE 2
if (Choice1 == 'p'):
    # Confirmation whether you want to pass/hit
    Response2 = input('Are you sure? The dealer may have a better hand.(y = yes, n = no): ')
    # Reponse to hitting 'y'
    if (Response2 == 'y'):
        print('Your total is', Total1, "The dealer's total is", DealerTotal)
        if (DealerTotal > 21 or 21 >= Total1 > DealerTotal):
            print("Congratulations, you've won!")
            sys.exit()
        elif (DealerTotal == Total1):
            print('You have tied!')
        else:
            print('You lose! Try again later.')
            sys.exit()
祝你好运!!

答案 5 :(得分:-1)

这可能会有所帮助

sudo aptitude install ia32-libs lib32ncurses5 lib32stdc++6
相关问题