0

I'm currently on Android 4.1 for the Project Build Target. My issue is that I have two HTC One V's to develop with. These run 4.0 at the moment.

I figure I have 1 of 2 options. Either:

*Set the build target to Android 2.2 (the only other Android one available - why such a jump?). However, this causes a lot of red underlined error in my current code. And Wi-Fi direct requires 4.0 as the minimum.

*Upgrade the HTC One V to 4.1. Is this possible and would there be any drawback to doing this?

Which is the preferable option and why?

UPDATE:

Okay, so a quick search reveals that the One V cannot be upgraded past 4.0:

http://www.theinquirer.net/inquirer/news/2224379/htc-one-v-wont-get-android-41-jelly-bean

Bummer. Now I don't know what to do.

Chucky
  • 1,701
  • 7
  • 28
  • 62
  • If you use Wifi Direct the minimum target has to be 4.0 and so you can downgrade to it. And it run fine on 4.1 – Guillaume Jan 02 '13 at 21:25
  • Option 1 will definitely not work, as that will actually prevent you from using any new features that were introduced since Android 2.2, including WiFi Direct. However, I'm curious as to why you think your issue is an issue? [WiFi Direct](http://developer.android.com/guide/topics/connectivity/wifip2p.html) was introduced in Android 4.0, so it'll work fine on your HTC devices and you shouldn't have any problems when building against Android 4.1, as the build target does not affect the `minSdkVersion` you set in the project's manifest (or vice versa). – MH. Jan 02 '13 at 21:27
  • It's just when I plug my One V in, it won't appear in the deployable devices when I try to run the app on it for USB debugging. The prompt clearly states, "Select a device compatible with target Android 4.1." – Chucky Jan 02 '13 at 21:29

1 Answers1

0

Ah. I see now what the problem was. Despite setting the min SDK and target SDK in the manifest, the build target still needs to be set in the project properties. I was confused as to why I only had 2.2 and 4.1 available. Now I realise more can be downloaded from the Android SDK Manager. This means I was able to download 4.0 and set that as the build target. My app can now be put on the HTC One V.

I suppose I originally only installed 2.2 and 4.1 because the android docs recommended I do only the earliest and latest recommended. Anyway, lesson learned!

Chucky
  • 1,701
  • 7
  • 28
  • 62