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

fix: update generic CI docs to list requirements (e.g. android sdk) #2925

Open
rammanokar-plateron opened this issue Feb 26, 2025 · 4 comments
Labels
bug Something isn't working

Comments

@rammanokar-plateron
Copy link

shorebird build is failing with No Android SDK found Error

$shorebird release android --flavor uat --artifact apk --dart-define FLAVOR=uat --dart-define enableFeatureAccess=true --dart-define --no-tree-shake-icons --flutter-version 3.27.1 --verbose

SHOREBIRD_TOKEN detected
SHOREBIRD_TOKEN successfully parsed
No checksum provided for patch, skipping file corruption validation
No checksum provided for aot-tools.dill, skipping file corruption validation
[HTTP] POST https://login.microsoftonline.com/common/oauth2/v2.0/token
⠸ Fetching apps... (1.8s)[HTTP] GET https://api.shorebird.dev/api/v1/apps
✓ Fetching apps (2.3s)
[Process.run] git rev-parse --verify refs/remotes/origin/flutter_release/3.27.1 (in /home/ubuntu/shorebird/bin/cache/flutter/2e1bcd18e2dc3b8251dc0671085c6518d37e16ad)
Exited with code 0

stdout:
56228c343d6c7fd3e1e548dbb290f9713bb22aa9

No checksum provided for patch, skipping file corruption validation
No checksum provided for aot-tools.dill, skipping file corruption validation
[Process.run] git for-each-ref --contains 56228c343d6c7fd3e1e548dbb290f9713bb22aa9 --format %(refname:short) refs/remotes/origin/flutter_release/* (in /home/ubuntu/shorebird/bin/cache/flutter/56228c343d6c7fd3e1e548dbb290f9713bb22aa9)
Exited with code 0

stdout:
origin/flutter_release/3.27.1

[Process.start] /home/ubuntu/shorebird/bin/cache/flutter/56228c343d6c7fd3e1e548dbb290f9713bb22aa9/bin/flutter build appbundle --release --flavor=uat --target-platform=android-arm,android-arm64,android-x64 --dart-define=FLAVOR=uat --dart-define=enableFeatureAccess=true --dart-define=--no-tree-shake-icons --verbose
⠸ Building Android app bundle with Flutter 3.27.1 (56228c343d)... (1.0s)[Process.runSync] which flutter
Exited with code 1
✗ Failed to build (1.1s)
stdout: [   +5 ms] Could not interpret results of "git describe": 3.27.2-0.0.pre.6
[  +20 ms] Unable to locate an Android SDK.
[   +4 ms] executing: uname -m
[   +3 ms] Exit code 0 from: uname -m
[        ] aarch64

[removed for brevity]



[   +4 ms] [!] No Android SDK found. Try setting the ANDROID_HOME environment variable.
[   +1 ms]
           #0      throwToolExit (package:flutter_tools/src/base/common.dart:10:3)
           #1      exitWithNoSdkMessage (package:flutter_tools/src/android/gradle_utils.dart:816:3)
           #2      BuildAppBundleCommand.runCommand (package:flutter_tools/src/commands/build_appbundle.dart:138:7)
           #3      FlutterCommand.verifyThenRunCommand (package:flutter_tools/src/runner/flutter_command.dart:1815:12)
           <asynchronous suspension>
           #4      FlutterCommand.run.<anonymous closure> (package:flutter_tools/src/runner/flutter_command.dart:1450:27)
           <asynchronous suspension>
           #5      AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:153:19)
           <asynchronous suspension>
           #6      CommandRunner.runCommand (package:args/command_runner.dart:212:13)
           <asynchronous suspension>
           #7      FlutterCommandRunner.runCommand.<anonymous closure> (package:flutter_tools/src/runner/flutter_command_runner.dart:421:9)
           <asynchronous suspension>
           #8      AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:153:19)
           <asynchronous suspension>
           #9      FlutterCommandRunner.runCommand (package:flutter_tools/src/runner/flutter_command_runner.dart:364:5)
           <asynchronous suspension>
           #10     run.<anonymous closure>.<anonymous closure> (package:flutter_tools/runner.dart:131:9)
           <asynchronous suspension>
           #11     AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:153:19)
           <asynchronous suspension>
           #12     main (package:flutter_tools/executable.dart:94:3)
           <asynchronous suspension>


[Process.run] git symbolic-ref HEAD (in /home/ubuntu/shorebird/bin/cache)
Exited with code 0

@rammanokar-plateron rammanokar-plateron added the bug Something isn't working label Feb 26, 2025
@eseidel
Copy link
Contributor

eseidel commented Feb 26, 2025

That error is actually coming from the underlying flutter command we run.

Does flutter build aab work for you on that same machine?

If so, where is Android Studio (or the Android SDK) installed? Is ANDROID_HOME set, or is there some other way you'd expect flutter to find the install? Thanks!

@rammanokar-plateron
Copy link
Author

As I follow this guide, it does not indicate anywhere that manual installation of the Android SDK is required.

https://docs.shorebird.dev/ci/generic/

@rammanokar-plateron
Copy link
Author

I think Shorebird will handle the installation of Flutter and the Android SDK automatically. Since it's downloading Flutter and storing it in the ~/.shorebird directory, it doesn’t use the system’s Flutter or Android SDK. If there are any requirements, they should be in the docs so we can get everything set up in advance.

The copy of Flutter is slightly modified to add Shorebird code push and is not intended to be added to your PATH. You can continue to use the versions of Flutter and Dart you already have installed.

https://docs.shorebird.dev/#:~:text=The%20copy%20of%20Flutter%20is%20slightly%20modified%20to%20add%20Shorebird%20code%20push%20and%20is%20not%20intended%20to%20be%20added%20to%20your%20PATH.%20You%20can%20continue%20to%20use%20the%20versions%20of%20Flutter%20and%20Dart%20you%20already%20have%20installed.

@eseidel
Copy link
Contributor

eseidel commented Feb 28, 2025

We do not currently install an Android SDK for you, no. We should update our docs.

@eseidel eseidel changed the title fix: shorebird build is failing with No Android SDK found Error fix: update generic CI docs to list requirements (e.g. android sdk) Feb 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants