Android Studio-错误:无法加载类"org.slf4j.LoggerFactory" [英] Android Studio - Error:Unable to load class 'org.slf4j.LoggerFactory'

查看:1319
本文介绍了Android Studio-错误:无法加载类"org.slf4j.LoggerFactory"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是Android世界的新手. 我打开Studio Android 2.2,并在创建新项目后收到以下错误消息:

I'm new in the Android world. I opened studio Android 2.2 and, after creating a new project, I get this error message:

无法同步Gradle项目"..."

错误:无法加载类"org.slf4j.LoggerFactory".可能的原因 对于此意外错误,包括:

  • Gradle的依赖项缓存 可能已损坏(有时会在网络连接后发生 超时.)重新下载依赖项并同步 项目(需要网络)
  • Gradle构建的状态 进程(守护程序)可能已损坏.停止所有Gradle守护程序可能会解决 这个问题.停止Gradle构建过程 (需要重新启动)
  • 您的项目可能正在使用第三方 与项目中其他插件不兼容的插件 或项目要求的Gradle版本.
  • Error:Unable to load class 'org.slf4j.LoggerFactory'. Possible causes for this unexpected error include:

    • Gradle's dependency cache may be corrupt (this sometimes occurs after a network connection timeout.) Re-download dependencies and sync project (requires network)
    • The state of a Gradle build process (daemon) may be corrupt. Stopping all Gradle daemons may solve this problem. Stop Gradle build processes (requires restart)
    • Your project may be using a third-party plugin which is not compatible with the other plugins in the project or the version of Gradle requested by the project.
    • 如何解决该问题? 谢谢

      How can I fix the problem? Thanks

      推荐答案

      转到File-> Settings->展开Build, Execution, Deployment->选择Build Tools-> Gradle->在Project Level Settings下选择Use default gradle wrapper.再次尝试Gradle构建,这对我有用.

      Go to File-> Settings -> Expand Build, Execution, Deployment -> Select Build Tools -> Gradle -> Under Project Level Settings Select Use default gradle wrapper. Try Gradle build again and this worked for me.

      这篇关于Android Studio-错误:无法加载类"org.slf4j.LoggerFactory"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