Delete R.class/etc. in support library jar files shipped in SDK

We need to keep the resoruce generated class files in the support
libraries' built jar files when compiling with javac,
with the introduction of LOCAL_SHARED_ANDROID_LIBRARIES support of aapt2.
We strip them  when packaging up the SDK package in this change.

Bug: 28454725
Bug: 22775504
Change-Id: Id5fb30915e698887e5a8d92f26d4ac8f3159613a
diff --git a/build/Android.mk b/build/Android.mk
index cc5c6b3..56e00d4 100644
--- a/build/Android.mk
+++ b/build/Android.mk
@@ -111,6 +111,8 @@
 	@echo "Package $(1).jar: $$@"
 	$(hide) mkdir -p $$(dir $$@)
 	$(hide) $(ACP) $$< $$@
+	@# Delete resource generated classes from the jar files.
+	$(hide) zip -d $$@ "*/R.class" "*/R\$$$$*.class" "*/Manifest.class" "*/Manifest\$$$$*.class" >/dev/null 2>&1 || true
 
 ALL_SDK_FILES += $(_psm_packaging_target)
 $(eval _psm_build_module :=)