TKV
TKV

Reputation: 2653

android app deployment issue

i had an android app and the target for the app i selected is Android 4.0.3 API Level 15.

And by connecting an android phone to my machine i copied the apk file from my machine to the phone.

But the problem is the phone that am using for testing the app is on Android version 2.3.6 installed.

I think thats why when am double click on the apk file to install on device it is showing an error like There is a problem parsing the package.

How can it be solved.?

Upvotes: 1

Views: 299

Answers (5)

Squonk
Squonk

Reputation: 48871

Be careful how you do this as obviously many classes have been added to Android between v2.3.x and 4.x. Not only that but even classes which existed for 2.3.x may have had methods and/or constants added to them.

As others have said, simply set your min and target SDK manifest entries but be aware that if you use any classes only available after v2.3.x, you will get runtime exceptions when trying to test.

In general I can see you running into trouble - if you really need the 4.x API then you will never be able to test on the 2.3.6 device and you will have to use an emulator. If, on the other hand, you will only be using classes available in v2.3.x then there is no point in targeting v4.x at all. In that case simply target v2.3.x instead.

Upvotes: 1

Usama Sarwar
Usama Sarwar

Reputation: 9020

App is build for Android 4.0.3 API level 15, You must set minSDKVersion in manifest file of the project. By setting minSDKVersion app will run on all later Android OS versions. For example if you set it to 7, app will run on API Level 7 onwards. Not on 3, 4, 5 or 6.

Upvotes: 0

ElectronAnt
ElectronAnt

Reputation: 2195

In your manifest you'll have to change the minsdkversion to suit the test phone, or else it will not work.

Upvotes: 1

Sandy
Sandy

Reputation: 6353

You need to set minSDK version 2.3, if you want to run APK in your mopbile.

Upvotes: 0

TryTryAgain
TryTryAgain

Reputation: 7820

In your manifest include a minimum SDK version along with your target like this:

<uses-sdk android:minSdkVersion="4" />
<uses-sdk android:targetSdkVersion="15" />

Upvotes: 2

Related Questions