A mature application recently recompiled with Android Target SDK 30 now crashes on open with the following error message. It appears to relate to the licensing Library (v1.21)
** Activity (main) Create, isFirst = true **
** Activity (main) Resume **
java.lang.NoClassDefFoundError: Failed resolution of: Lorg/apache/http/client/utils/URLEncodedUtils;
at com.android.vending.licensing.ServerManagedPolicy.decodeExtras(ServerManagedPolicy.java:285)
at com.android.vending.licensing.ServerManagedPolicy.processServerResponse(ServerManagedPolicy.java:117)
at com.android.vending.licensing.LicenseValidator.handleResponse(LicenseValidator.java:208)
at com.android.vending.licensing.LicenseValidator.verify(LicenseValidator.java:168)
at com.android.vending.licensing.LicenseChecker$ResultListener$2.run(LicenseChecker.java:224)
at android.os.Handler.handleCallback(Handler.java:938)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loopOnce(Looper.java:226)
at android.os.Looper.loop(Looper.java:313)
at android.os.HandlerThread.run(HandlerThread.java:67)
Caused by: java.lang.ClassNotFoundException: org.apache.http.client.utils.URLEncodedUtils
... 10 more
There are several versioned components that affect the compilation process and the runtime behavior of our apps. The purpose of this tutorial is to explain the differences between them and help you choose which version to use. Each Android version is mapped to an api level. You can see this...
Hello, Yesterday my smartphone (samsung S8) is updated to Android 9 Pie and applications that use the StdActionBar library give an error and stop. I have verified that this happens when in the manifest I have: "targetSdkVersion = "28". With targetSdkVersion = "23" , everything works correctly...
To clarify.... This application has previously been tested and updated to the Play store successfully a couple of months ago as MinSDK=4 TargetSDK=30 (required)
There are no calls to the usual culprits of ExternalStorage etc and permissions are only com.android.vending.CHECK_LICENSE and android.permission.INTERNET.
I have carefully been through the code but I see no reference to the SDK-30 issues mentioned in the posts above. Given that this app has already been compiled a few months ago with the same SDK without any coding changes it seems rather unlikely that any of these issues apply. I note from the code history that there have been SDK issues with this Library function before.... I needed to add this to the manifest before to fix a crash issue.
Reluctantly I have removed the library and associated code and the issue has been resolved. I must now put my trust in the security provided by the Play Store!