0

In the old version, we could change it via android/app/build.gradle. Now it gives an error when we change it.

defaultConfig {
        applicationId "com.example.manuel"
        minSdkVersion flutter.minSdkVersion
        targetSdkVersion flutter.targetSdkVersion
        versionCode flutterVersionCode.toInteger()
        versionName flutterVersionName
    }

There are those who fix this problem via local.properties, but this method does not work either.

sdk.dir=C:/Users/user/AppData/Local/Android/Sdk
flutter.sdk=C:\\src\\flutter
flutter.buildMode=debug
flutter.versionName=1.0.0
flutter.versionCode=1
1

1 Answer 1

1

you need to edit the build.gradle file in the new version as well. As follows;

defaultConfig {
    // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
   applicationId "com.example.manuel"
    minSdkVersion 16 // <--- There minSdkVersion Content
    targetSdkVersion 27 <--- There targetSdkVersion (is actually Max Sdk Version) Content
    versionCode 1
    versionName "1.0"
    testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}

then rebuild the project and build it again.

I hope that will be useful.

Sign up to request clarification or add additional context in comments.

1 Comment

yes it works dostum, i hope they fix the problem in the next update.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.