'Variables are not avaiable' when debugging Skia in AndroidStuio

49 views
Skip to first unread message

sodino chen

unread,
Oct 18, 2022, 10:02:55 PM10/18/22
to skia-discuss
I just tried to build Skia for Android following the Skia documentation at

But, 'Variables are not avaiable' when debugging Skia in AndroidStuio.  
As shown in the image below : 
How to fix it ?
1.png

sodino chen

unread,
Oct 18, 2022, 10:12:38 PM10/18/22
to skia-discuss
1.png

Greg Daniel

unread,
Oct 19, 2022, 9:00:13 AM10/19/22
to skia-d...@googlegroups.com
So by default we do not push all the symbols on Android, even debug builds, because it greatly increases the binary size and takes longer to keep pushing builds to the device during normal development. However, to get the symbols you can either modify this line here, https://source.chromium.org/chromium/chromium/src/+/main:third_party/skia/gn/skia/BUILD.gn;l=580, to just be -g. Or in your args.gn file in your out directory you can add a extra_cflags="-g" (which I think will take precedence over the default in BUILD.gn file).

--
You received this message because you are subscribed to the Google Groups "skia-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to skia-discuss...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/skia-discuss/9d368a64-f6f3-42b1-877e-7edcdb122616n%40googlegroups.com.

sodino chen

unread,
Oct 19, 2022, 11:34:19 AM10/19/22
to skia-discuss
1.png

Great!  It work!  You save me!

-------------------------

But 'add a extra_cflags="-g"  in your args.gn file in your out directory ' seems to be wrong.
The error message is printed: 




sodino@sodino skia % ninja -C out/Shared_arm64
ninja: Entering directory `out/Shared_arm64'
[0/1] Regenerating ninja files
ERROR at //gn/skia/BUILD.gn:568:12: This is not a list.
cflags = extra_cflags
^-----------
Instead I see a string = "-g"
See //gn/BUILDCONFIG.gn:178:3: which caused the file to be included.
"//gn/skia:default",
^------------------
FAILED: build.ninja
../../bin/gn --root=../.. -q --regeneration gen .

sodino chen

unread,
Oct 19, 2022, 11:46:57 AM10/19/22
to skia-discuss
add a extra_cflags=["-g"] will be ok!

Thanks.!!

Greg Daniel

unread,
Oct 19, 2022, 11:49:20 AM10/19/22
to skia-d...@googlegroups.com
Oh yes good catch I missed the [ ] in my original suggestion. But glad it has worked out for you!

Reply all
Reply to author
Forward
0 new messages