Pārlūkot izejas kodu

1.修改打不开问题

zhangmengjie 5 gadi atpakaļ
vecāks
revīzija
d7052f0fef

+ 1 - 1
android/app/build.gradle

@@ -163,7 +163,7 @@ dependencies {
     implementation fileTree(dir: "libs", include: ["*.jar"])
     // 如果你需要支持GIF动图
     implementation 'com.facebook.fresco:animated-gif:1.10.0'
-    implementation "androidx.appcompat:appcompat:${rootProject.ext.supportLibVersion}"
+    implementation "com.android.support:appcompat-v7:${rootProject.ext.supportLibVersion}"
     implementation "com.facebook.react:react-native:+"  // From node_modules
 
 }

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 60 - 60
android/app/src/main/assets/index.android.bundle


+ 1 - 1
android/app/src/main/java/com/edufound/mobile/util/AndroidUtil.java

@@ -1,7 +1,7 @@
 package com.edufound.mobile.util;
 
 import android.content.Intent;
-import androidx.annotation.Nullable;
+import android.support.annotation.Nullable;
 import android.widget.Toast;
 
 import com.edufound.mobile.activity.WebActivity;

+ 6 - 6
android/app/src/main/java/com/edufound/mobile/util/PermissionConstants.java

@@ -5,13 +5,13 @@ package com.edufound.mobile.util;
  */
 
 
-        import android.Manifest;
-        import android.Manifest.permission;
-        import android.annotation.SuppressLint;
-        import androidx.annotation.StringDef;
+import android.Manifest;
+import android.Manifest.permission;
+import android.annotation.SuppressLint;
+import android.support.annotation.StringDef;
 
