【问题标题】:android error while compiling com.android.support:support-v4:24.0.0编译 com.android.support:support-v4:24.0.0 时出现 android 错误
【发布时间】:2017-10-05 11:30:48
【问题描述】:

目前,我的 android compileSdkVersion 设置为 24,在我的依赖项中,我已包含 compile 'com.android.support:support-v4:24.0.0'

但是,当我尝试构建时,出现以下错误:

java.lang.IncompatibleClassChangeError: The method 'java.io.File android.support.v4.content.ContextCompat.getNoBackupFilesDir(android.content.Context)' was expected to be of type virtual but instead was found to be of type direct

有谁知道如何解决这个问题?

【问题讨论】:

  • 你在使用这个时是否连接到互联网?
  • @VinayJaju 是的!

标签: java android


【解决方案1】:

这是因为您的依赖项中存在兼容性问题。您的支持库与其他库不兼容,例如 Firebase/Google Play 服务。

【讨论】:

  • 您建议如何从您的依赖项中更新 Firebase/Google play 服务。我目前有compile ('com.google.android.gms:play-services-gcm:8.1.0') { force = true; }
  • 恭喜!
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2019-05-10
  • 1970-01-01
  • 1970-01-01
  • 2021-02-28
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多