Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to find target with hash string 'android-26' #167

Closed
TWiStErRob opened this issue Jul 16, 2021 · 4 comments
Closed

Failed to find target with hash string 'android-26' #167

TWiStErRob opened this issue Jul 16, 2021 · 4 comments

Comments

@TWiStErRob
Copy link

I've set up this action a few months ago, but since then I started getting failures this month.

You can see the build history at https://github.com/TWiStErRob/net.twisterrob.gradle/actions/workflows/CI.yml
You can see that June 8, 9, 14 on master all had green builds, for example:
The latest one: https://github.com/TWiStErRob/net.twisterrob.gradle/runs/2815492988
But in July most builds fail when trying to use android-26, for example:
https://github.com/TWiStErRob/net.twisterrob.gradle/runs/3085771486

Somehow I got a success on private_junit5 branch, so this might be an intermittent issue, but seems very frequent so far.

Can you please advise how to investigate what's wrong. The logs suggest that all should be fine with install:

> Configure project :instant
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')
File /home/runner/.android/repositories.cfg could not be loaded.
Checking the license for package Android SDK Platform 26 in /usr/local/lib/android/sdk/licenses
License for package Android SDK Platform 26 accepted.
Preparing "Install Android SDK Platform 26 (revision: 2)".
"Install Android SDK Platform 26 (revision: 2)" ready.
Installing Android SDK Platform 26 in /usr/local/lib/android/sdk/platforms/android-26
"Install Android SDK Platform 26 (revision: 2)" complete.
"Install Android SDK Platform 26 (revision: 2)" finished.
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')
Build properties not found for package Android SDK Platform 26

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring project ':instant'.
> Failed to find target with hash string 'android-26' in: /usr/local/lib/android/sdk
@ViliusSutkus89
Copy link
Collaborator

@TWiStErRob , Have you tried installing android-26 platform package manually?

- uses: android-actions/setup-android@v2
- run: sdkmanager "platforms;android-26"

@TWiStErRob
Copy link
Author

Yeah, thank you! It looks like that helped: TWiStErRob/net.twisterrob.gradle#135
Since then it's all green: https://github.com/TWiStErRob/net.twisterrob.gradle/actions

I investigated a bit more by looking at more logs and the issue was very likely an incomplete SDK install, because parallel testing execution (different Gradle modules).

@ViliusSutkus89
Copy link
Collaborator

Cool, so you already have solved it even before me noticing =D

@TWiStErRob
Copy link
Author

Yeah, sorry, I was about to write, was just building a few to see the stability.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants