I’m a little confused about something.
I wrote an app and tested it on an LG Ally with the following specs:
Android version: 2.2.2
Kernel version: 2.6.32.9
Build number: FRG83G
Now I’m trying to install it (via adb install AppName.apk) on an HTC with the following specs:
Android version: 2.3.3
Kernel version: 2.6.35.10-gc0a661b HTC-kernel@and 18-2#1
Build number: 4.24.651.1 CL61076
and I get an error like ‘error parsing package’
Here’s where I get confused. I wanted to try duplicate the problem. So I created an emulator AVD with the specs:
Android version: 4.0.3
Kernel version: 2.6.29-g46b05b2 vchtchetkine@vc-irv #28
Build number: google_sdk-eng 4.0.4 MR1 302030 test-keys
And….I am able to install my app successfully with the adb install command that will NOT install the app on the HTC.
I don’t understand why I’m able to use ‘adb install’ to put it on the LG Ally and the emulator but I get the parse error on the HTC.
I thought I might need in the AndroidManifest but then why am I able to install on the emulator without it?
My manifest is below (I removed the activity definitions for brevity):
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.mj.molepatrol"
android:versionCode="1"
android:versionName="1.0">
<application android:icon="@drawable/icon" android:label="@string/app_name">
<uses-library android:name="com.google.android.maps" />
</application>
<uses-permission
android:name="android.permission.READ_CALENDAR">
</uses-permission>
<uses-permission
android:name="android.permission.WRITE_CALENDAR">
</uses-permission>
<uses-permission
android:name="android.permission.EDIT_CALENDAR">
</uses-permission>
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
</manifest>
The possible problem for this is that you are using a feature that is not available to the device. Such as a camera or NFC.
You have only set
minSdkVersionandtargetSdkVersionright?There will be something in the manifest that the htc doesn’t like, please post your AndroidManifest.xml file so we can see specifics and figure it out for you