Bismillaahirrohmaanirrohiim…
Saat ingin mencoba atau menjalankan flutter ke HP Android, adakalanya konfigurasi plugin kita membutuhkan minSdkVersion yang lebih tinggi.
Jadi perlu kita siapkan cara mengedit minSdkVersion di flutter.
Pertama, buka file di “android/app/build.gradle“, isikan seperti berikut:
defaultConfig { // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). applicationId "com.example.namaapp" minSdkVersion localProperties.getProperty('flutter.minSdkVersion').toInteger() targetSdkVersion localProperties.getProperty('flutter.targetSdkVersion').toInteger() //minSdkVersion flutter.minSdkVersion //targetSdkVersion flutter.targetSdkVersion versionCode flutterVersionCode.toInteger() versionName flutterVersionName }
Kedua, buka file “android/local.properties“, pastikan sudah diset seperti ini:
sdk.dir=C:\\Users\\Thinkpad-E480\\AppData\\Local\\Android\\sdk flutter.sdk=C:\\flutter\\flutter flutter.buildMode=debug flutter.versionName=1.0.0 flutter.versionCode=1 flutter.minSdkVersion=21 flutter.targetSdkVersion=30 flutter.compileSdkVersion=30
Kemudian simpan dan jalankan kembali build appnya, semoga berjalan sukses ya…
Terimakasih