[轉]Ubuntu下安装配置JDK

Ubuntu下安装配置JDK

Read more

"install_failed_invalid_apk" error in android development

I just set out for Android development and I found I'm always getting this error "INSTALL_FAILED_INVALID_APK" when debuging the apk on device.

The Fatal Keypoint: Package name started with underscore character.

Solve: Rename the Package.

 

Explanation:

A Package cannot start with numbers. A Project that starts with numbers as it's initials, for example: 01Test, the Package name will be renamed with an underscore('_') character ----> Package name: com.example._01Test

However, Android cannot parse the package name starting with underscores, so it becomes an invalid apk.

 

問題的萌點:Android包名不能以下劃綫為首字母。

解決方式:重命名。

解釋:例如如果工程名是01Test, 包名由於不能以數字起始,所以加了一個下劃綫 ----> 包名:com.example._01Test。然而Android不能解析這樣的包名,所以就變成了invalid apk了。