Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Application error issue in android emulator "There was an network error"

i run the ionic app on android after adding platform android i run it through

ionic emulate android -l -c 

I am not getting why this is coming, its android manifest file is:

 <?xml version='1.0' encoding='utf-8'?>
<manifest android:hardwareAccelerated="true" android:versionCode="1" android:versionName="0.0.1" package="com.greatdevelopers.hrstop" xmlns:android="http://schemas.android.com/apk/res/android">
    <supports-screens android:anyDensity="true" android:largeScreens="true" android:normalScreens="true" android:resizeable="true" android:smallScreens="true" android:xlargeScreens="true" />
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
    <application android:hardwareAccelerated="true" android:icon="@drawable/icon" android:label="@string/app_name" android:supportsRtl="true">
        <activity android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale" android:label="@string/activity_name" android:launchMode="singleTop" android:name="MainActivity" android:screenOrientation="portrait" android:theme="@android:style/Theme.Black.NoTitleBar" android:windowSoftInputMode="adjustResize">
            <intent-filter android:label="@string/launcher_name">
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <activity android:label="@string/multi_app_name" android:name="com.synconset.MultiImageChooserActivity" android:theme="@android:style/Theme.Holo.Light" />
    </application>
    <uses-sdk android:minSdkVersion="10" android:targetSdkVersion="22" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
</manifest>

its showing me this issue. Any solution of this please tell me.

Error message getting

like image 292
Manish Kumar Avatar asked Jul 17 '15 10:07

Manish Kumar


2 Answers

Just add these two lines in config.xml

<preference name="SplashScreenDelay" value="80000" />

<preference name="loadUrlTimeoutValue" value="60000" />

like image 121
ARSHAD MOHAMMED Avatar answered Nov 09 '22 19:11

ARSHAD MOHAMMED


You need to add cordova whitelist under your project. Try the following -

$ cordova plugin add cordova-plugin-whitelist

like image 45
Rodrigo Rubio Avatar answered Nov 09 '22 21:11

Rodrigo Rubio