SocketException: Operation not permitted

We may run into this error while developing an app for Android: It may look like this as well: I won’t be torturing you with long explanations and references 😁, so everything you should do is to check that you have android.permission.INTERNET permission in your AndroidManifest.xml: Sometimes it’s necessary to add android.permission.ACCESS_NETWORK_STATE as well.

READ MORE

CLEARTEXT communication not permitted

When trying to build a WebSocket connection without SSL on Android we might encounter this guy: If it is a development environment and you want to test things, obtaining proper SSL certificate could take time. Therefore, possible solutions are: 1. Adjust app manifest and allow cleartext communications This is simpler option, so let’s start with […]

READ MORE

Java invalid or corrupt jarfile

Suppose you have an error: Or related one: The first thing you need to do is to check your main class defined in manifest. If you’re 100% sure that everything is all right, then check any running JVM processes, associated with that file and kill them. The thing is that you probably ran the old […]

READ MORE

No main manifest attribute Gradle Kotlin DSL

You can get this error if you try to run jar without specifying the name of the class that contains fun main() and which you want to run. To do this, you need to register the full class name in the Main-Class key of your manifest. Plain jar without dependencies You need to replace the […]

READ MORE