Open Chippi opened 2 months ago
Try release.aab and then use a memory-footprint for it. I'm not sure if memory-footprint is intended to work with .apk files.
Try release.aab and then use a memory-footprint for it. I'm not sure if memory-footprint is intended to work with .apk files.
Thanks for your suggestion @amoledwatchfaces.
For me, it didn't work with .aab bundle either.
java -jar ./memory-footprint.jar --watch-face app-release.aab --schema-version 2 --ambient-limit-mb 10 --active-limit-mb 100 --apply-v1-offload-limitations --estimate-optimization
Starting memory footprint test with app-release.aab
Test report:
[MEMORY_FOOTPRINT]: �??FAIL�?? Asset @drawable/minute_hand was not found in the watch face package �??
@Chippi This output is correct. Now you need to resolve issue within your watch face package.
@amoledwatchfaces
1.
<MinuteHand
height="150"
pivotX="0.5"
pivotY="1"
resource="@drawable/minute_hand"
width="10"
x="220"
y="75" />
It's a png, minute_hand.png placed in the drawable folder
Here's a snapshot of my release aab bundle.
Is it possible to share the watch face? If you'd prefer not to post it could you share it with me directly? (garan@google.com)
@Chippi
@amoledwatchfaces
1.
<MinuteHand height="150" pivotX="0.5" pivotY="1" resource="@drawable/minute_hand" width="10" x="220" y="75" />
Here, change it to resource="minute_hand" (do not use @drawable) What do you think @garanj ?
Here, change it to resource="minute_hand" (do not use @drawable) What do you think @garanj ?
Yes, good spot @amoledwatchfaces !
2 days of struggle and you solved it, now it works. Thank you so much! @amoledwatchfaces
I got it from this example. Never realised it was wrong since it works fine on the wear os android emulator. https://github.com/android/wear-os-samples/blob/81c6e335718119f0c762b4c5d42f3d39af461d74/WatchFaceFormat/SimpleAnalog/watchface/src/main/res/raw/watchface.xml
I got it from this example. Never realised it was wrong since it works fine on the wear os android emulator. https://github.com/android/wear-os-samples/blob/81c6e335718119f0c762b4c5d42f3d39af461d74/WatchFaceFormat/SimpleAnalog/watchface/src/main/res/raw/watchface.xml
Perfect!
@garanj maybe I can create PR to remove those @drawable references in the sample?
I got it from this example. Never realised it was wrong since it works fine on the wear os android emulator. https://github.com/android/wear-os-samples/blob/81c6e335718119f0c762b4c5d42f3d39af461d74/WatchFaceFormat/SimpleAnalog/watchface/src/main/res/raw/watchface.xml
Perfect!
@garanj maybe I can create PR to remove those @drawable references in the sample?
Ouch! yes please!
The tool is documented here to work on .apk but indeed seems to work only on .aab. Could I suggest that the documentation be updated?
I've been trying to fix this issue for a long time, but I'm out of ideas.
Java version
java 17.0.12 2024-07-16 LTS
I've built the memory footprint tool using
./gradlew :memory-footprint:jar
.Then I've tried to run the command for my own watch face format apk and also for samples in https://github.com/android/wear-os-samples/tree/main/WatchFaceFormat. The APK's was built using the command
./gradlew assembleDebug
java -jar ./memory-footprint.jar --watch-face app-debug.apk --schema-version 2 --ambient-limit-mb 10 --active-limit-mb 100 --apply-v1-offload-limitations --estimate-optimization
But I always get this error.
I cannot figure out what's wrong, I'd appreciate any help.