Error:FAILURE: Build failed with an exception. * What went wrong: Task 'generate_360DebugSources' n

来源:互联网 发布:网络配置出现问题 编辑:程序博客网 时间:2024/05/20 00:16

把一个用了几年的笔记本的硬盘换成了固态硬盘,然后又装了2.3.1版的Android Studio。但是在导入项目的时候却报错了,错误如下:

Error:FAILURE: Build failed with an exception.

* What went wrong:
Task 'generate_360DebugSources' not found in root project 'higirl'.

* Try:
Run gradle tasks to get a list of available tasks. Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

。看到这个错误的时候一头雾水,经过谷歌之后,在stack overflow上看到了一些解决方案。

 This happened to me recently when I close one Android Studio project and imported another Eclipse project. It seemed to be some bug in Android Studio where it preserves some gradle settings from previously open project and then get confused in the new project.

 The solution was extremely simple: Close the project and shut down Android Studio completely, before re-opening it and then import/open the new project. Everything goes smoothly from then on.

第二段话是怎样解决问题的:解决的方法十分简单,关闭项目然后关闭Android Studio,然后再重新import/open

一个新的项目就好了,然后就没有问题了。经过测试方法可行。

刚开始用Android Studio的时候新建一个项目会报错,怎么解决呢,其实关闭Android Studio再次打开或者新建一个项目就没有问题了。


0 0
原创粉丝点击