google / google/bundletool

Resources$NotFoundException after accessing a layout file in DFM

Open
#379 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
Java
Stars
4k
Forks
428
PR merge metrics
No merged PRs in 30d

Description

**Describe the bug**

Crash after code inside DFM access a layout file in DFM

**Bundletool version(s) affected**
Version: 1.18.0

**Stacktrace**
```
\\ the above isn't relevant

Caused by: android.content.res.Resources$NotFoundException: Resource ID #0x7e020000
at android.content.res.ResourcesImpl.getValue(ResourcesImpl.java:230)

\\ the following isn't relevant
```

**To Reproduce**
- Clone the [repo](https://github.com/giangpham96/DFMTest)
- Build the aab with
`./gradlew :app:bundleDebug`
- Build the apks with
`bundletool build-apks --local-testing --bundle app-debug.aab --output app.apks`
- Install the app with
`bundletool install-apks --apks app.apks`
- Open the app, it will install the dynamic module
- The app crashes when accessing the CustomView

**Expected behavior**
- The view can successfully inflate its layout

**Known workaround**
If you have found a workaround, please specify what it is.
Upload the aab to Play Store internal track and install as a tester

**Environment:**
OS: Android 13

**Additional context**
Add any other context about the problem here.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.