I have a small program made in Android with a WebView that binds to a URL that is http and not https. When testing the program in the Android Studio emulator it works fine but when I generate a test .apk and install it on the mobile when I try to open the application I get the following message: An error has occurred while parsing the package.
Is it possible that the error is that the WebView binds to an http URL instead of an https ? If so, how can I run the test code with an http link?
The error:
"There was a problem parsing the packet"
It is not related to the use of unencrypted urls in your application , but if you are using this type of urls it is important that you allow their use for your application to work, by enabling CleartextTraffic within your
AndroidManifest.xml
:Check out:
my android 9 app won't connect to the internet
The causes of not being able to install the application with the error "There was a problem parsing the package" are :
build.gradle
the application.For example, if your device has Android 7 (API 24) but your application indicates at least (
minSdkVersion
) Android 8 (API 25):The
versionCode
one of the application you are trying to install is smaller than the one that is installed.Your Device has several accounts configured and you are in another session which did not install the application. At this point you must find the application in Apps within the settings of your device and remove it "for all users" (Uninstall for all users).