react-native-template-new-architecture icon indicating copy to clipboard operation
react-native-template-new-architecture copied to clipboard

Match Ubuntu NDK (21) to aarch64/M1 (25 rc2)

Open leotm opened this issue 3 years ago โ€ข 0 comments

NDK 23 found (last 2 commits)

/usr/local/lib/android/sdk/ndk: 21.4.7075529, 22.1.7171670, 23.1.7779620


NDK 25 rc2 downloaded, not found

> Configure project :app
Observed package id 'ndk;21.4.7075529' in inconsistent location '/usr/local/lib/android/sdk/ndk-bundle' (Expected '/usr/local/lib/android/sdk/ndk/21.4.7075529')
Warning: Observed package id 'ndk;21.4.7075529' in inconsistent location '/usr/local/lib/android/sdk/ndk-bundle' (Expected '/usr/local/lib/android/sdk/ndk/21.4.7075529')
Warning: Observed package id 'ndk;21.4.7075529' in inconsistent location '/usr/local/lib/android/sdk/ndk-bundle' (Expected '/usr/local/lib/android/sdk/ndk/21.4.7075529')

Warning: IO exception while downloading manifest:

Ubuntu defaulting

  • ANDROID_NDK_HOME: /usr/local/lib/android/sdk/ndk-bundle -> /usr/local/lib/android/sdk/ndk/21.4.7075529
  • ANDROID_NDK_ROOT: /usr/local/lib/android/sdk/ndk-bundle -> /usr/local/lib/android/sdk/ndk/21.4.7075529

Solutions

  • rm -rf /usr/local/lib/android/sdk/ndk-bundle - prevent side-by-side 21 detection
  • w/o ANDROID_NDK_HOME: ${{ steps.setup-ndk.outputs.ndk-path }}, likely fail to find /usr/local/lib/android/sdk/ndk/25.x.x
  • ANDROID_NDK_HOME: ${{ steps.setup-ndk.outputs.ndk-path }} should work
  • cp -rf ${{ steps.setup-ndk.outputs.ndk-path }} /usr/local/lib/android/sdk/ndk/25.x.x - should work too
  • cp -rf ${{ steps.setup-ndk.outputs.ndk-path }} /usr/local/lib/android/sdk/ndk-bundle - should work too

Spotted in https://github.com/leotm/react-native-template-new-architecture/runs/6261011482?check_suite_focus=true#step:7:62

Missed in https://github.com/leotm/react-native-template-new-architecture/pull/276

Use Groovy var later

leotm avatar May 03 '22 11:05 leotm