eclipse 无法安装第三方APK文件

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/9856988/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 17:53:36  来源:igfitidea点击:

Can't install third-party APK file

androideclipseparsingapk

提问by NewAndroidProgrammer

I am a new programmer for Android, but I have been using eclipse for a year and a half now. I am developing an Android Application for my school's health department to allow students to track certain health behaviors overtime.

我是Android的新程序员,但我已经使用eclipse一年半了。我正在为我学校的卫生部门开发一个 Android 应用程序,以允许学生加班跟踪某些健康行为。

I have completed the coding of the app and have successfully tested it on a virtual device. The applications runs fine on the AVD.

我已经完成了应用程序的编码并在虚拟设备上成功地测试了它。应用程序在 AVD 上运行良好。

However, the problem arises when I export the project as an Android application through eclipse. I create the apk file using the debug.keystore and the androiddebugkey. I create the apk file (which is about 115 kilobytes). Next, I connect by phone (an LG Thrill) and open it via My Computer. I drag and drop the apk file into the "downloads" folder in the phone.

但是,当我通过eclipse将项目导出为Android应用程序时出现问题。我使用 debug.keystore 和 androiddebugkey 创建 apk 文件。我创建了 apk 文件(大约 115 KB)。接下来,我通过电话(一个 LG Thrill)连接并通过我的电脑打开它。我将 apk 文件拖放到手机的“下载”文件夹中。

I use a Market App called ASTRO to access the apk file in the downloads folder. However, when I try to install it, I get the dreaded "There is a problem parsing the package" error. I have had this problem for weeks now.

我使用名为 ASTRO 的市场应用程序访问下载文件夹中的 apk 文件。但是,当我尝试安装它时,出现了可怕的“解析包时出现问题”错误。我已经有这个问题好几个星期了。

I have tried all sorts of solutions. I have developed the app for the same Android level as the phone. I have tried making my own keystore and exporting. I have also tried making smaller apps (ie: HelloWorld) and installing them. I keep getting the same error.

我尝试了各种解决方案。我已经为与手机相同的 Android 级别开发了该应用程序。我尝试制作自己的密钥库并导出。我还尝试制作较小的应用程序(即:HelloWorld)并安装它们。我不断收到同样的错误。

One thing that I noticed was that whenever I go to the apk file in the ASTRO Market app and click on the apk file and then "Open App Manager", I see that none of the apk file's settings (ie: Name, Size, details) are shown. All the Marketplace apps I have in the folder have visible settings by my apps don't.

我注意到的一件事是,每当我转到 ASTRO Market 应用程序中的 apk 文件并单击 apk 文件,然后单击“打开应用程序管理器”时,我都没有看到 apk 文件的任何设置(即:名称、大小、详细信息) 显示。我在文件夹中的所有 Marketplace 应用程序都具有我的应用程序没有的可见设置。

What might I be doing wrong? Is it something with building the apk file? Or am I uploading it onto my phone incorrectly? Whatever it is, please let me know.

我可能做错了什么?是否与构建 apk 文件有关?还是我把它错误地上传到我的手机上?不管是什么,请告诉我。

回答by stanwise

Go to: Settings->Security->Device Administrationand make sure you have Unknown Sourcesenabled.

转到:Settings->Security->Device Administration并确保您已Unknown Sources启用。

回答by javram

Have you checked your manifest file? What is the required minimum version of Android that you need, and what is the version on the device you are installing it on? Everytime I have run into this problem, it is because the device has less than the minimum required version of the operating system on it.

你检查过你的清单文件吗?您需要的最低 Android 版本是多少,您安装它的设备的版本是多少?每次我遇到这个问题,都是因为设备上的操作系统版本低于最低要求。

回答by Maidul

Home-->Settings-->Application Settings-->Unknown Sources Click Checkbox on

首页-->设置-->应用程序设置-->未知来源点击复选框

回答by ?ukasz Szpyrka

I know it's kinda old topic but it has just happened to me (Android 4.1.1). Solution: If you have wifi turned on, make sure you have internet access. I dealt with this problem and multiply requests to install application appeared.

我知道这是个老话题,但它刚刚发生在我身上(Android 4.1.1)。解决方案:如果您打开了 wifi,请确保您可以访问互联网。我处理了这个问题,并出现了多次安装应用程序的请求。