android没有启动模拟器:无法运行程序。

时间:2020-12-16 18:56:30

I have installed android SDK and android eclipse plugin successfully on Ubuntu.

我在Ubuntu上成功安装了android SDK和android eclipse插件。

Every thing was working fine until I removed Ubuntu and installed Linux Mint. I installed the SDK again and used the same eclipse copy I was using on Ubuntu but now all the android applications contain errors and I can not start the emulator.

在我删除Ubuntu并安装Linux Mint之前,一切都很正常。我再次安装了SDK,使用了我在Ubuntu上使用的相同的eclipse拷贝,但是现在所有的android应用程序都有错误,我无法启动模拟器。

When starting the emulator this message appears

在启动模拟器时,将显示此消息。

Starting emulator for AVD 'test' Failed to start emulator: Cannot run program "/home/anas/android//tools/emulator": error=2, No such file or directory

While the android SDK is installed in the specified path and the file (emulator) is exists in the same path.

虽然android SDK安装在指定的路径中,而文件(模拟器)也存在于相同的路径中。

Also all my applications contains the same error R can not be resolved to a variable

而且,我的所有应用程序都包含相同的错误R不能被解析为一个变量。

What is the problem here?

这里有什么问题?

7 个解决方案

#1


29  

  1. Installed on Ubuntu successfully. but not running avd

    在Ubuntu安装成功。但不运行avd

    If you're running a 64-bit system, you need to install ia32-libs

    如果您运行的是64位系统,您需要安装ia32-libs。

  sudo apt-get install ia32-libs
  1. R can not be resolved to a variable
  2. R不能被解析为一个变量。

This can be due to following Reason

这可能是由于以下原因。

  • class is not the part of that package add proper package

    类不是包中添加适当包的部分。

  • not properly defined in manifest file class path define it properly

    在清单文件类路径中没有正确定义它。

clear and run the avd it will work

清除并运行avd,它将工作。

#2


10  

If cmd from fist comment doesn't work like in my case (64bit Crunchbang) then you may also try with :

如果来自拳头部门的cmd不像我的情况(64bit Crunchbang),那么你也可以试试:

sudo aptitude install ia32-libs lib32ncurses5 lib32stdc++6

sudo倾向安装ia32-libs lib32ncurses5 lib32stdc++6。

#3


7  

I solved it doing a backup of the "emulator" and creating a symbolic link to the correct emulator:

我解决了它对“模拟器”的备份,并创建了一个指向正确仿真器的符号链接:

mv emulator emulator_bup
ln -s emulator64-arm emulator

#4


2  

I used the command-line tool android (android avd), and used Tools->Manage SDK to install 64 bit emulators. I then mv'ed emulator to emulator.old, and emulator64-arm to emulator. Now the AVD starts up.

我使用了命令行工具android (android avd)和使用工具->管理SDK来安装64位模拟器。然后用mv'ed模拟器进行仿真。旧的,和仿真器-arm仿真器。现在AVD开始了。

#5


2  

You do not need install packages any more!

您不再需要安装软件包!

In directory tools, there are many types of emulator, while my computer works with emulator64-arm! My system is Linux Mint 16 amd64! Good luck!

在目录工具中,有许多类型的仿真器,而我的计算机使用的是仿真器-arm!我的系统是Linux Mint 16 amd64!好运!

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

#6


1  

Like you have written the specified path and the files are exists in the same path, but i suggest to check that one more time.

就像您已经编写了指定的路径,并且文件也存在于相同的路径中,但是我建议您再检查一次。

and like you are getting R cannot be resolved to a variable, do not worry:

就像你得到R不能被解析成一个变量,不要担心:

Reasons:

原因:

  1. Check Package name in Manifest File
  2. 检查清单文件中的包名。
  3. If you are already getting something like this: import com.version.bajrang.january.R; so first of all try to change package name here, or secondly just delete this line and clean your program
  4. 如果你已经得到了这样的东西:导入com.version.bajrang.january.R;因此,首先尝试改变包的名称,或者,然后删除这条线并清理程序。
  5. If you are not getting something like: import com.version.bajrang.january.R; then add import packagename.R;
  6. 如果您没有得到类似的东西:导入com.version.bajrang.january.R;然后添加进口packagename.R;

I believe that you will get your answer.....

我相信你会得到你的答案……

#7


1  

It looks like your SDK path in eclipse has a mistake:

看起来eclipse中的SDK路径有一个错误:

Cannot run program "/home/anas/android//tools/emulator"

不能运行程序“/ home /轶事/ android / /工具/模拟器”

That double "//" may be the problem. Check in Eclipse: Window -> Preferences -> Android. There should be a field there pointing the SDK Location. Edit it.

这个“//”可能是问题所在。查看Eclipse:窗口->首选项-> Android。应该有一个指向SDK位置的字段。编辑它。

