9

AndroidManifest.xml file gives warnings -

Attribute hardwareAccelerated is only used in API level 11 and higher(current min is 1)
Attribute windowSoftInputMode is only used in API level 3 and higher(current min is 1)

And

Should set android:versionCode to specify the application version
Should set android:versionName to specify the application version

Also

App is not indexable by Google Search;

While the app/build.gradle file reads -

compileSdkVersion 28
minSdkVersion 16
targetSdkVersion 28
versionCode flutterVersionCode.toInteger() // 1
versionName flutterVersionName // '1.0'

The warnings started occurring recently without any new upgrades. My older flutter projects never encountered these warnings and are still working fine.

Things I've tried:

  1. File > Invalidate Caches / Restart.... > Invalidate And Restart
  2. Just Restart
  3. Create a different project from start

What resolves the warnings:

<uses-sdk android:minSdkVersion="16"
 android:targetSdkVersion="28" />

Using the <uses-sdk.../> in AndroidManifest.xml resolves the warning(current min is 1) but hence invalidating the use of app/build.gradle file. Any suggestions please?

I'm working on Android Studio 3.2.1

Chaitanya
  • 719
  • 9
  • 23

1 Answers1

1

this works for me

use these commands to clean and fix plugins.

$ flutter clean
$ flutter pub cache repair

app/build.gradle :

android {
    namespace 'com.akbon.app' / add your package name
    compileSdk 33
    ndkVersion flutter.ndkVersion
    defaultConfig {
        applicationId "com.akbon.app" / add your package name
        minSdkVersion 21
        targetSdkVersion 33
        versionCode flutterVersionCode.toInteger()
        versionName flutterVersionName
    }
// 

AndroidManifest.xml :

<application
    android:name="${applicationName}"
    tools:targetApi="33" 
//
AKBON
  • 11
  • 4