Eclipse installation failed due to invalid APK file?

前端 未结 10 1982
半阙折子戏
半阙折子戏 2020-12-15 11:29

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

Installation failed due to invalid APK file!

10条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-15 11:52

    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.

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

    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:

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

    
    

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

    e.g. com.yourdomain.yourapp

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

    package com.yourdomain.yourapp;
    

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

提交回复
热议问题