问题
I updated my Android Studio 2.3 to use NDK 14. Everything works as expected when you use the code (code compiles and the app is running as expected). However, for some reason, when you try to jump to the deceleration of any C++ object/function/variable you get a message that studio (regardless of the code):
Cannot find declaration to go to
Here is a screenshot of what I see:
Edit: I just downgraded back to NDK 13b and the problem was solved. This is a workaround, but without a fix I would not recommend to upgrade yet.
回答1:
We don't know the cause or fix yet, but the bug for this is here: https://code.google.com/p/android/issues/detail?id=231382
回答2:
This issue has been fixed in Android Studio 2.4 Preview 3 using externalNativeBuild.ndkBuild with:
gradle 2.14.1
gradle plugin 2.2.3
NDK r14b (14.1.3816874)
来源:https://stackoverflow.com/questions/42584272/cannot-find-declaration-in-c-code-after-upgrade-to-ndk-14