android / wear-os-samples

Multiple samples showing best practices in app and watch face development on Wear OS.
https://developer.android.com/wear
Apache License 2.0
1.11k stars 570 forks source link

Watch Face Format Sample : aapt2 is not working. #1015

Open choe-apposter opened 6 months ago

choe-apposter commented 6 months ago

I'm trying to build a Watch Face Format Sample.

When I enter ./build-wff.sh SimpleDigital in the terminal, Error: AAPT2 not defined, please set and try again e.g. /build-tools//aapt2 It comes out like this.

I'm using a MAC, and I've configured it in the .zsenv file as below. export PATH=$PATH:$ANDROID_HOME/build-tools/34.0.0

But it doesn't work.

What's interesting is, If I go from the terminal to the path where the actual adapt2 is and input ./aapt2, it works well, but if I input adapt2, it doesn't work.

How can I test the sample?

yschimke commented 6 months ago

There are other issues here. If it can't find bundletool then it exits without a warning.

yschimke commented 6 months ago

Instructions won't work on linux https://stackoverflow.com/questions/53298843/how-do-i-install-bundletool

yschimke commented 6 months ago

For you issue, be aware the script wants you to specify the full path to the command as an env variable. Something like

AAPT2="$ANDROID_HOME/build-tools/34.0.0/aapt2" 

We should add a github action running this to demonstrate it.