Skip to content

Commit 409bc4b

Browse files
Bump NDK and disable compilation error in Android Camera (#1210)
Same NDK version as React-Native 0.71 fixes BabylonJS/BabylonReactNative#566
1 parent 754029e commit 409bc4b

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

Apps/Playground/Android/app/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ android {
4242
applicationId "com.android.babylonnative.playground"
4343
minSdkVersion "${platformVersion}"
4444
targetSdkVersion 28
45-
ndkVersion "21.4.7075529"
45+
ndkVersion "23.1.7779620"
4646
if (project.hasProperty("NDK_VERSION")) {
4747
def NDKVersion = project.property("NDK_VERSION")
4848
ndkVersion "${NDK_VERSION}"

Plugins/NativeCamera/Source/Android/CameraWrappers.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,13 @@
1212
#define __ORIG_ANDROID_API__ __ANDROID_API__
1313
#undef __ANDROID_API__
1414
#define __ANDROID_API__ 24
15+
16+
// __INTRODUCED_IN changed in NDK newer than 21.4.7075529 so that it's impossible just to specify method names.
17+
// auto cameraManager{GET_CAMERA_FUNCTION(ACameraManager_create)()}; will produce an error even if the method is
18+
// not called explicitely.
19+
// A fix is to remove that #define. It's only meant to be done here, in the Android Camera context.
20+
#undef __INTRODUCED_IN
21+
#define __INTRODUCED_IN(x)
1522
namespace API24
1623
{
1724
#include <camera/NdkCameraManager.h>

0 commit comments

Comments
 (0)