Solution 1 :
Enter the IPAddress of your Computer in the place of JarsUbuntuComputer and also make sure Port number is same or not
also add this in Manifest in Application tag
<application android_allowBackup="true" android_icon="@mipmap/ic_launcher" android_label="@string/app_name" android_roundIcon="@mipmap/ic_launcher_round" android_supportsRtl="true" android_theme="@style/AppTheme" android_usesCleartextTraffic="true" android_allowClearUserData="true"> <activity android_name=".MainActivity"></activity>
I’m trying to connect my mobile app with my desktop app, but it’s impossible for me.
Both devices are connected to the same wifi and i have the internet permisions on my manifest.
MANIFEST AFTER application tag
<uses-permission android_name="android.permission.INTERNET" /> <uses-permission android_name="android.permission.ACCESS_NETWORK_STATE" />
I/System.out: Unable to resolve host "JarsUbuntuComputer": No address associated with hostname
Comment posted by JarssS8
with the IP number works correctly, but i tought that can put the hostname for be sure that is never going to change.
Comment posted by Md Rehan
No its impossible to use hostname, 1) You can use static IP. 2) Generally in desktop your ip will not change if you are connecting with same router or wifi