在Flutter应用中添加Firebase分析时出错

时间:2019-06-14 23:12:11

标签: firebase flutter firebase-analytics

在pubsec.yaml文件中添加firebase_analytics后得到此错误。

int months = 60;
float principle = 10000;
float rate = 6.5f/100;
float monthly_factor = 1 + rate / 12;

float temp = 1, temp2= monthly_factor;
for(int i = 0;i < months - 1; i++){ //this for loop calculates the geometric sum with ratio of monthly_factor in temp and pow(monthly_factor,n) in temp2
    temp *= monthly_factor;
    temp2 *= monthly_factor;
    temp += 1;    
}

float monthly_payment = principle * temp2 / temp;

这些是pubsec.yaml中的依赖项

FAILURE: Build failed with an exception.

* What went wrong:
Could not determine the dependencies of task ':firebase_core:compileDebugAidl'.
> The library com.google.android.gms:play-services-measurement-base is being requested by various other libraries at [[16.5.0,16.5.0]], but resolves to 16.0.3. Disable the plugin and check your dependencies tree using ./gradlew :app:dependencies.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 5s
Finished with error: Gradle task assembleDebug failed with exit code 1

谢谢

1 个答案:

答案 0 :(得分:0)

我无法复制您目前报告的行为。通过检查评论,看来问题已解决。运行flutter clean还应该解决依赖项缓存中引起的大多数冲突。

相关问题