简体   繁体   English

应用程序未在带有 ADT 包的 Eclipse 上运行

[英]Application not running on Eclipse with ADT bundle

I am trying to develop an application on Eclipse with ADT bundle, but when I try to run my application it shows the following error:我正在尝试使用 ADT 包在 Eclipse 上开发应用程序,但是当我尝试运行我的应用程序时,它显示以下错误:

[2015-09-08 21:27:53 - gpio] /home/tejvir/android-sdks/build-tools/23.0.1/aapt: error while loading shared libraries: libgcc_s.so.1: cannot open shared object file: No such file or directory [2015-09-08 21:27:53 - gpio] /home/tejvir/android-sdks/build-tools/23.0.1/aapt:加载共享库时出错:libgcc_s.so.1:无法打开共享对象文件: 无此文件或目录

What should be done in this situation?在这种情况下应该怎么做?

I tried the solutions in the other question mentioned above but I have encountered the following errors in it :我尝试了上面提到的另一个问题中的解决方案,但遇到了以下错误:

sudo apt-get -qqy install libncurses5:i386 libstdc++6:i386 zlib1g:i386
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.

I have also tried the other solution given on the same link and even that has not provided me with the solution.我还尝试了同一链接上给出的其他解决方案,即使它也没有为我提供解决方案。 Following are the errors I have encountered while trying the solution:以下是我在尝试解决方案时遇到的错误:

sudo apt-get install libc6-i386 lib32stdc++6 lib32gcc1 lib32ncurses5
Reading package lists... Done
Building dependency tree       
Reading state information... Done
lib32ncurses5 is already the newest version.
libc6-i386 is already the newest version.
libc6-i386 set to manually installed.
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:
     lib32gcc1 : Depends: gcc-4.9-base (= 4.9-20140406-0ubuntu1) but 4.9.1-0ubuntu1 is to be installed
     lib32stdc++6 : Depends: gcc-4.8-base (= 4.8.2-19ubuntu1) but 4.8.4-2ubuntu1~14.04 is to be installed
     E: Unable to correct problems, you have held broken packages.

So I am kinda stuck here.所以我有点卡在这里。

I have actually solved my question with some expert help.我实际上已经在一些专家的帮助下解决了我的问题。

I have explained the problem above but the real problem was that my gcc was having some issues regarding which version to run and the versions that i had installed were not for my distribution ie Ubuntu 14.04.我已经解释了上面的问题,但真正的问题是我的 gcc 在运行哪个版本方面存在一些问题,我安装的版本不适用于我的发行版,即 Ubuntu 14.04。 And in addition to that adb that comes for linux has been updated to run with 32 bit architecture but not with 64 bit architecture.此外,为 linux 提供的 adb 已更新为在 32 位架构下运行,但不在 64 位架构下运行。 That is the reason why my adb is showing errors for files that already exist in my system.这就是我的 adb 显示系统中已存在文件错误的原因。

Now to remove these errors i first needed to correct my gcc and then work my way up in order to install all the required 32 bit architecture libraries.现在要消除这些错误,我首先需要更正我的 gcc,然后逐步安装所有必需的 32 位架构库。

So now i will explain how i solved my problem.所以现在我将解释我如何解决我的问题。 NOTE: This worked for my computer and i am not sure if it is going to work on every PC.注意:这适用于我的计算机,我不确定它是否适用于每台 PC。 But i think it will work on almost all PCs.但我认为它几乎适用于所有 PC。

Let's Go.我们走吧。

Run the following commands.运行以下命令。

1. sudo apt-get install gcc-4.8base=4.8.2-19ubuntu1

Now if you are getting the following error:现在,如果您收到以下错误:

