安装自定义 .apk 时解析错误

发布于 2024-10-15 22:59:58 字数 488 浏览 4 评论 0原文

我构建了一个简单的自定义应用程序,我们希望将其推送到我们的销售代表电话上。我使用 Eclipse 和 Android SDK 开发了它,它是为 Android 版本编写的 1.5,最小 SDK 设置为 3。我已经使用私钥(不是调试密钥)编译了应用程序,所有内容都编译没有错误。当我通过电子邮件将 .apk 文件发送给一些用户进行测试时,他们在单击 .apk 文件时收到解析错误。以下是日志内容:

WARN/PackageInstaller(2873): 解析清单时出现解析错误。停止安装

但是,当一名用户在 Gmail 中打开该邮件时,他们可以选择安装 .apk,并且安装和运行没有任何问题。

谁能告诉我是否可以将 .apk 文件通过电子邮件发送给所需的人员并直接通过电子邮件进行安装?我们还将 .apk 文件保存到 SD 卡并尝试从那里安装它,结果相同。我发现了一些关于在手机上安装文件管理器并使用它从 SD 卡进行安装的建议。然而,将其推送给我们的代表时,步骤越少越好。

任何帮助将不胜感激。

I have built a simple custom app that we would like to push out to our sales reps phones. I developed it using Eclipse with the Android SDK and it is written for Android version to 1.5 and the min SDK is set to 3. I have compiled the app with a private key (not the debug key) and everything compiles without errors. When I send the .apk file to a few users via email to test, they receive a parse error when clicking on the .apk file. The following is the content from the log:

WARN/PackageInstaller(2873): Parse error when parsing manifest. Discontinuing installation

However, when one user opened the message in Gmail, they were given the option to Install the .apk and it installs and runs without any problems.

Can anyone tell me if it is possible to email the .apk file to the desired people and have it install directly from an email? We also saved the .apk file to the SD card and tried to install it from there with the same result. I found several suggestions about installing a file manager to the phone and using that to install from the SD card. However, the fewer steps the better when pushing this out to our reps.

Any help would really be appreciated.

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

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

发布评论

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

评论(4

云巢 2024-10-22 22:59:58

谁能告诉我是否可以将 .apk 文件通过电子邮件发送给所需人员并直接通过电子邮件进行安装?

仅当发送电子邮件客户端在电子邮件中输入正确的 MIME 类型时。

通常,使用基于 Web 的东西会更好,可以手动设置(使用 application/vnd.android.package-archive 作为 MIME 类型),或者通过 Dropbox 之类的东西 - 将 APK 放入一个共享盒子,拥有 Android Dropbox 客户端的用户可以简单地从那里安装它。

Can anyone tell me if it is possible to email the .apk file to the desired people and have it install directly from an email?

Only if the sending email client puts the right MIME type in the email message.

You are typically better served using something Web-based, either manually set up (use application/vnd.android.package-archive as the MIME type), or via something like Dropbox -- put an APK in a shared box, and people with the Android Dropbox client can simply install it from there.

沧桑㈠ 2024-10-22 22:59:58

不用担心。这是一个小问题。我也花了一周的时间终于找到了解决方案。只需转到您的manifest.xml 文件并执行以下更改即可。

//uses-sdk android:minSdkVersion="14"

只需将其更改为

//uses-sdk android:minSdkVersion="3"

或我们的设备支持的任何较低级别的 sdk 版本即可。尝试一下。并回复,无论您满意与否。

don't worry. Its a little problem. I also spend one week behind this and finally I got the solution. Just go to you manifest.xml file and perform fallowing changes.

//uses-sdk android:minSdkVersion="14"

Just change it to

//uses-sdk android:minSdkVersion="3"

Or any lower level sdk version that our device support. Try it. And reply, whether You satisfied or not.

苦笑流年记忆 2024-10-22 22:59:58

我认为您的 Gmail 帐户有问题。因为我总是通过 gmail 帐户将 .apk 文件发送给我的客户。直到我在附加和发送 .apk 文件时没有遇到任何问题。尝试使用其他 Gmail 帐户进行确认。

I think, there is problem with your gmail account. Because I always sent .apk file to my client through gmail account. And until I did not get any problem while attaching and sending .apk file. Try with other gmail account for your confirmation.

凝望流年 2024-10-22 22:59:58

当您的软件sdk版本与设备sdk版本不匹配时出现包错误
检查适当的设备 sdk 版本并更改您的软件 sdk 版本
您可以通过以下步骤进行更改
如果您在 eclipse 中没有 sdk 版本,只需从

Preferences->Android sdk and Avd manager->Available package

下载它,然后在项目资源管理器中选择
项目根目录->属性->Android
并相应地更改版本

Package error comes when your sdk version of software does not matches the device sdk version
check appropriate device sdk version and change your software sdk version
you can change by following steps
if you don't have sdk version in eclipse just download it from

Preferences->Android sdk and Avd manager->Available package

after that in project explorer select
Project root->properties->Android
and change version accordingly

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