簡體   English   中英

應用程序未在帶有 ADT 包的 Eclipse 上運行

[英]Application not running on Eclipse with ADT bundle

我正在嘗試使用 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.

所以我有點卡在這里。

我實際上已經在一些專家的幫助下解決了我的問題。

我已經解釋了上面的問題,但真正的問題是我的 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

如果此文件安裝在您的 PC 上沒有任何問題,那么您基本上就完成了。 你不需要繼續這個。 但是如果您的系統打印出以下錯誤

  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

現在,最后一個命令可能需要一些時間,具體取決於您的 Internet 連接。

完成后...按照以下說明進行操作即可完成。

  1. 啟動軟件和更新
  2. 選擇選項卡更新
  3. 選擇推薦更新(trusty-updates) (在我的截圖中是vivid-updates,但這只是一個例子)

    在此處輸入圖片說明

    然后點擊關閉

  4. 單擊此對話框中的重新加載

    在此處輸入圖片說明

  5. 現在升級您的系統(再次;)

     sudo apt-get dist-upgrade
  6. 並安裝

    sudo apt-get install libstdc++6

在此之后,您就可以開始了.. :)

謝謝你

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM