Eclipse installation failed due to invalid APK file?

前端 未结 10 1902
半阙折子戏
半阙折子戏 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条回答
  • 2020-12-15 11:52

    Totally agree with @melvkim answer. One thing to add.

    Also please make sure that you do not use forbidden characters in your package name. E.g.:

    Wrong package names

    • com.domain.365days - you cant start any part of package name with a digit (...)
    • com.domain._365days - (...) nor a special character

    Correct package names

    • com.domain.days365 - start all parts of your package name with a letter

    Please see your logcat very carefully. Eclipse IDE might not show any error or warning, but logcat will.

    0 讨论(0)
  • 2020-12-15 11:54

    For me it was a different problem causing this error:

    My project was using some native JNI libraries embedded to the APK. To save some space during tests, I disabled the lib\armeabi version, leaving only the newer lib\armeabi-v7a variant. All went fine on newer devices, but testing it on the older G1 resulted in this error.

    0 讨论(0)
  • 2020-12-15 11:55

    Check your Platform version on Phone or Emulator (depend where you're testing ) must be same or greater then the version you mentioned in your AndroidManifest.xml.

    0 讨论(0)
  • 2020-12-15 12:03

    In my case, the issue was due to mis-match in the Android manifest file and Project Build Target API Level

    I changed from targetSdkVersion from 19 to 21.

    Also, by changing the target sdk version through the stepsgiven below

    1. right click on project name
    2. select properties
    3. change "Project Build Target" to API Level 21
    0 讨论(0)
提交回复
热议问题