- cookieManager.removeAllCookie
CookieManager | Android Developers
This method was deprecated in API level 21. Use [removeAllCookies(android.webkit.ValueCallback)](https://developer.android.com/reference/android/webkit/CookieManager#removeAllCookies(android.webkit.ValueCallback%3Cjava.lang.Boolean%3E))
instead.
- VERSION.SDK
Build.VERSION | Android Developers
This field was deprecated in API level 15. Use [SDK_INT](https://developer.android.com/reference/android/os/Build.VERSION#SDK_INT)
to easily get this as an integer.
- versionCode
PackageInfo | Android Developers
This field was deprecated in API level 28. Use [getLongVersionCode()](https://developer.android.com/reference/android/content/pm/PackageInfo#getLongVersionCode())
instead, which includes both this and the additional [versionCodeMajor](https://developer.android.com/reference/android/R.styleable#AndroidManifest_versionCodeMajor)
attribute. The version number of this package, as specified by the <manifest> tag's [versionCode](https://developer.android.com/reference/android/R.styleable#AndroidManifest_versionCode)
attribute.
解決方案:
PackageInfo pInfo = context.getPackageManager().getPackageInfo(context.getPackageName(), PackageManager.GET_CONFIGURATIONS);
versionCode = pInfo.versionCode;
改為:
PackageInfo pInfo = context.getPackageManager().getPackageInfo(context.getPackageName(), PackageManager.GET_CONFIGURATIONS);
versionCode = pInfo.getLongVersionCode();