Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

React Native error Unable to extract native debug metadata

I'm using react-native v0.65.1 and received a lot of errors when generating apk

> Task :app:extractReleaseNativeSymbolTables

Unable to extract native debug metadata from D:\REACT NATIVE\test-app\test\android\app\build\intermediates\merged_native_libs\release\out\lib\arm64-v8a\libbetter.so because unable to locate the objcopy executable for the arm64-v8a ABI.
Unable to extract native debug metadata from D:\REACT NATIVE\test-app\test\android\app\build\intermediates\merged_native_libs\release\out\lib\arm64-v8a\libc++_shared.so because unable to locate the objcopy executable for the arm64-v8a ABI.
Unable to extract native debug metadata from D:\REACT NATIVE\test-app\test\android\app\build\intermediates\merged_native_libs\release\out\lib\arm64-v8a\libfabricjni.so because unable to locate the objcopy executable for the arm64-v8a ABI.
Unable to extract native debug metadata from D:\REACT NATIVE\test-app\test\android\app\build\intermediates\merged_native_libs\release\out\lib\arm64-v8a\libfb.so because unable to locate the objcopy executable for the arm64-v8a ABI.
Unable to extract native debug metadata from D:\REACT NATIVE\test-app\test\android\app\build\intermediates\merged_native_libs\release\out\lib\arm64-v8a\libfbjni.so because unable to locate the objcopy executable for the arm64-v8a ABI.
Unable to extract native debug metadata from D:\REACT NATIVE\test-app\test\android\app\build\intermediates\merged_native_libs\release\out\lib\arm64-v8a\libfolly_futures.so because unable to locate the objcopy executable for the arm64-v8a ABI.
Unable to extract native debug metadata from D:\REACT NATIVE\test-app\test\android\app\build\intermediates\merged_native_libs\release\out\lib\arm64-v8a\libfolly_json.so because unable to locate the objcopy executable for the arm64-v8a ABI.
Unable to extract native debug metadata from D:\REACT NATIVE\test-app\test\android\app\build\intermediates\merged_native_libs\release\out\lib\arm64-v8a\libglog.so because unable to locate the objcopy executable for the arm64-v8a ABI.
Unable to extract native debug metadata from D:\REACT NATIVE\test-app\test\android\app\build\intermediates\merged_native_libs\release\out\lib\arm64-v8a\libglog_init.so because unable to locate the objcopy executable for the arm64-v8a ABI.
Unable to extract native debug metadata from D:\REACT NATIVE\test-app\test\android\app\build\intermediates\merged_native_libs\release\out\lib\arm64-v8a\libhermes-executor-common-debug.so because unable to locate the objcopy executable for the arm64-v8a ABI.

It is very long but I shorten it as it is all about arm64-v8a ABI. When I installed the generated APK and opened it, it was closing instantly. Have no idea what's going on as the development didn't have any error.

Been researching for 2 days now but still I cannot find anything that can solve this issue. Looking forward to your help. Thank you!

like image 750
Eaten Taik Avatar asked Jul 21 '26 09:07

Eaten Taik


1 Answers

Had this problem myself, and eventually figured out it was because I didn't hook up the "NDK" correctly.

Steps taken to fix it:

  1. Android Studio > Tools > SDK Manager > SDK Tools > Select and install "NDK (Side by side)" This may not be necessary if there is already a version of NDK installed locally. Usually in ~/Android/Sdk/ndk/<versionNumber>/
  2. In the project, within the file /android/build.gradle, set ndkVersion to the right version:
    buildscript {
        ext {
            // ...
            ndkVersion = "24.0.8215888"
         }
    }
    
like image 192
rkok Avatar answered Jul 24 '26 13:07

rkok