The connection to the server was unsuccessful.(

0 favourites
  • 9 posts
From the Asset Store
Create your own wss server and ws server with ssl and without ssl.
  • Hello friends! Everything is almost done loaded in the emulator run "their game" and writes an error

    "the connection to the server was unsuccessful"

    <img src="http://cs302812.userapi.com/u21362907/-7/y_4d9afc68.jpg" border="0" />

    <img src="http://cs302812.userapi.com/u21362907/-7/y_3fce0bc4.jpg" border="0" />

    What do I need to load into the server?

  • Here is my code to the Supplement to the App.java

    package com.phonegap.gameworld;

    import android.app.Activity;

    import android.os.Bundle;

    import android.webkit.WebView;

    public class App extends Activity {

        wkm@Override

        public void onCreate(Bundle savedInstanceState) {

          super.onCreate(savedInstanceState);

        

          WebView webview = new WebView(this);

          webview.loadUrl("file:///android_asset/www/index.html");

          

          setContentView(webview);

        }

    }

  • Why not use the built-in export to PhoneGap and use PhoneGap Build to compile it? That's the only way we officially support it.

  • I just want to check how my game works in the emulator because it does not have a cell phone with android! How to connect to the server Explain to me?

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • AlbertAkefoul I don't know what the message means I'm afraid, but as long as it works on a real phone then we're not concerned about fixing it. Maybe try rebuilding the app.

  • Perhaps the permissons are set wrong. I've never tried to load a HTML5-website in the emulator this way in an app but I wouldn't wonder when the emulator doesn't support loading html5-websites that way.

  • AlbertAkefoul I don't know what the message means I'm afraid, but as long as it works on a real phone then we're not concerned about fixing it. Maybe try rebuilding the app.

    EDIT: Okay, i ve found the reason. I compile the apk using ARM architecture that's why it works on my smartphone. The problem is my tab is X86. It wont work there. I rebuild using x86 and it works just fine.

    Hey Ashley, I export flying along example using crosswalk, then i installed it in my smartphone and everything works fine. But when I installed it in my tablet, i get the same message "connection to the server was unsuccessful file:///android_asset/www/index.html"

    Can you help me? thanks

    Edit: I browsed the internet and some people said it's related to the load-url-timeout and some said CSS, javascript or Cordova file. But I still dont get it. Thanks

  • > AlbertAkefoul I don't know what the message means I'm afraid, but as long as it works on a real phone then we're not concerned about fixing it. Maybe try rebuilding the app.

    >

    > EDIT: Okay, i ve found the reason. I compile the apk using ARM architecture that's why it works on my smartphone. The problem is my tab is X86. It wont work there. I rebuild using x86 and it works just fine.

    >

    > Hey Ashley, I export flying along example using crosswalk, then i installed it in my smartphone and everything works fine. But when I installed it in my tablet, i get the same message "connection to the server was unsuccessful file:///android_asset/www/index.html"

    > Can you help me? thanks

    >

    > Edit: I browsed the internet and some people said it's related to the load-url-timeout and some said CSS, javascript or Cordova file. But I still dont get it. Thanksnothaseo2014-01-07 19:35:52

    >

    Did you solve your problem ? if yes how?

  • You should make sure for what architecture you are building your apk, ARM or x86. Each cannot be opened in devices with different architecture.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)