Reputation: 568
I want to release appBundle with 'flutter build appbundle' but I have this error. This project has already been migrated to AndroidX. There are not used third-party libraries
compileSdkVersion: 28
targetSdkVersion: 28
minSdkVersion: 16
buildTypes {
release {
signingConfig signingConfigs.release
minifyEnabled true
useProguard true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
dependencies {
implementation 'com.android.support:support-fragment:28.0.0'
}
}
}
dependencies:
dependencies {
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.2.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
}
in gradle.properties
android.useAndroidX=true
android.enableJetifier=true
Upvotes: 1
Views: 243
Reputation: 3306
The fix is live on the beta channel, in release v1.7.8+hotfix.2
Upvotes: 0
Reputation: 568
I've solved my question:
dependencies of implementing support-fragment should be deleted, because I followed this answer: https://github.com/flutter/flutter/issues/28979#issuecomment-476426976
change minifyEnabled to false
and then I used:
flutter clean
flutter packages get
flutter build appbundle
Upvotes: 1
Reputation: 1
In the file android/gradle/wrapper/gradle-wrapper.properties check the distributionUrl must be:
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.2-all.zip
On the file android/build.gradle, change:
dependencies {
classpath 'com.android.tools.build:gradle:3.2.1'
to:
dependencies {
classpath 'com.android.tools.build:gradle:3.3.0'
On the file android/app/build.gradle, replace the line:
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
to:
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
Upvotes: 0