Struggling to build aapt/aapt2

152 views
Skip to first unread message

Connor Tumbleson

unread,
May 14, 2024, 11:00:51 AMMay 14
to Android Building
Hi,

After my last sync I knew something was off - I missed the announcement of master to main. So I swapped out the entire tree and re-synced (-c -j8).

└─$ repo sync -c -j8
Fetching: 100% (1376/1376), done in 1m12.709s
Checking out: 100% (1376/1376), done in 21.502s
repo sync has finished successfully.

Once done I did my classic.

source build/envsetup.sh
m aapt
m aapt2

This failed immediately with

> build/make/core/release_config.mk:231: error: No release config set for target; please set TARGET_RELEASE, or if building on the command line use 'lunch <target>-<release>-<build_type>', where release is one of: next protobuf_flags trunk
trunk_food trunk_staging.

So I thought I would do "lunch sdk-eng" which failed

Invalid lunch combo: sdk-eng
Valid combos must be of the form <product>-<release>-<variant>

So I try lunch sdk-trunk-eng which fails, so then I try and run "lunch" to figure out what I'm missing

└─$ lunch

You're building on Linux
Warning: Cannot display lunch menu.

I'm just lost - all I want to do is build aapt & aapt2 and I'm struggling.

Anurag Kumar

unread,
May 14, 2024, 11:22:39 AMMay 14
to android-...@googlegroups.com
google changed lunching a little bit, instead of release variant "trunk" do "ap1a"
like this: sdk-ap1a-eng

From: android-...@googlegroups.com <android-...@googlegroups.com> on behalf of Connor Tumbleson <connor.t...@gmail.com>
Sent: 14 May 2024 04:03 PM
To: Android Building <android-...@googlegroups.com>
Subject: [android-building] Struggling to build aapt/aapt2
 
--
--
You received this message because you are subscribed to the "Android Building" mailing list.
To post to this group, send email to android-...@googlegroups.com
To unsubscribe from this group, send email to
android-buildi...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-building?hl=en

---
You received this message because you are subscribed to the Google Groups "Android Building" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-buildi...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/android-building/6b54580a-8ee9-49ea-bdd9-3647430c6a3fn%40googlegroups.com.

Anurag Kumar

unread,
May 14, 2024, 11:22:51 AMMay 14
to android-...@googlegroups.com
or you can try lunch sdk-trunk_staging-eng

From: Anurag Kumar <anura...@outlook.in>
Sent: 14 May 2024 08:46 PM
To: android-...@googlegroups.com <android-...@googlegroups.com>
Subject: Re: [android-building] Struggling to build aapt/aapt2
 

enh

unread,
May 14, 2024, 12:06:35 PMMay 14
to android-...@googlegroups.com
yeah, the format of lunches changed recently. it's pretty annoying
(and i don't think there's any high-level documentation of what it
means or why).

but if you look at
https://source.android.com/docs/setup/build/building (say) you can see
a new lunch that _does_ work (which is basically following the advice
from the error message, but contains a concrete example of what a
new-format lunch looks like).

Connor Tumbleson

unread,
May 21, 2024, 11:31:38 AMMay 21
to Android Building
Thanks, but I don't have much luck with either option.

I see you got ap1a from the latest build ids. That resulted in

> build/make/core/release_config.mk:125: error: release-config failed to run.
> 06:16:58 dumpvars failed with: exit status 1

It worked well with trunk_staging, but failed compilation of aapt (or aapt2) with so many errors about undefined modules.

> error: external/kotlinx.coroutines/Android.bp:239:1: "kotlinx_coroutines_reactive" depends on undefined module "rxjava".
> Or did you mean ["guava" "javap" "xz-java"]?
> error: tools/tradefederation/core/aoa_helper/Android.bp:19:1: "aoa-helper" depends on undefined module "jna-prebuilt".
> Or did you mean ["json-prebuilt"]?
> error: external/dokka/Android.bp:38:1: "dokka" depends on undefined module "dokka-tools-common-m2-deps".
+ 20 more

In the past - I didn't really have to invoke lunch at all. I could run envsetup, then just run "m aapt". Do you know what the default target was prior to being required to invoking lunch?
Reply all
Reply to author
Forward
0 new messages