4
votes

I just installed a new Worklight 6.1 environment (Studio). I got a brand new Eclipse 4.3.1 and installed Worklight 6.1 plugin on top of that. Then I downloaded Android SDK and Tools. When I created my first sample project and added Android environment, automatically the tool set the Android target SDK to 19, which I actually I don't have installed, so I got an error.

I then changed the following line in AndroidManifest.xml to my desired target SDK:

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

but building Android environment, I receive following message:

It is recommended that your Android application will target the same API level used to build the android project. The API level used to compile the project is specified as the Project Build Target in Project / Properties / Android dialog. Configure your application to target the same API level by setting the same value in android:targetSdkVersion attribute in AndroidManifest.xml.

So it seems that changing the target SDK in AndroidManifest.xml is not enough, but I can't find this : Project Build Target in Project / Properties / Android dialog.

Any advice is most welcome.

Giovanni

2

2 Answers

3
votes

The Project Build target you are referring to appears in the properties of the Android project and not the Worklight project.

enter image description here

0
votes

Alternative, you may update in the main project
apps/appName/android/native/project.properties.
You'll also need to take care of AndroidManifest.xml.

project.properties has this contradictory notice (as pointed out by this question), but it is safe to edit it.

# This file is automatically generated by Android Tools.
# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
# 
# This file must be checked in Version Control Systems.