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

时间:2015-09-08 16:37:39

标签: android eclipse adb ubuntu-14.04

我正在尝试使用ADT包在Eclipse上开发应用程序,但是当我尝试运行我的应用程序时,它显示以下错误:

  

[2015-09-08 21:27:53 - gpio] /home/tejvir/android-sdks/build-tools/23.0.1/aapt:加载共享库时出错:libgcc_s.so.1:无法打开共享对象文件:没有这样的文件或目录

在这种情况下该怎么办?

我在上面提到的另一个问题中尝试了解决方案,但我遇到了以下错误:

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.

我也尝试过在同一个链接上给出的其他解决方案,甚至没有为我提供解决方案。 以下是我在尝试解决方案时遇到的错误:

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.

所以我有点被困在这里。

1 个答案:

答案 0 :(得分:0)

我实际上已经通过一些专家帮助解决了我的问题。

我已经解释了上面的问题,但真正的问题是我的gcc在运行哪个版本时遇到了一些问题,我安装的版本不适用于我的发行版,即Ubuntu 14.04。除此之外,针对linux的adb已经更新为使用32位架构而不是64位架构。这就是我的adb为我的系统中已存在的文件显示错误的原因。

现在要删除这些错误我首先需要纠正我的gcc然后再向上工作以安装所有必需的32位架构库。

所以现在我将解释我是如何解决我的问题的。 注意:这适用于我的计算机,我不确定它是否适用于每台PC。但我认为它几乎适用于所有PC。

让我们走吧。

运行以下命令。

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

现在,如果您收到以下错误:

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.

接下来运行以下命令:

 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 

如果你和我在一起这一点。那么这意味着你真的弄乱了你的系统。从这一点开始,我们将首先尝试修复我们的系统。

运行以下两个命令:

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

4. sudo apt-get update

完成此操作后。

执行这两个命令

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

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

此后运行以下命令:

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

如果这个文件安装在你的电脑上没有任何问题,那么你基本上完成了。你不需要继续这样做。但是,如果您的系统打印出以下错误

  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

现在这最后一个命令可能需要一些时间,具体取决于您的互联网连接。

完成此操作后......按照以下说明完成操作。

  1. 启动软件&更新
  2. 选择标签更新
  3. 选择推荐更新(可信任更新)(在我的屏幕截图中,这是一个生动的更新,但这只是一个例子)

    enter image description here

    然后点击关闭

  4. 点击此对话框中的重新加载

    enter image description here

  5. 现在升级您的系统(再次;)

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

    sudo apt-get install libstdc++6
    
  7. 在此之后你很高兴去...... :)

    谢谢