setup-android icon indicating copy to clipboard operation
setup-android copied to clipboard

ndk-bundle disappeared (a good thing, but confusing)

Open TWiStErRob opened this issue 2 years ago • 2 comments

Hi, I'm using your action for a while now, and it has always warned about ndk-bundle being in the wrong location. (e.g. you can see it here too https://github.com/android-actions/setup-android/issues/167)

I even tried different workarounds to silence the warning:

# Uninstall NDK, because it's not used and it emits a warning:
# > 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')
echo sdkmanager --uninstall "ndk;21.4.7075529"
sdkmanager --uninstall "ndk;21.4.7075529"

then

# Remove ndk-bundle, because it's not used and it emits a warning:
# > 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')
echo rm /usr/local/lib/android/sdk/ndk-bundle
rm /usr/local/lib/android/sdk/ndk-bundle

now, the weird thing is that recently it suddenly disappeared. 9 days ago (July 27) it was working (i.e. the folder was there and deleting it worked), but then July 29, and August 3 I had failing builds because it was unable to find this directory / symlink to delete.

So I just disabled this step and the warning seems to be gone: image

Now, don't get me wrong, I like this state better, it's just curious that you didn't release a setup-android@v2 version around these dates (last release 2.0.8 on April 22, and tag v2 points to that commit too), yet the behavior changed, any idea why?

TWiStErRob avatar Aug 03 '22 07:08 TWiStErRob

Silent warning fix, my favorite fix, but seriously, I understand why it would raise concerns.

ndk-bundle used to come preinstalled by GitHub as part of the Virtual Environment. They "deprecated" it on July 24th, but it takes a few days for changes to propagate to all hosted runners. https://github.com/actions/virtual-environments/issues/5879

I should update README.md to explain that we try to find preinstalled sdk and update or install one if no good preinstalled was found.

ViliusSutkus89 avatar Aug 03 '22 10:08 ViliusSutkus89

(I had to fix this because I was running 100s of Gradle builds in unit tests for a Gradle plugin, so it was warning and polluting my test logs.)

Thanks for the explanation, that totally makes sense. I like how a "deprecation" by GitHub terminology can break builds :)

TWiStErRob avatar Aug 03 '22 17:08 TWiStErRob

I'm closing this issue. I assume this is solved

ViliusSutkus89 avatar Sep 25 '23 02:09 ViliusSutkus89

Yep, more of a heads-up / discussion.

TWiStErRob avatar Sep 25 '23 09:09 TWiStErRob