由于 APK 文件无效,Eclipse 安装失败? [英] Eclipse installation failed due to invalid APK file?

查看:33
本文介绍了由于 APK 文件无效,Eclipse 安装失败?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用 Eclipse 开发 Android 应用程序,但在运行项目时看到此错误:

I use Eclipse for develop android apps, but when run projects see this error:

由于 APK 文件无效,安装失败!

推荐答案

我们看到无效 APK 文件"错误的最常见原因之一是由于无意中更改了 AndroidManifest.xml 配置,导致在您的设备上安装重复的 APK 文件.

One of the most common reasons we see "Invalid APK file" error is due to inadvertently changed AndroidManifest.xml configuration, which results in installing duplicated APK files on your device.

可能性 1:版本问题.提高您的最低和目标 sdk 版本,然后重试.

Posibility 1: version problem. Make your minimum and target sdk version higher and try again.

可能性 2:包不匹配.AndroidManifest.xml 中的包名称与您的活动关联的实际包不匹配.

Posibility 2: package mistmatching. Package name in AndroidManifest.xml does not match with the actual package that your activity is associated with.

解决这个问题的三个步骤:

Three steps to solve this problem:

第 1 步:检查 AndroidManifest.xml 中的头文件.

Step 1. Check your header file from your AndroidManifest.xml.

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.yourdomain.yourapp"
    android:versionCode="1"
    android:versionName="1.0" >

第 2 步.确认您在 src 文件夹中的包名称与您在第 1 步中验证的完全相同.

Step 2. Confirm that your package name in your src folder is exactly the same as the one you verified in Step 1.

例如com.yourdomain.yourapp

第 3 步.检查您的启动器活动中的包包含声明(例如 MainActivity.java):

Step 3. Check your package inclustion statement from your launcher activity (e.g. MainActivity.java):

package com.yourdomain.yourapp;

如果上述解决方案不起作用,请发布您的 Logcat 以获得进一步的帮助.

If the aforementioned solutions are not working, please post your Logcat for further assist.

这篇关于由于 APK 文件无效,Eclipse 安装失败?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