Application Error while running in Android Emulator


#1

My Application is running in web browser but it throws “Application Error The Connection to the server was not successful (http://localhost:12848)” while running in android emulator.


#2

It was due to “Cordova Webview Timeout”

Cleared bug by creating mobile-config.js and adding
App.setPreference(‘loadUrlTimeoutValue’, 60000); into that js file

mobile-config.js

App.info({
id: ‘com.id’,
name: ‘test’,
description: ‘New Meteor Mobile App’,
author: ‘A Meteor Developer’,
email: ‘n/a’,
website: ‘n/a’
});

App.icons({
// Android
’android_hdpi’: ‘resources/icons/mipmap-hdpi/ic_launcher.png’,
‘android_xhdpi’: ‘resources/icons/mipmap-xhdpi/ic_launcher.png’,
‘android_xxhdpi’: ‘resources/icons/mipmap-xxhdpi/ic_launcher.png’,
‘android_xxxhdpi’: ‘resources/icons/mipmap-xxxhdpi/ic_launcher.png’
});

App.launchScreens({
// Android
’android_mdpi_portrait’: ‘resources/images/splash.png’,
‘android_mdpi_landscape’: ‘resources/images/splash.png’,
‘android_hdpi_portrait’: ‘resources/images/splash.png’,
‘android_hdpi_landscape’: ‘resources/images/splash.png’,
‘android_xhdpi_portrait’: ‘resources/images/splash.png’,
‘android_xhdpi_landscape’: ‘resources/images/splash.png’,
});

// Social sharing
App.accessRule(’://.facebook.com/’);
App.accessRule(’
://.fbcdn.net/’);
App.accessRule(’://.gmail.com/’);
App.accessRule(’
://.google.com/’);
App.accessRule(’://.linkedin.com/’);
App.accessRule(’
://.pinterest.com/’);
App.accessRule(’://.twitter.com/’);
App.accessRule('http://
’);

App.accessRule("*");

App.accessRule(‘mailto:’, true);
App.accessRule('sms:
’, true);
App.accessRule(‘tel:’, true);
App.accessRule('geo:
’, true);
App.accessRule(‘market:’, true);
App.accessRule('itms:
’, true);
App.accessRule(‘itms-apps:*’, true);

App.setPreference(‘ShowSplashScreenSpinner’, false);
App.setPreference(‘AutoHideSplashScreen’, false);
App.setPreference(‘SplashScreenDelay’, 10000);
App.setPreference(‘FadeSplashScreen’, true);
App.setPreference(‘FadeSplashScreenDuration’, 1.0);
App.setPreference(‘webviewbounce’, false);
App.setPreference(‘DisallowOverscroll’, true);
App.setPreference(‘SplashScreen’, ‘screen’);
// App.setPreference(‘StatusBarOverlaysWebView’, false);
//App.setPreference(‘StatusBarStyle’, default);
App.setPreference(‘loadUrlTimeoutValue’, 60000);