Fixed
Status Update
Comments
en...@google.com <en...@google.com> #2
yeah, looks like this was added by frameworks/base/ change 2738c96d998dedfae5b4670d588d0cd299c4ca0f in time for M (API level 23), judging by the internal https://android-build.googleplex.com/builds/where-is-my-cl/search/2738c96d998dedfae5b4670d588d0cd299c4ca0f results.
unfortunately i think the use of `version_script:` in the relevant Android.bp means this symbol actually *is* unavailable on the device in Q. so i fear we've reset the clock here and will probably need to declare this as introduced in R. +ndk-team.
unfortunately i think the use of `version_script:` in the relevant Android.bp means this symbol actually *is* unavailable on the device in Q. so i fear we've reset the clock here and will probably need to declare this as introduced in R. +ndk-team.
en...@google.com <en...@google.com> #3
fixed for NDK r22, albeit not in a way that makes anyone happy...
mu...@gmail.com <mu...@gmail.com> #4
Thanks!
Description
```
diff --git a/native-activity/app/src/main/cpp/main.cpp b/native-activity/app/src/main/cpp/main.cpp
index 9525548..3a45ba7 100644
--- a/native-activity/app/src/main/cpp/main.cpp
+++ b/native-activity/app/src/main/cpp/main.cpp
@@ -28,6 +28,7 @@
#include <GLES/gl.h>
#include <android/sensor.h>
+#include <android/configuration.h>
#include <android/log.h>
#include <android_native_app_glue.h>
@@ -308,6 +309,11 @@ ASensorManager* AcquireASensorManagerInstance(android_app* app) {
void android_main(struct android_app* state) {
struct engine engine;
+ // Fails to link
+ AConfiguration_getScreenRound(state->config);
+ // Works
+ AConfiguration_getScreenLong(state->config);
+
memset(&engine, 0, sizeof(engine));
state->userData = &engine;
state->onAppCmd = engine_handle_cmd;
```
The app fails to compile with the error: `undefined reference to 'AConfiguration_getScreenRound'`.
Looking at the symbols of libandroid.so (and every other lib*.so) only these are defined:
```
❯ nm -g toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/lib/x86_64-linux-android/29/libandroid.so | grep getScreen
0000000000005260 T AConfiguration_getScreenHeightDp
0000000000005270 T AConfiguration_getScreenLong
0000000000005280 T AConfiguration_getScreenSize
0000000000005290 T AConfiguration_getScreenWidthDp
```