为什么可以';无法将我的Android REST客户端连接到我的REST服务?

为什么可以';无法将我的Android REST客户端连接到我的REST服务?,android,web-services,rest,mobile,Android,Web Services,Rest,Mobile,我有一个运行良好的JavaREST服务,我试图通过Android客户端访问它,但从未建立连接。这是我的舱单: <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.ipn.escom.clientRest.activity" android:versionCode="1"

我有一个运行良好的JavaREST服务,我试图通过Android客户端访问它,但从未建立连接。这是我的舱单:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.ipn.escom.clientRest.activity"
    android:versionCode="1"
    android:versionName="1.0" >

    <uses-sdk android:minSdkVersion="7" />
    <uses-permission android:name="android.permission.INTERNET"/>

    <application
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name" >
        <activity
            android:name="com.mx.ipn.escom.clientRest.activity.ClientRestActivity"
            android:label="@string/app_name" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
    </application>

</manifest>

. 这是我的logcat输出,我不明白为什么从未建立连接


我的REST服务位于Windows XP计算机中,我用来访问它的IP地址是ipconfig显示给我的,如果我将相同的IP放在web浏览器上,我会得到响应,但Android客户端从未建立连接。我做错了什么?

如果您在代理后访问网络,使用代理后的网络启动模拟器

emulator -avd avdname -http-proxy http://192.168.1.1:8080

我假设avdname是avdname,代理网关ip是192.168.1.1

修复了此问题,我必须确保我的Android设备与我的REST服务连接到同一网络。

这看起来像是连接问题。尝试在Android浏览器中使用该地址,并检查其是否正常工作。Android客户端表示您的设备?在emulator的浏览器中,您可以访问吗?问题似乎是我的Android设备连接到不同的网络,但现在我有一个JSON异常