The connection to the server was unsuccessful.(

Bugs will be moved here once resolved.

Post » Tue Mar 27, 2012 1:45 pm

Hello friends! Everything is almost done loaded in the emulator run "their game" and writes an error

"the connection to the server was unsuccessful"







What do I need to load into the server?
B
4
Posts: 19
Reputation: 488

Post » Tue Mar 27, 2012 1:49 pm

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 {

    @Override
    public void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
    
      WebView webview = new WebView(this);
      webview.loadUrl("file:///android_asset/www/index.html");
      
      setContentView(webview);
    }
}
B
4
Posts: 19
Reputation: 488

Post » Tue Mar 27, 2012 4:01 pm

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.
Scirra Founder
B
359
S
214
G
72
Posts: 22,951
Reputation: 178,578

Post » Tue Mar 27, 2012 4:51 pm

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?
B
4
Posts: 19
Reputation: 488

Post » Tue Mar 27, 2012 9:19 pm

@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.
Scirra Founder
B
359
S
214
G
72
Posts: 22,951
Reputation: 178,578

Post » Sat Mar 31, 2012 3:50 pm

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.Joe72012-03-31 16:20:32
B
14
S
6
G
5
Posts: 173
Reputation: 4,742

Post » Tue Jan 07, 2014 6:37 pm

[QUOTE=Ashley] @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.[/QUOTE]

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
B
41
S
9
G
4
Posts: 100
Reputation: 6,211

Post » Sun Oct 26, 2014 10:36 am

nothaseo wrote:[QUOTE=Ashley] @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?
Image
B
21
S
2
G
1
Posts: 45
Reputation: 1,035

Post » Tue Oct 28, 2014 1:21 pm

You should make sure for what architecture you are building your apk, ARM or x86. Each cannot be opened in devices with different architecture.
B
41
S
9
G
4
Posts: 100
Reputation: 6,211


Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 0 guests