我创建了一个登录和注册系统,当我尝试登录,注册,更改密码或重置密码时,应用程序只是说“网络连接错误”。
我正在使用强大的互联网连接,你能不能建议我尝试使用WI-FI和4G,但它仍然会说同样的错误。
请查看logcat错误
06-25 14:23:44.625 16888-16888/? E/SELinux﹕ [DEBUG] get_category: variable seinfo: samsung sensitivity: NULL, cateogry: NULL
06-25 14:23:44.705 16888-16903/? E/SPPClientService﹕ ============PushLog. commonIsShipBuild. stop!
06-25 14:23:44.705 16888-16903/? E/SPPClientService﹕ [PushClientApplication] Push log off : This is Ship build version
06-25 14:23:44.735 16906-16906/? E/Zygote﹕ MountEmulatedStorage()
06-25 14:23:44.735 16906-16906/? E/Zygote﹕ v2
06-25 14:23:44.755 16906-16906/? E/SELinux﹕ [DEBUG] get_category: variable seinfo: platform sensitivity: NULL, cateogry: NULL
06-25 14:23:44.825 16922-16922/? E/Zygote﹕ MountEmulatedStorage()
06-25 14:23:44.825 16922-16922/? E/Zygote﹕ v2
06-25 14:23:44.845 16922-16922/? E/SELinux﹕ [DEBUG] get_category: variable seinfo: untrusted sensitivity: NULL, cateogry: NULL
06-25 14:23:44.995 16949-16949/? E/Zygote﹕ MountEmulatedStorage()
06-25 14:23:44.995 16949-16949/? E/Zygote﹕ v2
06-25 14:23:45.055 16949-16949/? E/SELinux﹕ [DEBUG] get_category: variable seinfo: untrusted sensitivity: NULL, cateogry: NULL
06-25 14:23:45.495 16976-16976/? E/Zygote﹕ MountEmulatedStorage()
06-25 14:23:45.495 16976-16976/? E/Zygote﹕ v2
06-25 14:23:45.545 16976-16976/? E/SELinux﹕ [DEBUG] get_category: variable seinfo: untrusted sensitivity: NULL, cateogry: NULL
06-25 14:23:45.695 16976-16976/? E/PhotosPlugin﹕ Loading PhotosPlugin
06-25 14:23:46.095 17021-17021/? E/Zygote﹕ MountEmulatedStorage()
06-25 14:23:46.095 17021-17021/? E/Zygote﹕ v2
06-25 14:23:46.135 17021-17021/? E/SELinux﹕ [DEBUG] get_category: variable seinfo: samsung sensitivity: NULL, cateogry: NULL
06-25 14:23:46.495 17060-17060/? E/Zygote﹕ MountEmulatedStorage()
06-25 14:23:46.495 17060-17060/? E/Zygote﹕ v2
06-25 14:23:46.535 17060-17060/? E/SELinux﹕ [DEBUG] get_category: variable seinfo: platform sensitivity: NULL, cateogry: NULL
06-25 14:23:46.655 3216-3216/? E/PackageReceiver﹕ this package will be replased, skip this package
06-25 14:23:46.655 3216-3216/? E/PackageReceiver﹕ This package will be replaced = com.brad.visor
06-25 14:24:18.665 930-1106/? E/MotionRecognitionService﹕ handler : SCREEN_ON end
06-25 14:23:46.745 17105-17105/? E/Zygote﹕ MountEmulatedStorage()
06-25 14:23:46.745 17105-17105/? E/Zygote﹕ v2
06-25 14:23:46.785 17105-17105/? E/SELinux﹕ [DEBUG] get_category: variable seinfo: platform sensitivity: NULL, cateogry: NULL
06-25 14:23:46.915 17124-17124/? E/Zygote﹕ MountEmulatedStorage()
06-25 14:23:46.915 17124-17124/? E/Zygote﹕ v2
06-25 14:23:46.925 292-292/? E/installd﹕ system dir 0 : /system/app/
06-25 14:23:46.925 292-292/? E/installd﹕ system dir 1 : /system/priv-app/
06-25 14:23:46.925 292-292/? E/installd﹕ system dir 2 : /vendor/app/
06-25 14:23:46.925 292-292/? E/installd﹕ system dir 3 : /oem/app/
06-25 14:23:46.955 17124-17124/? E/SELinux﹕ [DEBUG] get_category: variable seinfo: platform sensitivity: NULL, cateogry: NULL
06-25 14:23:47.115 17148-17148/? E/Zygote﹕ MountEmulatedStorage()
06-25 14:23:47.115 17148-17148/? E/Zygote﹕ v2
06-25 14:23:47.155 17148-17148/? E/SELinux﹕ [DEBUG] get_category: variable seinfo: untrusted sensitivity: NULL, cateogry: NULL
06-25 14:23:47.385 16669-17170/? E/FilterInstaller﹕ There is no requred permission
06-25 14:23:47.465 281-281/? E/SMD﹕ DCD ON
06-25 14:23:47.515 17183-17183/? E/Zygote﹕ MountEmulatedStorage()
06-25 14:23:47.515 17183-17183/? E/Zygote﹕ v2
06-25 14:23:47.535 17183-17183/? E/SELinux﹕ [DEBUG] get_category: variable seinfo: platform sensitivity: NULL, cateogry: NULL
06-25 14:23:47.545 17199-17199/? E/Zygote﹕ MountEmulatedStorage()
06-25 14:23:47.545 17199-17199/? E/Zygote﹕ v2
06-25 14:23:47.565 17199-17199/? E/SELinux﹕ [DEBUG] get_category: variable seinfo: untrusted sensitivity: NULL, cateogry: NULL
06-25 14:23:47.815 17223-17223/? E/Zygote﹕ MountEmulatedStorage()
06-25 14:23:47.815 17223-17223/? E/Zygote﹕ v2
06-25 14:23:47.855 17223-17223/? E/SELinux﹕ [DEBUG] get_category: variable seinfo: samsung sensitivity: NULL, cateogry: NULL
06-25 14:23:48.065 17249-17249/? E/Zygote﹕ MountEmulatedStorage()
06-25 14:23:48.065 17249-17249/? E/Zygote﹕ v2
06-25 14:23:48.115 17249-17249/? E/SELinux﹕ [DEBUG] get_category: variable seinfo: default sensitivity: NULL, cateogry: NULL
06-25 14:23:48.205 3216-3216/? E/PackageReceiver﹕ this package will be replased, skip this package
06-25 14:23:48.205 3216-3216/? E/PackageReceiver﹕ This package will be replaced = com.brad.visor
06-25 14:23:48.475 1700-1700/? E/NetworkScheduler.SchedulerReceiver﹕ Invalid parameter app
06-25 14:23:48.475 1700-1700/? E/NetworkScheduler.SchedulerReceiver﹕ Invalid package name : Perhaps you didn't include a PendingIntent in the extras?
06-25 14:23:48.525 17270-17270/? E/Zygote﹕ MountEmulatedStorage()
06-25 14:23:48.525 17270-17270/? E/Zygote﹕ v2
06-25 14:23:48.555 17270-17270/? E/SELinux﹕ [DEBUG] get_category: variable seinfo: untrusted sensitivity: NULL, cateogry: NULL
06-25 14:23:49.035 17270-17270/? E/SysUtils﹕ ApplicationContext is null in ApplicationStatus
06-25 14:23:49.225 17270-17328/? E/File﹕ fail readDirectory() errno=2
06-25 14:23:49.325 1669-7212/? E/MDM﹕ [181] b.run: Couldn't connect to Google API client: ConnectionResult{statusCode=API_UNAVAILABLE, resolution=null}
06-25 14:23:50.465 281-281/? E/SMD﹕ DCD ON
06-25 14:23:53.475 281-281/? E/SMD﹕ DCD ON
06-25 14:23:56.475 281-281/? E/SMD﹕ DCD ON
06-25 14:23:57.315 17021-17102/? E/SQLiteLog﹕ (284) automatic index on LOCAL_DUPS(local_dup_id)
06-25 14:23:57.925 17021-17102/? E/SQLiteLog﹕ (284) automatic index on LOCAL_DUPS(local_dup_id)
06-25 14:23:58.095 17021-17102/? E/SQLiteLog﹕ (284) automatic index on LOCAL_DUPS(local_dup_id)
06-25 14:23:58.155 17021-17102/? E/SQLiteLog﹕ (284) automatic index on LOCAL_DUPS(local_dup_id)
06-25 14:23:59.465 281-281/? E/SMD﹕ DCD ON
06-25 14:24:02.465 281-281/? E/SMD﹕ DCD ON
06-25 14:24:02.605 930-1128/? E/WifiStateMachine﹕ WifiStateMachine CMD_START_SCAN source 10014 txSuccessRate=94.24 rxSuccessRate=74.75 targetRoamBSSID=c4:04:15:c1:13:70 RSSI=-40
06-25 14:24:02.615 930-1128/? E/WifiStateMachine﹕ [1,435,238,642,625 ms] noteScanStartWorkSource{10014} uid 10014
06-25 14:24:05.475 281-281/? E/SMD﹕ DCD ON
06-25 14:24:06.525 930-1128/? E/WifiStateMachine﹕ [1,435,238,646,538 ms] noteScanEnd WorkSource{10014}
06-25 14:24:06.545 930-1128/? E/WifiStateMachine﹕ wifi setScanResults statecom.android.server.wifi.WifiStateMachine$ConnectedState@550587e sup_state=COMPLETED debouncing=false
06-25 14:24:06.745 930-930/? E/LocSvc_flp﹕ I/===> int flp_inject_location(FlpLocation*) line 222
06-25 14:24:06.745 930-1419/? E/LocSvc_ApiV02﹕ I/<--- void globalRespCb(locClientHandleType, uint32_t, locClientRespIndUnionType, void*) line 125 QMI_LOC_INJECT_POSITION_REQ_V02
06-25 14:24:08.475 281-281/? E/SMD﹕ DCD ON
06-25 14:24:11.465 281-281/? E/SMD﹕ DCD ON
06-25 14:24:14.475 281-281/? E/SMD﹕ DCD ON
06-25 14:24:17.475 281-281/? E/SMD﹕ DCD ON
06-25 14:24:18.545 251-251/? E/qdexternal﹕ writeHPDOption: file write failed '/sys/devices/virtual/graphics/fb1/hpd'
06-25 14:24:18.675 930-1128/? E/WifiStateMachine﹕ handleScreenStateChanged Exit: true
06-25 14:24:18.695 930-1128/? E/WifiStateMachine﹕ setSuspendOptimizationsNative: 4 false -want true stack:setSuspendOptimizationsNative - access$16800 - processMessage - processMsg
06-25 14:24:18.695 930-1128/? E/native﹕ do suspend false
06-25 14:24:18.885 1315-1315/? E/daemonapp﹕ [MSC_Daemon]>>> WU:1606 [0:0] [NameNotFoundException] !!
06-25 14:24:18.925 4622-4819/? E/BtGatt.ScanManager﹕ default value of curScanSetting 0 is choosen
06-25 14:24:19.905 930-1816/? E/PersonaManagerService﹕ inState(): stateMachine is null !!
06-25 14:24:20.485 281-281/? E/SMD﹕ DCD ON
06-25 14:24:21.125 930-1423/? E/ClipboardUIManager﹕ Failed to get ClipboardService
06-25 14:24:21.155 2258-17537/? E/SamsungIME﹕ lang.getLanguageCode():en, lang.getCountryCode():GB
06-25 14:24:21.155 2258-17538/? E/SamsungIME﹕ lang.getLanguageCode():en, lang.getCountryCode():GB
06-25 14:24:21.685 2258-2258/? E/SamsungIME﹕ SwiftKey guide popup condition 2 : true false false true true true true true true true
06-25 14:24:22.585 930-1128/? E/WifiStateMachine﹕ [1,435,238,662,601 ms] noteScanEnd no scan source
06-25 14:24:22.595 930-1128/? E/WifiStateMachine﹕ wifi setScanResults statecom.android.server.wifi.WifiStateMachine$ConnectedState@550587e sup_state=COMPLETED debouncing=false
06-25 14:24:23.265 1172-17483/? E/SViewCoverBase﹕ requestDumpUpload : MC is not installed
06-25 14:24:23.295 930-1232/? E/ClipboardUIManager﹕ Failed to get ClipboardService
06-25 14:24:23.325 2258-17571/? E/SamsungIME﹕ lang.getLanguageCode():en, lang.getCountryCode():GB
06-25 14:24:23.415 2258-17582/? E/SamsungIME﹕ lang.getLanguageCode():en, lang.getCountryCode():GB
06-25 14:24:23.475 281-281/? E/SMD﹕ DCD ON
06-25 14:24:23.925 2258-2258/? E/SamsungIME﹕ SwiftKey guide popup condition 2 : true false false true true true true true true true
06-25 14:24:25.475 930-1423/? E/ClipboardUIManager﹕ Failed to get ClipboardService
06-25 14:24:25.485 16752-16752/com.brad.visor E/ViewRootImpl﹕ sendUserActionEvent() mView == null
06-25 14:24:25.775 930-1336/? E/Watchdog﹕ !@Sync 167
06-25 14:24:26.485 281-281/? E/SMD﹕ DCD ON
06-25 14:24:27.355 930-1712/? E/ClipboardUIManager﹕ Failed to get ClipboardService
06-25 14:24:27.615 930-947/? E/ActivityManager﹕ checkUser: useridlist=null, currentuser=0
06-25 14:24:27.615 930-947/? E/ActivityManager﹕ checkUser: useridlist=null, currentuser=0
06-25 14:24:27.615 930-947/? E/ActivityManager﹕ checkUser: useridlist=null, currentuser=0
06-25 14:24:27.615 930-947/? E/ActivityManager﹕ checkUser: useridlist=null, currentuser=0
06-25 14:24:27.625 17614-17614/? E/Zygote﹕ MountEmulatedStorage()
06-25 14:24:27.625 17614-17614/? E/Zygote﹕ v2
06-25 14:24:27.645 17614-17614/? E/SELinux﹕ [DEBUG] get_category: variable seinfo: platform sensitivity: NULL, cateogry: NULL
06-25 14:24:27.855 930-1077/? E/ActivityManager﹕ checkUser: useridlist=null, currentuser=0
06-25 14:24:27.855 930-1077/? E/ActivityManager﹕ checkUser: useridlist=null, currentuser=0
06-25 14:24:27.855 930-1077/? E/ActivityManager﹕ checkUser: useridlist=null, currentuser=0
06-25 14:24:27.855 930-1077/? E/ActivityManager﹕ checkUser: useridlist=null, currentuser=0
06-25 14:24:27.865 17632-17632/? E/Zygote﹕ MountEmulatedStorage()
06-25 14:24:27.865 17632-17632/? E/Zygote﹕ v2
06-25 14:24:27.895 17632-17632/? E/SELinux﹕ [DEBUG] get_category: variable seinfo: shared sensitivity: NULL, cateogry: NULL
06-25 14:24:27.975 930-947/? E/ActivityManager﹕ checkUser: useridlist=null, currentuser=0
06-25 14:24:27.975 930-947/? E/ActivityManager﹕ checkUser: useridlist=null, currentuser=0
06-25 14:24:27.975 930-947/? E/ActivityManager﹕ checkUser: useridlist=null, currentuser=0
06-25 14:24:27.975 930-947/? E/ActivityManager﹕ checkUser: useridlist=null, currentuser=0
06-25 14:24:27.985 17648-17648/? E/Zygote﹕ MountEmulatedStorage()
06-25 14:24:27.985 17648-17648/? E/Zygote﹕ v2
06-25 14:24:28.005 17648-17648/? E/SELinux﹕ [DEBUG] get_category: variable seinfo: platform sensitivity: NULL, cateogry: NULL
06-25 14:24:28.075 930-1423/? E/ActivityManager﹕ checkUser: useridlist=null, currentuser=0
06-25 14:24:28.075 930-1423/? E/ActivityManager﹕ checkUser: useridlist=null, currentuser=0
06-25 14:24:28.075 930-1423/? E/ActivityManager﹕ checkUser: useridlist=null, currentuser=0
06-25 14:24:28.075 930-1423/? E/ActivityManager﹕ checkUser: useridlist=null, currentuser=0
06-25 14:24:28.085 17664-17664/? E/Zygote﹕ MountEmulatedStorage()
06-25 14:24:28.085 17664-17664/? E/Zygote﹕ v2
06-25 14:24:28.115 17664-17664/? E/SELinux﹕ [DEBUG] get_category: variable seinfo: platform sensitivity: NULL, cateogry: NULL
06-25 14:24:28.765 930-1050/? E/PowerManagerService﹕ handleSandman : startDreaming, but isDreaming false
06-25 14:24:28.905 930-1128/? E/WifiStateMachine﹕ WifiStateMachine CMD_START_SCAN source 10014 txSuccessRate=33.91 rxSuccessRate=24.84 targetRoamBSSID=c4:04:15:c1:13:70 RSSI=-41
06-25 14:24:28.905 930-1128/? E/WifiStateMachine﹕ [1,435,238,668,921 ms] noteScanstart no scan source
06-25 14:24:28.905 930-930/? E/LightSensor﹕ Light old sensor_state 0, new sensor_state : 512 en : 1
06-25 14:24:28.965 930-1106/? E/MotionRecognitionService﹕ handler : SCREEN_OFF end
06-25 14:24:28.965 930-1128/? E/WifiStateMachine﹕ handleScreenStateChanged Exit: false
06-25 14:24:28.975 286-17705/? E/AudioPlayer﹕ >>> setAudioEffect Error mAudioFormat : 1, event : 168430090, value : 151652874
06-25 14:24:28.985 930-1128/? E/WifiStateMachine﹕ setSuspendOptimizationsNative: 4 true -want true stack:setSuspendOptimizationsNative - access$16800 - processMessage - processMsg
06-25 14:24:28.985 930-1128/? E/WifiStateMachine﹕ setSuspendOptimizationsNative do it 4 true stack:setSuspendOptimizationsNative - access$16800 - processMessage - processMsg
06-25 14:24:28.985 930-1128/? E/native﹕ do suspend true
06-25 14:24:29.025 286-17709/? E/AudioPlayer﹕ >>> setAudioEffect Error mAudioFormat : 1, event : 4587583, value : 4390976
06-25 14:24:29.075 286-17713/? E/AudioPlayer﹕ >>> setAudioEffect Error mAudioFormat : 1, event : 4587583, value : 4390976
06-25 14:24:29.275 930-1014/? E/LightSensor﹕ RED : 0, GREEN : 0, BLUE : 0, CLEAR : 0, CALCULATED LUX : 0.000000, CCT : 1596.000000, REAL LUX : 0.000000 a_time = 238, gain = 64, ir=0, rp1=1, gp1=0, bp1=0, cp1=0, cpl=3202560
06-25 14:24:29.275 930-1076/? E/LightSensor﹕ Light old sensor_state 512, new sensor_state : 0 en : 0
06-25 14:24:29.475 281-281/? E/SMD﹕ DCD ON
06-25 14:24:29.555 930-930/? E/MotionRecognitionService﹕ mReceiver.onReceive : ACTION_USER_PRESENT :: UNLOCK SCREEN
06-25 14:24:29.555 930-930/? E/LightSensor﹕ Light old sensor_state 0, new sensor_state : 512 en : 1
06-25 14:24:29.595 930-1581/? E/ActivityManager﹕ checkUser: useridlist=null, currentuser=0
06-25 14:24:29.595 930-1581/? E/ActivityManager﹕ checkUser: useridlist=null, currentuser=0
06-25 14:24:29.595 930-1581/? E/ActivityManager﹕ checkUser: useridlist=null, currentuser=0
06-25 14:24:29.595 930-1581/? E/ActivityManager﹕ checkUser: useridlist=null, currentuser=0
06-25 14:24:29.605 17723-17723/? E/Zygote﹕ MountEmulatedStorage()
06-25 14:24:29.605 17723-17723/? E/Zygote﹕ v2
06-25 14:24:29.655 17723-17723/? E/SELinux﹕ [DEBUG] get_category: variable seinfo: default sensitivity: NULL, cateogry: NULL
06-25 14:24:29.695 1172-1172/? E/StatusBar﹕ onReceive : Intent.ACTION_SCREEN_OFF
06-25 14:24:29.935 930-1014/? E/LightSensor﹕ RED : 0, GREEN : 0, BLUE : 0, CLEAR : 0, CALCULATED LUX : 0.000000, CCT : 1596.000000, REAL LUX : 0.000000 a_time = 238, gain = 64, ir=0, rp1=1, gp1=0, bp1=0, cp1=0, cpl=3202560
06-25 14:24:29.935 930-1076/? E/LightSensor﹕ Light old sensor_state 512, new sensor_state : 0 en : 0
06-25 14:24:29.995 4622-4819/? E/BtGatt.ScanManager﹕ default value of curScanSetting 0 is choosen
06-25 14:24:30.075 17723-17723/? E/SysUtils﹕ ApplicationContext is null in ApplicationStatus
06-25 14:24:32.475 281-281/? E/SMD﹕ DCD ON
06-25 14:24:32.785 930-1128/? E/WifiStateMachine﹕ [1,435,238,672,797 ms] noteScanEnd WorkSource{10014}
06-25 14:24:32.795 930-1128/? E/WifiStateMachine﹕ wifi setScanResults statecom.android.server.wifi.WifiStateMachine$ConnectedState@550587e sup_state=COMPLETED debouncing=false
06-25 14:24:35.485 281-281/? E/SMD﹕ DCD ON
06-25 14:24:38.485 281-281/? E/SMD﹕ DCD ON
06-25 14:24:41.485 281-281/? E/SMD﹕ DCD ON
清单文件
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.brad.visor" >
<application
android:icon="@mipmap/logo"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name=".MainActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".Login">
</activity>
<activity
android:name=".Register">
</activity>
<activity
android:name=".Registered">
</activity>
<activity
android:name=".Main">
</activity>
<activity
android:name=".PasswordReset">
</activity>
<activity
android:name=".ChangePassword">
</activity>
</application>
<!-- Allow to connect with internet and to know the current network state-->
<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" />
</manifest>
答案 0 :(得分:0)
在您的清单文件中添加
<uses-permission android:name="android.permission.INTERNET" />
答案 1 :(得分:0)
如果这是你的问题,我不是100%,因为你没有发布你的清单文件,但我之前遇到过这个问题,并且要修复它,请为你的清单文件添加权限。
此处有更多信息:http://developer.android.com/training/basics/network-ops/connecting.html
答案 2 :(得分:0)
1.在不同设备上检查应用程序 2.检查以下方法的连接
public static boolean isNetworkConnected(Context context){
ConnectivityManager connectivityManager = (ConnectivityManager)
context.getSystemService(Context.CONNECTIVITY_SERVICE);
NetworkInfo networkInfo = connectivityManager.getActiveNetworkInfo();
return networkInfo != null && networkInfo.isConnected();
}
答案 3 :(得分:-1)
我有类似的问题。检查您的移动设备是否已连接到互联网。这对我来说是个问题。移动设备上没有互联网连接。