Mainline module fails to build

214 views
Skip to first unread message

cdesai

unread,
Apr 5, 2023, 3:30:51 PM4/5/23
to Android Building
Hello,

I'm trying to build the latest tags released for mainline modules.

I don't see much documentation for those publicly, if there's something that I missed, would anyone mind linking to it?

I chose the tag `aml_per_331512020`, which has the decription "aml_per_331512020 (9532533,com.google.android.permission)", which I assumed to mean to refer to AOSP module "com.android.permission"

I inited a tree with that, then:
```
export TARGET_BUILD_APPS=com.android.mediaprovider
packages/modules/common/build/build_unbundled_mainline_module.sh --product module_arm64 --dist_dir out/mainline_modules
```

This leads to an error:
```
packages/providers/MediaProvider/src/com/android/providers/media/util/PermissionUtils.java:29: error: cannot find symbol
import static android.Manifest.permission.READ_MEDIA_VISUAL_USER_SELECTED;
```

Reverting https://android.googlesource.com/platform/packages/providers/MediaProvider/+/88b1f1fbed47cc6db7c795134a2a980067332ce5 makes it build.

Are these the correct steps? Is the build failure expected?

cdesai

unread,
Apr 6, 2023, 1:41:13 PM4/6/23
to Android Building

cdesai

unread,
Apr 13, 2023, 10:43:00 AM4/13/23
to Android Building
Copy-paste error above.

I tried to build `aml_mpr_331512020` which says "aml_mpr_331512020 (9567825,com.google.android.mediaprovider)". I said permission above, that was wrong.

Just double checked, that's what I have checked out in my tree.

On Thursday, April 6, 2023 at 1:00:51 AM UTC+5:30 cdesai wrote:

cdesai

unread,
May 3, 2023, 3:54:33 PM5/3/23
to Android Building
A developer on my team figured it out, it fixed build errors with another module we were trying to build as well (com.android.permission)

`export UNBUNDLED_BUILD_SDKS_FROM_SOURCE=true # don't rely on prebuilts`
Reply all
Reply to author
Forward
0 new messages