我已经更新了我的android studio。之后,我的Crashlytics产生了问题。 crashlytics是否有问题?或我该如何解决?
这是错误
API 'variant.getExternalNativeBuildTasks()' is obsolete and has been
replaced with 'variant.getExternalNativeBuildProviders()'.
It will be removed at the end of 2019.
For more information, see https://d.android.com/r/tools/task-configuration-
avoidance.
To determine what is calling variant.getExternalNativeBuildTasks(), use -
Pandroid.debug.obsoleteApi=true on the command line to display a stack
trace.
Affected Modules: app
答案 0 :(得分:16)
此问题已在最新版本的Fabric gradle插件1.28.0中得到修复。在您的顶级build.gradle中拥有它:
buildscript {
// ... repositories, etc. ...
dependencies {
// ...other dependencies ...
classpath 'io.fabric.tools:gradle:1.28.0'
}
}
答案 1 :(得分:6)
您可以添加
$ ./dummy
Choose the character you want to use(+, -, *, /, %): %
Enter the first and second number: 5 2
The remainder of 5 and 2 is 1
$
转到android.debug.obsoleteApi=true
文件,它将显示堆栈跟踪,因此您可以确定哪个模块正在使用过时的API
但是,目前这只是警告,而不是错误。每次同步gradle时看到它都是令人讨厌的。 将来,模块将被更新,该警告将消失
希望这会有所帮助:)
答案 2 :(得分:2)
可能现在来晚了,但这对我有帮助:
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
问题出在apply plugin: 'io.fabric'
上
我只需要对此行发表评论,就行了
apply plugin: 'com.android.application'
//apply plugin: 'io.fabric'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
在我将Android Studio更新到3.3.0之后发生。
或者您可以降级到Android Studio 3.2.1。
答案 3 :(得分:2)
这是由Crashlytics所需的Fabric插件引起的。
评论应用插件:'io.fabric'解决了该问题。因此,唯一的选择是等到Google开发人员修复Fabric的插件