I'm currently developing a project using PhoneGap and I need to do an ajax request to my local webserver which has already:

PHP code

```
header('Access-Control-Allow-Origin: *');  

```

Anyway, when I do an ajax request with jQuery on Android I get this error (in adb logcat):

```
D/chromium(23078): Unknown chromium error: 0

```

The Javascript code is:

```
$.ajax({url:"http://192.168.1.219/works/privati/folder/api.php/getlastmaginfo",dataType:"json",success:function(data)
{
    console.log("Finished loading by ajax");
    console.log(data);
}});

```

In Ripple Emulator works as expected, in Android nope.

Any suggestion? Thank you for the help!

**UPDATE 2013-08-21:**

After some researches I came at the conclusion that $.ajax won't work with PhoneGap (don't know why, maybe a bug?).
We must use $.get instead, but when I do a request with $.get I get `Unknown chromium error: -6`
I also read [here](https://code.google.com/p/android/issues/detail?id=17535) that the problem is due to an Android's bug with the WebView URL mechanism.

I'll continue my research until I find a good and working solution

**UPDATE 2013-08-21 (2):**
Not even using this works...

```
var fileTransfer = new FileTransfer();

fileTransfer.download(
    "http://192.168.1.219/works/privati/qlipmag/api.php/getlastmaginfo",
    "json.json",
    function(entry) {
        console.log("OKAY");

    },
    function(error) {
        console.log(error);
    }
);

```

Error is at `new FileTransfer();` => `Uncaught ReferenceError: FileTransfer is not defined`

**UPDATE 2013-08-22:**

It doens't work even by loading an external image:

`<img src="http://externalhost.com/image.jpg"/>`

Same error.

In android manifest file I already setted permission:

```
<uses-permission android:name="android.permission.INTERNET" />

```

I don't really know from where comes the problem...

**UPDATE 2013-08-27:**
I tried the same code on PhoneGap for iPhone (in iPhone Emulator) and the ajax request was successfull when I used an external website. Using an external website also on android doesn't get the same result.
Same error.

Anybody can see why? Access origin are setted fine...