Check your path : /home/anas/android/ to see if it really is where you put your SDK . If not repeat these steps to have it

检查您的路径:/home/anas/android/,看看它是否真的是您放置SDK的地方。如果不重复这些步骤,就得到它。

The missing R resource message is a compile error right? Then in this case your emulator should not be the problem. However, if your SDK path is incorrect like I suspect, then .. you can expect this compile error along with any other android libraries import

丢失的R资源消息是一个编译错误,对吗?在这种情况下,模拟器不应该成为问题。但是,如果您的SDK路径不正确,如我所怀疑的那样。您可以预期此编译错误与任何其他android库的导入。

#1


29  

  1. Installed on Ubuntu successfully. but not running avd

    在Ubuntu安装成功。但不运行avd

    If you're running a 64-bit system, you need to install ia32-libs

    如果您运行的是64位系统,您需要安装ia32-libs。

  sudo apt-get install ia32-libs
  1. R can not be resolved to a variable
  2. R不能被解析为一个变量。

This can be due to following Reason

这可能是由于以下原因。

  • class is not the part of that package add proper package

    类不是包中添加适当包的部分。

  • not properly defined in manifest file class path define it properly

    在清单文件类路径中没有正确定义它。

clear and run the avd it will work

清除并运行avd,它将工作。

#2


10  

If cmd from fist comment doesn't work like in my case (64bit Crunchbang) then you may also try with :

如果来自拳头部门的cmd不像我的情况(64bit Crunchbang),那么你也可以试试:

sudo aptitude install ia32-libs lib32ncurses5 lib32stdc++6

sudo倾向安装ia32-libs lib32ncurses5 lib32stdc++6。

#3


7  

I solved it doing a backup of the "emulator" and creating a symbolic link to the correct emulator:

我解决了它对“模拟器”的备份,并创建了一个指向正确仿真器的符号链接:

mv emulator emulator_bup
ln -s emulator64-arm emulator

#4


2  

I used the command-line tool android (android avd), and used Tools->Manage SDK to install 64 bit emulators. I then mv'ed emulator to emulator.old, and emulator64-arm to emulator. Now the AVD starts up.

我使用了命令行工具android (android avd)和使用工具->管理SDK来安装64位模拟器。然后用mv'ed模拟器进行仿真。旧的,和仿真器-arm仿真器。现在AVD开始了。

#5


2  

You do not need install packages any more!

您不再需要安装软件包!

In directory tools, there are many types of emulator, while my computer works with emulator64-arm! My system is Linux Mint 16 amd64! Good luck!

在目录工具中,有许多类型的仿真器,而我的计算机使用的是仿真器-arm!我的系统是Linux Mint 16 amd64!好运!

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

#6


1  

Like you have written the specified path and the files are exists in the same path, but i suggest to check that one more time.

就像您已经编写了指定的路径,并且文件也存在于相同的路径中,但是我建议您再检查一次。

and like you are getting R cannot be resolved to a variable, do not worry:

就像你得到R不能被解析成一个变量,不要担心:

Reasons:

原因:

  1. Check Package name in Manifest File
  2. 检查清单文件中的包名。
  3. If you are already getting something like this: import com.version.bajrang.january.R; so first of all try to change package name here, or secondly just delete this line and clean your program
  4. 如果你已经得到了这样的东西:导入com.version.bajrang.january.R;因此,首先尝试改变包的名称,或者,然后删除这条线并清理程序。
  5. If you are not getting something like: import com.version.bajrang.january.R; then add import packagename.R;
  6. 如果您没有得到类似的东西:导入com.version.bajrang.january.R;然后添加进口packagename.R;

I believe that you will get your answer.....

我相信你会得到你的答案……

#7


1  

It looks like your SDK path in eclipse has a mistake:

看起来eclipse中的SDK路径有一个错误:

Cannot run program "/home/anas/android//tools/emulator"

不能运行程序“/ home /轶事/ android / /工具/模拟器”

That double "//" may be the problem. Check in Eclipse: Window -> Preferences -> Android. There should be a field there pointing the SDK Location. Edit it.

这个“//”可能是问题所在。查看Eclipse:窗口->首选项-> Android。应该有一个指向SDK位置的字段。编辑它。

Check your path : /home/anas/android/ to see if it really is where you put your SDK . If not repeat these steps to have it

检查您的路径:/home/anas/android/,看看它是否真的是您放置SDK的地方。如果不重复这些步骤,就得到它。

The missing R resource message is a compile error right? Then in this case your emulator should not be the problem. However, if your SDK path is incorrect like I suspect, then .. you can expect this compile error along with any other android libraries import

丢失的R资源消息是一个编译错误,对吗?在这种情况下,模拟器不应该成为问题。但是,如果您的SDK路径不正确,如我所怀疑的那样。您可以预期此编译错误与任何其他android库的导入。