Fixed build errors when generating APK