Hi there you probably have seen cleartext error in your sketchware project or any where else in your android studio projects. You may not have seen this error on lower android versions. But starting from android 9 the ‘http://’ is disabled by default and if you load any url over http instead of https you will get the cleartext error.
How to solve the cleartext error from your app?
Method 1: always try to load url over https which is secure. For example https://example.com. But if you have a browser app where you can’t control the user to use https instead of http. You can use the method 2
Method 2: in this method we need to update the android manifest.xml file of your app. This is not possible from your sketchware application. For this we need to have an android studio like application. For example you can use the AIDE app.
I am using the AIDE to update the android manifest file.
- First of all export your project from sketchware.
- Now open the AIDE app (or you can use the android studio from your desktop) and then open your project in it.
- Now go to AndroidMainfest.xml file of your app. The location of your manifest file may be something like this. Yourproject/app/src/main/
- Now try finding the application tag inside it. It will look something like this
5. Now just below the application tag paste this code
And it will look like this.
And now run your project. It will solve the cleartext issue from your app
But please remember if you have your application in playstore then you may face some problems.
While compiling your app from any other source than sketchware, you need to sign your app using the same sign key that you use in sketchware.
I will be adding another less complicated method to avoid cleartext error in sketchware, in this Blog later. Please visit regularly or subscribe blog for future updates
Hope it helps, thanks for reading.
Download AIDE FROM PLAYSTORE