【发布时间】:2019-11-16 06:42:08
【问题描述】:
我正在尝试添加 Flutter 的应用购买包。它首先创建了 AndroidX 迁移问题。然后在迁移后我又遇到了一个我不知道要解决的错误。
我什至没有为应用内购买编写任何代码。就在添加到 pubspec.yaml 之后,它会导致问题。
错误
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:preDebugBuild'.
> Android dependency 'androidx.localbroadcastmanager:localbroadcastmanager' has different version for the compile (1.0.0-rc01) and runtime (1.0.0) classpath. You should manually set the same version via DependencyResolution
*******************************************************************************************
The Gradle failure may have been because of AndroidX incompatibilities in this Flutter app.
See goo.gl/CP92wY for more information on the problem and how to fix it.
*******************************************************************************************
Gradle task assembleDebug failed with exit code 1
pubspec.yaml 依赖项
dependencies:
flutter:
sdk: flutter
http:
cloud_firestore:
intl: ^0.15.8
firebase_admob:
firebase_core:
firebase_auth:
firebase_database:
cupertino_icons: ^0.1.2
shared_preferences: 0.5.3+1
emoji_picker:
google_sign_in: ^4.0.1+1
flutter_facebook_login:
firebase_messaging:
image_picker_modern: ^0.4.12+2
firebase_storage:
font_awesome_flutter: ^8.0.1
in_app_purchase: 0.1.0+1
Gradle.properties
org.gradle.jvmargs=-Xmx1536M
android.useAndroidX=true
android.enableJetifier=true
【问题讨论】:
标签: android flutter in-app-purchase androidx