The following packages have unmet dependencies: 

  indicator-bluetooth : Depends: unity-control-center but it is not going to be installed or 

  gnome-control-center but it is not going to be installed or 

  ubuntu-system-settings but it is not going to be installed 

  libdee-1.0-4 : Depends: libicu52 (>= 52~m1-1~) but it is not going to be installed         

  system-image-dbus : Depends: system-image-common (= 2.2-0ubuntu1) but it is not going to be installed 

 E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.

Next run the following command:接下来运行以下命令:

 2. apt-cache policy libicu52 libdee-1.0-4 system-image-dbus system-image-common

Now check if you are getting the following output:

 libicu52:
     Installed: 52.1-3ubuntu0.3
     Candidate: 52.1-3ubuntu0.3 
     Version table:
      *** 52.1-3ubuntu0.3 0
           500 security.ubuntu.com/ubuntu trusty-security/main amd64 Packages
            100 /var/lib/dpkg/status
      52.1-3 0
            500 in.archive.ubuntu.com/ubuntu trusty/main amd64 Packages
 libdee-1.0-4:
     Installed: 1.2.7+14.04.20140324-0ubuntu1
     Candidate: 1.2.7+14.04.20140324-0ubuntu1
     Version table:
     *** 1.2.7+14.04.20140324-0ubuntu1 0
         500 in.archive.ubuntu.com/ubuntu trusty/main amd64 Packages
         100 /var/lib/dpkg/status
 system-image-dbus:
     Installed: (none)
     Candidate: 2.2-0ubuntu1
     Version table:
     2.2-0ubuntu1 0 

If you are with me up to this point.如果你和我在一起。 Then this means that you have really messed up your system.那么这意味着你真的把你的系统搞砸了。 From this point onwards we will first try to fix our system.从现在开始,我们将首先尝试修复我们的系统。

Run the following two commands:运行以下两个命令:

3. sudo sed -i.bak 's/http:\/\/in./http:\/\//' /etc/apt/sources.list

4. sudo apt-get update

After this is done.完成此操作后。

Execute these two commands执行这两个命令

  5. sudo apt-get install system-image-dbus

  6. sudo apt-get install system-image-common

Now after this run the following command:现在,在此之后运行以下命令:

  7. sudo apt-get install gcc-4.8-base=4.8.2-19ubuntu1

If this file gets installed on your PC without any problem then you are basically done.如果此文件安装在您的 PC 上没有任何问题,那么您基本上就完成了。 You don't need to go ahead with this.你不需要继续这个。 But if your system prints out the following error但是如果您的系统打印出以下错误

  The following packages have unmet dependencies:

   indicator-bluetooth : Depends: unity-control-center but it is not going to be installed or

   gnome-control-center but it is not going to be installed or

   ubuntu-system-settings but it is not going to be installed

    libdee-1.0-4 : Depends: libicu52 (>= 52~m1-1~) but it is not going to be installed

    E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.

If you encounter this error then run the following command.

  8. sudo apt-get install --reinstall libicu52

  9.  sudo apt-get install libdee-1.0-4

  10. sudo apt-get dist-upgrade

Now this last command might take some time depending on your internet connection.现在,最后一个命令可能需要一些时间,具体取决于您的 Internet 连接。

After this is done... Follow the below sets of instructions and you are done.完成后...按照以下说明进行操作即可完成。

  1. Start Software & Updates启动软件和更新
  2. Select the tab Updates选择选项卡更新
  3. Select Recommended updates (trusty-updates) (In my screenshot it's vivid-updates, but that's just an example)选择推荐更新(trusty-updates) (在我的截图中是vivid-updates,但这只是一个例子)

    在此处输入图片说明

    And click Close然后点击关闭

  4. Click Reload in this dialog单击此对话框中的重新加载

    在此处输入图片说明

  5. Now upgrade your system (again ;) )现在升级您的系统(再次;)

     sudo apt-get dist-upgrade
  6. And install并安装

    sudo apt-get install libstdc++6

And after this you are good to go.. :)在此之后,您就可以开始了.. :)

Thank You谢谢你

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM