Я пытаюсь импортировать два модуля флаттера в файл android build.gradle, как показано ниже:
apply plugin: 'com.android.application'
android {
compileSdkVersion 29
buildToolsVersion "29.0.2"
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
defaultConfig {
applicationId "com.techy.nateshmbhat.sampleapp"
minSdkVersion 17
targetSdkVersion 29
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
repositories {
maven {
url '/Users/nateshmbhat/Desktop/flutter-android-bridge/flutter_module/build/host/outputs/repo'
}
maven{
url '/Users/nateshmbhat/Desktop/flutter-android-bridge/flutter_module2/build/host/outputs/repo'
}
maven {
url 'http://download.flutter.io'
}
}
buildTypes {
}
}
dependencies {
debugImplementation 'com.techy.nateshmbhat.flutter_module:flutter_debug:1.0'
debugImplementation 'com.example.flutter_module2:flutter_debug:1.0'
}
Но во время сборки Gradle я получаю следующую ошибку:
Duplicate class io.flutter.plugins.GeneratedPluginRegistrant found in modules flutter_debug-1.0-runtime.jar (com.example.flutter_module2:flutter_debug:1.0) and flutter_debug-1.0-runtime.jar (com.techy.nateshmbhat.flutter_module:flutter_debug:1.0)
Как мне исправить эту проблему с дублированием? Есть ли способ исключить конфликтующий класс из самого процесса сборки флаттера, чтобы он не включал sh при включении?