Android-数据未发送到服务器 - 排球

时间:2016-03-11 08:32:29

标签: android android-volley

我正在尝试使用凌空向服务器发送数据我很长时间都面临这个错误。请让我知道如何解决这个问题?

  

03-11 12:36:26.701 27137-28232 / com.ativaishna.av.audb I / System.out:   (HTTPLog)-Static:isSBSettingEnabled false 03-11 12:36:26.701   27137-28232 / com.ativaishna.av.audb I / System.out:(HTTPLog)-Static:   isShipBuild true 03-11 12:36:26.701 27137-28232 / com.ativaishna.av.audb   I / System.out:(HTTPLog)-Thread-64041-60099235:SmartBonding启用   如果为假,SHIP_BUILD为true,则log to file为false,DBG为false 03-11   12:36:26.701 27137-28232 / com.ativaishna.av.audb I / System.out:   (HTTPLog)-Thread-64041-60099235:SMARTBONDING_FEATURE_ENABLED为true   03-11 12:36:26.701 27137-28232 / com.ativaishna.av.audb I / System.out:   (HTTPLog)-Static:isSBSettingEnabled false 03-11 12:36:26.701   27137-28237 / com.ativaishna.av.audb I / System.out:(HTTPLog)-Static:   isSBSettingEnabled false 03-11 12:36:26.701   27137-28237 / com.ativaishna.av.audb I / System.out:   返回的KnoxVpnUidStorageknoxVpnSupported API值为false 03-11   12:36:26.701 27137-28232 / com.ativaishna.av.audb I / System.out:   返回的KnoxVpnUidStorageknoxVpnSupported API值为false 03-11   12:36:26.701 27137-28248 / com.ativaishna.av.audb E / Volley:[64056]   NetworkDispatcher.run:未处理的异常   java.lang.NullPointerException:尝试调用虚方法'int   空对象引用上的java.lang.String.length()'                                                                   java.lang.NullPointerException:尝试调用虚方法'int   空对象引用上的java.lang.String.length()'                                                                       在libcore.net.UriCodec.encode(UriCodec.java:132)                                                                       在java.net.URLEncoder.encode(URLEncoder.java:57)                                                                       在com.android.volley.Request.encodeParameters(Request.java:450)                                                                       在com.android.volley.Request.getBody(Request.java:436)                                                                       在com.android.volley.toolbox.HurlStack.addBodyIfExists(HurlStack.java:260)                                                                       在com.android.volley.toolbox.HurlStack.setConnectionParametersForRequest(HurlStack.java:234)                                                                       在com.android.volley.toolbox.HurlStack.performRequest(HurlStack.java:107)                                                                       在com.android.volley.toolbox.BasicNetwork.performRequest(BasicNetwork.java:96)                                                                       在com.android.volley.NetworkDispatcher.run(NetworkDispatcher.java:112)

2 个答案:

答案 0 :(得分:1)

I / System.out:(HTTPLog)-Static:isSBSettingEnabled false 是特定设备问题,最有可能是三星棒棒糖。请将所有类型的网络权限放在Android Menifest文件中,如:  <uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" /> <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> <uses-permission android:name="android.permission.CHANGE_WIFI_STATE" /> <uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" />

然后卸载应用并重新安装。

答案 1 :(得分:0)

I / System.out:(HTTPLog)-静态:isSBSettingEnabled false是特定三星设备的问题。如果您已在Android Manifest文件中获得所有类型的网络许可,则可以尝试targetSdkVersion 27。

  defaultConfig {
    applicationId "com.example.gstapp"
    minSdkVersion 15
    targetSdkVersion 27
    versionCode 1
    versionName "1.0"
    testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}