Android Studio - 请根据com.intellij.openapi.project.IndexNotReadyException文档更改调用者

时间:2017-03-07 21:26:38

标签: android android-studio mobile android-gradle

我开始收到此错误,导致我无法构建项目

3:11:08 PM Gradle sync started
3:11:12 PM Gradle sync completed
3:11:13 PM Executing tasks: [:app:generateDebugSources, :app:generateDebugAndroidTestSources, :app:mockableAndroidJar, :app:prepareDebugUnitTestDependencies]
3:12:51 PM Please change caller according to com.intellij.openapi.project.IndexNotReadyException documentation: Please change caller according to com.intellij.openapi.project.IndexNotReadyException documentation
3:12:53 PM Please change caller according to com.intellij.openapi.project.IndexNotReadyException documentation: Please change caller according to com.intellij.openapi.project.IndexNotReadyException documentation
3:12:54 PM Please change caller according to com.intellij.openapi.project.IndexNotReadyException documentation: Please change caller according to com.intellij.openapi.project.IndexNotReadyException documentation
3:12:56 PM Please change caller according to com.intellij.openapi.project.IndexNotReadyException documentation: Please change caller according to com.intellij.openapi.project.IndexNotReadyException documentation
3:13:31 PM Gradle build finished in 2m 19s 29ms

在事件日志中。我已经查看了其他问题...无效缓存/重启没有做任何事情也没有添加

android {
aaptOptions.cruncherEnabled = false
aaptOptions.useNewCruncher = false
}

在我的build.gradle中。 我看了一些其他资源说这个错误可能与坏图像文件有关?我最近添加了一个.png,但我已经尝试关闭AS>删除图片>将其重新添加到drawable>开始AS>干净的项目。但这似乎也无济于事。

如果有人有任何其他想法或解决这个问题之前我会非常感激....这一直让我退出了一段时间。谢谢!

2 个答案:

答案 0 :(得分:1)

我遇到了同样的问题,就像你的情况一样,提到的解决方案都没有。

我的问题是,当我尝试将strings.xml中声明的值与TextView的 android:text 字段关联时,我错过了点击。这次错误点击导致字符串与 android:tools

相关联

结果相同:IndexNotReadyException。

一旦我从xml中删除了android:tools,错误就消失了。最让我困惑的是,我可以在手机上构建和部署应用程序,即使android:工具确实不存在(至少不在TextView环境中)。

我建议任何有此错误的人检查UI的最新更改并仔细检查相关的.xmls。错误并不总是以红色字母突出显示,有时您必须将鼠标悬停在它上面才能显示文本"未知属性:..."出现。

答案 1 :(得分:0)

I had this problem, and the solution was to remove elaviation and shadows from elements.