You can create an app in AppGallery Connect. Then AppGallery Connect will automatically generate basic configuration information for it.
Create a Flutter project in Android Studio. The package name of the created app must be the same as that entered in AppGallery Connect.
Open Android Studio, and go to File >New > New Flutter Project to create a Flutter project.
buildscript {
repositories {
google()
jcenter()
// Check that you have the following line (if not, add it)
maven { url 'https://developer.huawei.com/repo/' } // HUAWEI Maven repository
}
dependencies {
classpath 'com.android.tools.build:gradle:3.5.3'
// Add the following line
classpath 'com.huawei.agconnect:agcp:1.5.0.300' // HUAWEI agcp plugin
}
}
allprojects {
repositories {
google()
jcenter()
// Check that you have the following line (if not, add it):
maven { url 'https://developer.huawei.com/repo/' } // HUAWEI Maven repository
}
}
Add the following information to the line following apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle":
apply plugin: 'com.android.application'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
// Make sure that the following line is added.
apply plugin: 'com.huawei.agconnect'