-        import java.lang.annotation.Retention;
-        import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
 
 @SuppressLint("InlinedApi")
 public final class PermissionConstants {

+ 18 - 18
android/app/src/main/java/com/edufound/mobile/util/PermissionUtils.java

@@ -3,24 +3,24 @@
  */
 
 package com.edufound.mobile.util;
-        import android.app.Activity;
-        import android.content.Context;
-        import android.content.Intent;
-        import android.content.pm.PackageManager;
-        import android.net.Uri;
-        import android.os.Build;
-        import android.os.Bundle;
-        import androidx.annotation.NonNull;
-        import androidx.annotation.Nullable;
-        import androidx.annotation.RequiresApi;
-        import androidx.core.content.ContextCompat;
-
-        import java.util.ArrayList;
-        import java.util.Arrays;
-        import java.util.Collections;
-        import java.util.LinkedHashSet;
-        import java.util.List;
-        import java.util.Set;
+import android.app.Activity;
+import android.content.Context;
+import android.content.Intent;
+import android.content.pm.PackageManager;
+import android.net.Uri;
+import android.os.Build;
+import android.os.Bundle;
+import android.support.annotation.NonNull;
+import android.support.annotation.Nullable;
+import android.support.annotation.RequiresApi;
+import android.support.v4.content.ContextCompat;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.LinkedHashSet;
+import java.util.List;
+import java.util.Set;
 
 /**
  * <pre>

+ 1 - 1
android/app/src/main/java/com/edufound/mobile/util/Utils.java

@@ -8,7 +8,7 @@ import android.content.Context;
 import android.graphics.Point;
 import android.os.Build;
 import android.os.Bundle;
-import androidx.annotation.NonNull;
+import android.support.annotation.NonNull;
 import android.view.WindowManager;
 
 import java.lang.ref.WeakReference;

+ 1 - 1
android/app/src/main/java/com/edufound/mobile/view/modal/PopModal.java

@@ -7,7 +7,7 @@ import android.content.DialogInterface;
 import android.graphics.Color;
 import android.graphics.drawable.ColorDrawable;
 import android.os.Build;
-import androidx.annotation.RequiresApi;
+import android.support.annotation.RequiresApi;
 import android.util.AttributeSet;
 import android.util.DisplayMetrics;
 import android.util.Log;

+ 1 - 1
android/build.gradle

@@ -6,7 +6,7 @@ buildscript {
         minSdkVersion = 16
         compileSdkVersion = 28
         targetSdkVersion = 28
-        supportLibVersion = '1.0.0-beta01'
+        supportLibVersion = "28.0.0"
     }
     repositories {
         google()

+ 4 - 2
android/gradle.properties

@@ -20,5 +20,7 @@ MYAPP_RELEASE_STORE_FILE=edufound.keystore
 MYAPP_RELEASE_KEY_ALIAS=edufound_key
 MYAPP_RELEASE_STORE_PASSWORD=edufound123
 MYAPP_RELEASE_KEY_PASSWORD=edufound321
-android.useAndroidX=true
-android.enableJetifier=true
+#是否使用AndroidX库
+android.useAndroidX=false
+#是否迁移第三方库
+android.enableJetifier=false

+ 10 - 24
package-lock.json

@@ -2863,13 +2863,11 @@
         },
         "balanced-match": {
           "version": "1.0.0",
-          "bundled": true,
-          "optional": true
+          "bundled": true
         },
         "brace-expansion": {
           "version": "1.1.11",
           "bundled": true,
-          "optional": true,
           "requires": {
             "balanced-match": "^1.0.0",
             "concat-map": "0.0.1"
@@ -2882,18 +2880,15 @@
         },
         "code-point-at": {
           "version": "1.1.0",
-          "bundled": true,
-          "optional": true
+          "bundled": true
         },
         "concat-map": {
           "version": "0.0.1",
-          "bundled": true,
-          "optional": true
+          "bundled": true
         },
         "console-control-strings": {
           "version": "1.1.0",
-          "bundled": true,
-          "optional": true
+          "bundled": true
         },
         "core-util-is": {
           "version": "1.0.2",
@@ -2996,8 +2991,7 @@
         },
         "inherits": {
           "version": "2.0.3",
-          "bundled": true,
-          "optional": true
+          "bundled": true
         },
         "ini": {
           "version": "1.3.5",
@@ -3007,7 +3001,6 @@
         "is-fullwidth-code-point": {
           "version": "1.0.0",
           "bundled": true,
-          "optional": true,
           "requires": {
             "number-is-nan": "^1.0.0"
           }
@@ -3020,20 +3013,17 @@
         "minimatch": {
           "version": "3.0.4",
           "bundled": true,
-          "optional": true,
           "requires": {
             "brace-expansion": "^1.1.7"
           }
         },
         "minimist": {
           "version": "0.0.8",
-          "bundled": true,
-          "optional": true
+          "bundled": true
         },
         "minipass": {
           "version": "2.3.5",
           "bundled": true,
-          "optional": true,
           "requires": {
             "safe-buffer": "^5.1.2",
             "yallist": "^3.0.0"
@@ -3050,7 +3040,6 @@
         "mkdirp": {
           "version": "0.5.1",
           "bundled": true,
-          "optional": true,
           "requires": {
             "minimist": "0.0.8"
           }
@@ -3123,8 +3112,7 @@
         },
         "number-is-nan": {
           "version": "1.0.1",
-          "bundled": true,
-          "optional": true
+          "bundled": true
         },
         "object-assign": {
           "version": "4.1.1",
@@ -3134,7 +3122,6 @@
         "once": {
           "version": "1.4.0",
           "bundled": true,
-          "optional": true,
           "requires": {
             "wrappy": "1"
           }
@@ -3240,7 +3227,6 @@
         "string-width": {
           "version": "1.0.2",
           "bundled": true,
-          "optional": true,
           "requires": {
             "code-point-at": "^1.0.0",
             "is-fullwidth-code-point": "^1.0.0",
@@ -7087,9 +7073,9 @@
       }
     },
     "react-native-device-info": {
-      "version": "2.1.1",
-      "resolved": "https://registry.npm.taobao.org/react-native-device-info/download/react-native-device-info-2.1.1.tgz",
-      "integrity": "sha1-xt3AIgM3VqXkxYmeuD45C1oYzBc="
+      "version": "2.1.0",
+      "resolved": "https://registry.npm.taobao.org/react-native-device-info/download/react-native-device-info-2.1.0.tgz",
+      "integrity": "sha1-VeuCwboUxVDO9rce/DaNiLlrgmo="
     },
     "react-native-gesture-handler": {
       "version": "1.1.0",

+ 1 - 1
package.json

@@ -14,10 +14,10 @@
 		"react-art": "^16.8.6",
 		"react-dom": "^16.8.6",
 		"react-native": "0.59.4",
-		"react-native-device-info": "^2.1.1",
 		"react-native-gesture-handler": "^1.1.0",
 		"react-native-image-picker": "^0.28.1",
 		"react-native-orientation": "^3.1.3",
+		"react-native-device-info": "2.1.0",
 		"react-native-splash-screen": "^3.2.0",
 		"react-native-storage": "^1.0.1",
 		"react-native-swiper": "^1.5.14",

+ 9 - 8
pages/Login.js

@@ -31,12 +31,14 @@ export default class Login extends BasePage {
 					</View>
 					<View style={styles.phoneNumberBox}>
 						<Text style={styles.phoneNumber}>手机号</Text>
-						<TextInput
-							style={styles.phoneText}
-							onChangeText={(text) => this.setState({ phone_num: text })}
-							value={this.state.phone_num}
-							placeholder={'请输入手机号'}
-						/>
+						<View style={styles.phoneText}>
+							<TextInput
+								style={{ marginLeft: 20, width: '100%', height: '100%' }}
+								onChangeText={(text) => this.setState({ phone_num: text })}
+								value={this.state.phone_num}
+								placeholder={'请输入手机号'}
+							/>
+						</View>
 					</View>
 					<View style={styles.signNumberBox}>
 						<Text style={styles.phoneNumber}>验证码</Text>
@@ -290,8 +292,8 @@ const styles = StyleSheet.create({
 	},
 	phoneText: {
 		width: '100%',
+		borderRadius: 25,
 		height: Dimensions.getHeight(50),
-		marginLeft: 20,
 		backgroundColor: '#f3f3f3'
 	},
 	signNumberBox: {
@@ -305,7 +307,6 @@ const styles = StyleSheet.create({
 	signText: {
 		width: '54%',
 		height: Dimensions.getHeight(50),
-		borderRadius: 25,
 		backgroundColor: '#f3f3f3',
 		marginRight: 9
 	},