android - Android Studio 中的 "Failed to get the compiler information for file ..."

标签 android android-studio android-ndk

我在 Android Studio 中遇到了这个非常奇怪的错误消息。它显示在我通过 Gradle 使用 ndk-build 构建的 native 代码之上。断点和代码单步运行正常,但代码中充斥着“无法解析变量”等“错误”。

这是它的外观示例:

enter image description here

同样,所有代码都可以正确运行,就像 IDE 似乎无法解析一大堆类型一样。您可以在右侧看到一连串的错误。基本上每一行都被标记为错误,即使它们都编译得很好。不知道发生了什么!

最佳答案

我相信执行以下操作可以解决问题:

  1. 手动删除目录build/intermediates/ndkBuild/debug/obj/local

  2. 运行刷新链接的 C++ 项目

关于android - Android Studio 中的 "Failed to get the compiler information for file ...",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40073586/

相关文章:

android - 由: org. codehaus.groovy.control.MultipleCompilationErrorsException引起:启动失败:

java - 从 native 代码调用 Java 代码?

C 代码中的 Android NDK 和外部变量

android - INSTALL_FAILED_UPDATE_INCOMPATIBLE 当使用与以前相同的调试 keystore 时

android-studio - Android Studio gradle bintray 上传失败 : Could not sign version

android - 在对话崩溃时设置按钮

android - 无效的资源目录名称,drawable-anydpi-v21

android - 不支持的 OpenGL 函数和常量

android - 摧毁尸体时崩溃

android - 在当前主题中找不到样式...