Fix builds when fullsdk is missing.
Fix builds when fullsdk is missing.

This is a partial cherry-pick of ag/1653255 that landed in master.

Test: ./gradlew assemble now works in stage-aosp-master branch
Change-Id: Ib030178a6c2e954ee538d47518ebc6f84e5ed3aa
(cherry picked from commit f5461cddba25213a45144666ff58616e1d7809ce)

AndroidX/androidx,androidx/androidx,AndroidX/androidx,AndroidX/androidx,aosp-mirror/platform_frameworks_support,AndroidX/androidx,androidx/androidx,androidx/androidx,androidx/androidx,androidx/androidx,androidx/androidx,aosp-mirror/platform_frameworks_support,AndroidX/androidx,AndroidX/androidx,AndroidX/androidx,aosp-mirror/platform_frameworks_support,AndroidX/androidx,AndroidX/androidx,androidx/androidx,androidx/androidx,AndroidX/androidx,androidx/androidx,aosp-mirror/platform_frameworks_support,aosp-mirror/platform_frameworks_support,androidx/androidx