fix NPE in apps with product flavors
add example-with-flavors