Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where to change minSdkVersion setting in PhoneGap app

I'm having a strange issue when trying to build a basic PhoneGap app on OS X. The app is setup with just the Android platform. I'm getting the following error when I enter "PhoneGap build".

:processDebugManifest
/Volumes/Data/Tests/my-app/platforms/android/AndroidManifest.xml:15:5 Error:

uses-sdk:minSdkVersion 7 cannot be smaller than version 10 declared in library /Volumes/Data/Tests/my-app/platforms/android/build/intermediates/exploded-aar/android/CordovaLib/unspecified/debug/AndroidManifest.xml
Suggestion: use tools:overrideLibrary="org.apache.cordova" to force usage

When I then edit the indicated file and set the line to

<uses-sdk android:minSdkVersion=“10” android:targetSdkVersion="22" />

and build again, the error doesn't change. Does this setting exist somewhere else? Or is there something else going on here?

like image 370
Jason Avatar asked Apr 30 '15 22:04

Jason


People also ask

Where can I change minSdkVersion?

To change Android minSdkVersion in Flutter for the project created after the 2.8 update, you have to make changes in the local. properties file and then reference the new variable from the local. properties file inside the build. gradle file.

How do I check minSdkVersion?

Go to: File > Project Structure , then under modules choose your module (that probably will be app , then under the tab flavors you can see minimum sdk and target sdk.

What is the value of flutter minSdkVersion?

android:minSdkVersion — Specifies the minimum API Level on which the application is able to run. The default value is "1".


1 Answers

The AndroidManifest.xml file is overwritten during the build process by the values from config.xml. You should define this properties in the config.xml file.

Reference: http://docs.build.phonegap.com/en_US/3.3.0/configuring_preferences.md.html#Preferences

<preference name="android-minSdkVersion" value="10" />
like image 138
mrak Avatar answered Oct 24 '22 22:10

mrak