Build APK / build (push) Failing after 5m22s
Google removed the legacy standalone "tools" package from the Android
SDK repository (~Sep 2026); android-actions/setup-android@v3's default
packages list ("tools platform-tools") now fails its own sdkmanager
call for everyone. Pin packages: platform-tools instead - that's all
this step needs, flutter build fetches whatever platform/build-tools
versions it actually needs on its own.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
51 lines
1.3 KiB
YAML
51 lines
1.3 KiB
YAML
name: Build APK
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Check out code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up JDK 17
|
|
uses: actions/setup-java@v4
|
|
with:
|
|
distribution: temurin
|
|
java-version: "17"
|
|
|
|
- name: Set up Flutter
|
|
uses: subosito/flutter-action@v2
|
|
with:
|
|
channel: stable
|
|
|
|
- name: Set up Android SDK
|
|
uses: android-actions/setup-android@v3
|
|
with:
|
|
# Google removed the legacy standalone "tools" package from the
|
|
# SDK repository (~Sep 2026); the action's own default packages
|
|
# list ("tools platform-tools") now makes its internal sdkmanager
|
|
# call fail for everyone. platform-tools is all this step needs
|
|
# to install itself - flutter build fetches whatever
|
|
# platform/build-tools versions it actually needs on its own.
|
|
packages: "platform-tools"
|
|
|
|
- name: Install dependencies
|
|
run: flutter pub get
|
|
|
|
- name: Analyze
|
|
run: flutter analyze
|
|
|
|
- name: Build release APK
|
|
run: flutter build apk --release
|
|
|
|
- name: Upload APK
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: app-release-apk
|
|
path: build/app/outputs/flutter-apk/app-release.apk
|