Reputation: 51
I am upgrading my apps to API34 and need to address the tighter controls regarding Zip path traversal. I have legacy backup files which use paths starting with "/" which my app needs to be able to restore (unzip). The medium-term workaround for this is to call dalvik.system.ZipPathValidator.clearCallback() to avoid the 'ZipException' being thrown.
However, my project can not resolve 'ZipPathValidator' in dalvik.system.
I have updated the SDK to add all Android 14 components, and I can resolve other dalvik.system classes (eg DexClassLoader) but not 'ZipPathValidator'.
I am obviously missing something, but I'm not sure where to go from here. Any suggestions would be appreciated.
Upvotes: 0
Views: 127
Reputation: 51
RESOLVED.
Despite having 'targetSdkVersion 34' specified in my 'build.gradle', I also had 'compileSdkVersion 33' specified.
Whilst now deprecated, compileSdkVersion obviously still takes precedence.
Upvotes: 0