Closed j3g closed 5 years ago
my apologies that bug report is kind of messy. basically when I add this flutter-permission-handlers library I get multi dex issues. I am new to flutter so I am using default (flutter generated) settings for gradle files. I tried 'flutter clean'. I tried "multiDexEnabled true" in build.gradle. I continue to troubleshoot. Some tips say it might be related to AndroidX, but again I'm using all default flutter build configs so I don't know why that would be the cause.
after adding defaultConfig { multiDexEnabled true } to build.properties I was receiving a different error: ':app:transformClassesWithMultidexlistForDebug', so I researched that. there are several multi dex issues open/closed: https://github.com/flutter/flutter/issues/23929 https://github.com/flutter/flutter/issues/23131
FIXED I added to location_permissions build.gradle
android {
defaultConfig {
multiDexEnabled true
}
I added to gradle.properties
android.useAndroidX=true
android.enableJetifier=true
Thanks for the fix! I have merged your pull-request and will release a new version shortly
🐛 Bug Report
Launching lib/main.dart on Android SDK built for x86 in debug mode... Initializing gradle... Resolving dependencies... Running Gradle task 'assembleDebug'... D8: Program type already present: android.support.v4.os.ResultReceiver$MyResultReceiver
FAILURE: Build failed with an exception.
What went wrong: Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug'.
Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
Get more help at https://help.gradle.org
BUILD FAILED in 10s
The Gradle failure may have been because of AndroidX incompatibilities in this Flutter app. See https://goo.gl/CP92wY for more information on the problem and how to fix it.
Finished with error: Gradle task assembleDebug failed with exit code 1
Expected behavior
Reproduction steps
after adding location_permissions library I receive an error in the android build process
Configuration
environment: sdk: ">=2.1.0 <3.0.0"
dependencies: flutter: sdk: flutter
cupertino_icons: ^0.1.2 numberpicker: ^1.0.0 google_maps_flutter: ^0.5.5 location_permissions: ^1.0.2
dev_dependencies: flutter_test: sdk: flutter
Version: 1.x
Platform: