Failed to find target with hash string 'android-34' / Failed to install the following Android SDK packages as some licences have not been accepted
Gradle needs an SDK platform/build-tools that isn’t installed, or the licences haven’t been accepted on this machine.
Seen on:
Android
Meaning
Gradle can auto-download missing SDK packages only after licences are accepted. CI images and new machines usually need sdkmanager --licenses.
Common causes
- Platform (android-34) or build-tools not installed
- Licences not accepted
- SDK directory read-only (CI)
⚡ Quick fix
- Accept licences: sdkmanager --licenses
- Install the platform: sdkmanager "platforms;android-34"
- Make the SDK folder writable
Detailed fix by platform
Shell
- kotlin
yes | sdkmanager --licenses sdkmanager "platforms;android-34" "build-tools;34.0.0"
How to diagnose
- Installed — sdkmanager --list_installed
- Licences — $ANDROID_HOME/licenses folder
🔧 Still not fixed?
Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:
Similar errors
- 10000 wrangler / Cloudflare API: Authentication error [code: 10000]
- AADSTS70021 AADSTS70021: No matching federated identity record found for presented assertion (GitHub Actions / workload identity)
- Android resource linking failed AAPT: error: resource x (aka y) not found — Android resource linking failed
Most viewed in Android
Other ways to find it
🧠 Still stuck? Analyze your error
Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.
Was this page helpful?
Report a correction or suggest an improvement
Last updated 7 Oct 2026