I am trying to integrate a flutter module in my android native project with Kotlin language. I am getting errors while following the steps given in the docs .
I have followed the steps mentioned in the docs:
C:\Users\user\AndroidStudioProjects\DataStore> flutter create -t module --org com.example my_flutter
C:\Users\user\AndroidStudioProjects\DataStore> cd my_flutter
C:\Users\user\AndroidStudioProjects\DataStore\my_flutter> flutter build aar
Consuming the Module
OLD WAY: Open \app\build.gradle
NEW WAY: Add repository inside repositories block of dependencyResolutionManagement and pluginManagement blocks in settings.gradle
Ensure you have the repositories configured, otherwise add them:
String storageUrl = System.env.FLUTTER_STORAGE_BASE_URL ?: "https://storage.googleapis.com" repositories { maven { url 'C:\Users\user\AndroidStudioProjects\DataStore\my_flutter\build\host\outputs\repo' } maven { url "$storageUrl/download.flutter.io" } }
dependencies {
debugImplementation 'com.example.my_flutter:flutter_debug:1.0'
profileImplementation 'com.example.my_flutter:flutter_profile:1.0'
releaseImplementation 'com.example.my_flutter:flutter_release:1.0'
}
profile
build type:android {
buildTypes {
profile {
initWith debug
}
}
}
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.