Bazel installation issues #5756
-
Operating SystemMacOS with M1 chip Android Studio VersionAndroid Studio Meerkat | 2024.3.1 RAM size8GB Free disk space50GB Which step are you stuck on?I have been following the bazel setup steps listed here: #5643 and copied the gist from here (https://gist.github.com/BenHenning/676113880e469727fe752c149da98e5b), however, while building, the Android Studio errors out and the build doesn't complete for the first shard. Error LogERROR: Skipping '//:oppia': no such target '//:oppia': target 'oppia' not declared in package '' defined by /Users/bhavuk/Desktop/opensource/oppia-android/BUILD.bazel (Tip: use `query "//:*"` to see all the targets in that package)
ERROR: command succeeded, but there were errors parsing the target pattern
INFO: Elapsed time: 4660.531s, Critical Path: 2485.90s
INFO: 7357 processes: 2474 internal, 3055 darwin-sandbox, 1828 worker.
FAILED: Build did NOT complete successfully
FAILED: Build did NOT complete successfully
INFO: Build Event Protocol files produced successfully.
Build command finished. Retrieving BEP outputs...
BEP outputs retrieved (11.48 MB). Approaches already used to resolve the issue
Additional informationNo response |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Hi, some of the project settings have recently changed, and we are in the process of updating our documentation. Please see here for the latest setup instructions. |
Beta Was this translation helpful? Give feedback.
-
As @adhiamboperes mentioned, we're in the process of updating our documentation. That being said, I recommend always checking the wiki first before discussions. The following page has the updated target to use: https://github.com/oppia/oppia-android/wiki/Oppia-Bazel-Setup-Instructions#building-the-app. Longer answer: we removed the old APK targets (e.g. bazel mobile-install //:oppia_dev_binary Note that this only works when installing on a device running SDK 33 or below (https://github.com/oppia/oppia-android/wiki/Bazel-Setup-Instructions-for-Linux#3-verifying-the-build has more details). For SDK 34+ devices, you can do the following, instead: bazel build //:oppia_dev
adb install -r bazel-bin/oppia_dev_binary.apk (This workaround should go away when we update to the Starlark version of |
Beta Was this translation helpful? Give feedback.
As @adhiamboperes mentioned, we're in the process of updating our documentation. That being said, I recommend always checking the wiki first before discussions. The following page has the updated target to use: https://github.com/oppia/oppia-android/wiki/Oppia-Bazel-Setup-Instructions#building-the-app.
Longer answer: we removed the old APK targets (e.g.
//:oppia
) in favor of only using AAB targets (e.g.//:oppia_dev
). This reduces the difference in APK and AAB targets (which makes maintenance slightly easier), and we found that the base APK used to generate our AABs are actually installable withmobile-install
like so:Note that this only works whe…