首页 > 解决方案 > 无法解析符号“MoEInitializer”

问题描述

我正在尝试在我的颤振应用程序上安装 MoEngage SDK。我需要根据文档将本机代码添加到我的项目中。我在 SampleApplication.java 文件中收到此导入错误

这是错误

我已经添加了依赖项


dependencies {
    implementation "com.android.support:support-v4:25.3.1"
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'com.android.support.test:runner:1.0.2'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation "androidx.core:core:1.3.1"
    implementation "androidx.appcompat:appcompat:1.2.0"
    implementation "androidx.lifecycle:lifecycle-process:2.2.0"
    implementation "com.moengage:moe-android-sdk:10.6.00"
    implementation 'com.google.firebase:firebase-messaging:21.0.1'
}


标签: androidfluttergradlemoengage

解决方案


您需要在颤振pubspec.yaml文件中添加依赖项

dependencies:
    moengage_flutter: $lastestVersion

也别忘了跑flutter pub get

正如文件所说here


推荐阅读