Android 共享库未运行

发布于 2024-11-02 08:18:07 字数 799 浏览 2 评论 0原文

好的,我有一个使用 android-rss 库(org.mcsoxford.rss)的项目。我为 android-rss 创建了一个单独的库项目。当我尝试运行我的项目时,收到一条错误消息,指出启动已取消。 “安装错误:INSTALL_FAILED_MISSING_SHARED_LIBRARY”。我浏览了 Android 上关于如何引用库 eclipse 项目的教程。我一切都设置正确。我还在 xml 文件中放入了一个 use-library。不确定问题是什么。这是我在 Android-Manifest.xml 中的用途

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
 ... 
 <uses-library android:required="true" android:name="org.mcsoxford.rss"></uses-library>
...
</manifest>

,我在 Android 库中引用了它。我可以构建项目并查看项目中对库的引用。没有错误什么都没有。参考库也被导出。

以下是我的控制台输出错误:

[2011-04-18 11:46:43 - BOTM] 安装错误:INSTALL_FAILED_MISSING_SHARED_LIBRARY [2011-04-18 11:46:43 - BOTM] 请检查 logcat 输出以获取更多详细信息。
[2011-04-18 11:46:44 - BOTM] 发射取消!

Okay I have a project that is using the android-rss library (org.mcsoxford.rss). I created a separate library project for the android-rss. When I try to run my project I get an error saying that the launch was canceled. "Installation error: INSTALL_FAILED_MISSING_SHARED_LIBRARY". I went through the tutorial on Android on how to reference the library eclipse project. I have everything setup right. I also put in the xml file a uses-library. Not sure what the problem is. Here is my the uses in the Android-Manifest.xml

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
 ... 
 <uses-library android:required="true" android:name="org.mcsoxford.rss"></uses-library>
...
</manifest>

And I have it referenced in the ANdroid Library. I can build the project and see the reference to the library in the project. No errors nothing. The reference lib is exported too.

Here are my console output errors:

[2011-04-18 11:46:43 - BOTM] Installation error: INSTALL_FAILED_MISSING_SHARED_LIBRARY [2011-04-18 11:46:43 - BOTM] Please check logcat output for more details.
[2011-04-18 11:46:44 - BOTM] Launch canceled!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

-黛色若梦 2024-11-09 08:18:07

我还没有检查过,但也许会有帮助。
请从以下位置下载 android-rss: https://github.com/ahorn/android-rss 和查看自述文件。

该部分可能有用:
“要从 Android 应用程序中引用此库项目,
导航到 /tools/ 目录并使用以下命令:

android update project \
- 目标 \
--path 路径/到/您的/项目 \
--library path/to/android-rss

此命令附加到 Android 中的“default.properties”文件
项目一个新的“android.library.reference”属性。这个的价值
新属性应该是您要创建的目录的相对路径
当您使用 Git 获取 Android RSS 库源代码时创建。

该库是在您构建时由 Android 构建框架编译的
您的移动应用程序在上面的 --path 参数中指定。”

I haven't check that yet, but maybe it will help.
Please download android-rss from: https://github.com/ahorn/android-rss and look into README file.

That part may be useful:
"To reference this library project from within your Android application,
navigate to the /tools/ directory and use the following command:

android update project \
--target \
--path path/to/your/project \
--library path/to/android-rss

This command appends to the "default.properties" file in your Android
project a new "android.library.reference" property. The value of this
new property should be the relative path to the directory which you
created when you fetched the Android RSS library source code with Git.

The library is compiled by the Android build framework when you build
your mobile app which was specified in the --path argument above."

意中人 2024-11-09 08:18:07

您是否在清单文件中的应用程序启动器活动中提到如下,

  <application>
<activity android:name=".LoginScreen"
              android:label="@string/app_name"
              android:screenOrientation="portrait">
        <intent-filter>
              <action android:name="android.intent.action.MAIN" />
              <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
</application>

这里登录屏幕是我在应用程序启动后立即启动的主要活动。

Did you mention in the application launcher activity in the manifest file as follows,

  <application>
<activity android:name=".LoginScreen"
              android:label="@string/app_name"
              android:screenOrientation="portrait">
        <intent-filter>
              <action android:name="android.intent.action.MAIN" />
              <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
</application>

Here Login screen is my main activity to launch as soon as app starts.

梦言归人 2024-11-09 08:18:07

将应用程序安装到设备时,PackageManager 会检查应用程序使用的共享库。
如果目标设备上缺少共享库,则用户将无法在该设备上安装应用程序。

因此,基本上,您尝试安装应用程序的设备上缺少库“org.mcsoxford.rss”。
为了解决此安装问题,您可以对清单文件进行以下更改:

android:required="**false**"

上述字段表明您的应用程序仍然可以在没有使用库标签上提到的库的情况下工作。这将允许应用程序安装在设备上,即使共享库丢失也是如此。

While installing the application on to the device, PackageManager checks for the shared libraries that are been used by the application.
If the shared libraries are missing on the target device, it will not allow user to install the application on that device.

So, basically the library "org.mcsoxford.rss" is missing from the device on which you are trying to install your application.
In order to over come this installation issue, you can make the following change on the manifest file:

android:required="**false**"

The above field states that you application will still work with out the library that has been mentioned on the uses-library tag. This will allow the application to be installed on the device, even if the shared library is missing.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文