google / watchface

Apache License 2.0
30 stars 3 forks source link

Memory Validator fails on release APK #20

Closed yschimke closed 5 months ago

yschimke commented 5 months ago
Watch Face does not contain a watchface.xml file
com.google.wear.watchface.dfx.memory.InvalidTestRunException: Watch Face does not contain a watchface.xml file
    at com.google.wear.watchface.dfx.memory.WatchFaceData.fromResourcesStream(WatchFaceData.java:113)
    at com.google.wear.watchface.dfx.memory.ResourceMemoryEvaluator.evaluateMemoryFootprint(ResourceMemoryEvaluator.java:118)
    at com.google.wear.watchface.dfx.memory.ResourceMemoryEvaluator.evaluateInHumanReadableMode(ResourceMemoryEvaluator.java:80)
    at com.google.wear.watchface.dfx.memory.ResourceMemoryEvaluator.main(ResourceMemoryEvaluator.java:52)

For one of the watchfaces at https://github.com/android/wear-os-samples/tree/main/WatchFaceFormat

build with

./gradlew watchface:assembleRelease

Contents of the release APK

jar tf watchface/build/outputs/apk/release/watchface-release.apk
META-INF/com/android/build/gradle/app-metadata.properties
META-INF/version-control-info.textproto
AndroidManifest.xml
res/Af.xml
res/Yd.png
res/li.xml
res/mf.png
resources.arsc
garanj commented 5 months ago

Confirming Debug build validates correctly.

garanj commented 5 months ago

Release APK from the above installs and works fine.

garanj commented 5 months ago

Support for resources.arsc files handles this issue: https://github.com/google/watchface/compare/main...arsc

garanj commented 5 months ago

This is now fixed