Commit 16a469f2c75e6329d742d7c541012db7c176ca9e

Authored by zhanghaochen
1 parent 0b84364433
Exists in master

兼容HTTP

... ... @@ -44,6 +44,7 @@ android {
44 44 proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
45 45 }
46 46 release {
  47 + debuggable true
47 48 minifyEnabled false
48 49 proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
49 50 signingConfig signingConfigs.config
... ...
app/src/main/AndroidManifest.xml
... ... @@ -27,6 +27,7 @@
27 27 android:allowBackup="true"
28 28 android:icon="@mipmap/icon"
29 29 android:label="@string/app_name"
  30 + android:networkSecurityConfig="@xml/network_security_config"
30 31 android:supportsRtl="true"
31 32 android:theme="@style/Theme.Parent">
32 33 <activity
... ...
app/src/main/java/com/hjx/parent/ChooseActivity.java
... ... @@ -108,10 +108,7 @@ public class ChooseActivity extends BaseActivity {
108 108 StudentBean sb = gson.fromJson(jo2.toString(), StudentBean.class);
109 109 alist.add(sb);
110 110 }
111   - if (alist.size() > 0) {
112   - loadList();
113   - }
114   -
  111 + loadList();
115 112 } else {
116 113  
117 114 }
... ...
app/src/main/res/xml/network_security_config.xml
... ... @@ -0,0 +1,5 @@
  1 +<?xml version="1.0" encoding="utf-8"?>
  2 +<network-security-config>
  3 + <base-config cleartextTrafficPermitted="true" />
  4 +</network-security-config>
  5 +
... ...
... ... @@ -16,7 +16,7 @@ buildscript {
16 16  
17 17  
18 18 url = [
19   - server_url : "http://192.168.3.11:8088", //http 请求指令
  19 + server_url : "http://192.168.3.155:8088", //http 请求指令
20 20 server_url_online: "https://mgr.hjx.com", //http 请求指令
21 21 ]
22 22  
... ...