How to change package, versionCode, minSdkVersion and targetSdkVersion for Android And Flutter (Set the application ID)
Go Root Path Of Project
Path:- your_project_folder\android\app\build.gradle
android {
defaultConfig {
applicationId "com.example.myapp"
minSdkVersion 15
targetSdkVersion 24
versionCode 1
versionName "1.0"
}
...
}
Flutter minsdkversion deprecated
Step 1
Path:- your_project_folder\android\app\build.gradle
Step 2
The defaultConfig should look like this inside the build.gradle file
Change of minSdkVersion 16 to 23
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.your_package_name_here"
minSdkVersion 23
targetSdkVersion 29
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
}
Cmd:-
flutter clean
Cmd:-
flutter pub get
KeyWord Problem
uses-sdk:minSdkVersion 16 cannot be smaller than version 23 declared in library
// TODO: Specify your own unique Application ID
(https://developer.android.com/studio/build/application-id.html).
C:\Users\Utilisateur\AndroidStudioProjects\xylophone_flutter\android\app\src\debug\AndroidManifest.xml Error:
uses-sdk:minSdkVersion 16 cannot be smaller than version 23 declared in library [:audioplayers] C:\Users\Utilisateur\AndroidStudioProjects\xylophone_flutter\build\audioplayers\intermediates\library_manifest\debug\AndroidManifest.xml as the library might be using APIs not available in 16
Suggestion: use a compatible library with a minSdk of at most 16,
or increase this project's minSdk version to at least 23,
or use tools:overrideLibrary="xyz.luan.audioplayers" to force usage (may lead to runtime failures)
FAILURE: Build failed with an exception.
Post a Comment