Browse Source

删除启动页,增加aab打包配置
Signed-off-by: Caner

Caner 3 years ago
parent
commit
b609a3fe8a

+ 2 - 1
README.md

@@ -13,6 +13,7 @@
 
 
 ## android
 ## android
 
 
-1. cordova run android
+1. 打 debug-apk 包 cordova build android
 2. webrtc 依赖 cordova-plugin-webview-x5
 2. webrtc 依赖 cordova-plugin-webview-x5
 3. 权限需要用户手动打开
 3. 权限需要用户手动打开
+4. 打 aab 包:cordova build android --prod --release -- -- --packageType=bundle

+ 3 - 19
config.xml

@@ -26,32 +26,16 @@
         </config-file>    
         </config-file>    
         <edit-config file="AndroidManifest.xml" mode="merge" target="/manifest/application">
         <edit-config file="AndroidManifest.xml" mode="merge" target="/manifest/application">
             <activity android:usesCleartextTraffic="true" />
             <activity android:usesCleartextTraffic="true" />
-        </edit-config>   
-        <preference name="FadeSplashScreen" value="true"/>
-        <preference name="ShowSplashScreenSpinner" value="true"/>
-        <preference name="AutoHideSplashScreen" value="true" />
-        <preference name="SplashScreenDelay" value="3000" />
+        </edit-config>
         <preference name="AndroidPersistentFileLocation" value="Compatibility" />
         <preference name="AndroidPersistentFileLocation" value="Compatibility" />
+        <preference name="android-targetSdkVersion" value="30" />
         <!-- 图标 -->
         <!-- 图标 -->
         <icon density="ldpi" src="res/icon/android/ldpi/icon.png" />
         <icon density="ldpi" src="res/icon/android/ldpi/icon.png" />
         <icon density="mdpi" src="res/icon/android/mdpi/icon.png" />
         <icon density="mdpi" src="res/icon/android/mdpi/icon.png" />
         <icon density="hdpi" src="res/icon/android/hdpi/icon.png" />
         <icon density="hdpi" src="res/icon/android/hdpi/icon.png" />
         <icon density="xhdpi" src="res/icon/android/xhdpi/icon.png" />
         <icon density="xhdpi" src="res/icon/android/xhdpi/icon.png" />
         <icon density="xxhdpi" src="res/icon/android/xxhdpi/icon.png" />
         <icon density="xxhdpi" src="res/icon/android/xxhdpi/icon.png" />
-        <icon density="xxxhdpi" src="res/icon/android/xxxhdpi/icon.png" />
-        <!-- 以下是欢迎页面,可根据需要进行添加 -->
-        <splash density="land-hdpi" src="res/screen/android/drawable-land-hdpi/screen.png" />  
-        <splash density="land-ldpi" src="res/screen/android/drawable-land-ldpi/screen.png" />  
-        <splash density="land-mdpi" src="res/screen/android/drawable-land-mdpi/screen.png" />  
-        <splash density="land-xhdpi" src="res/screen/android/drawable-land-xhdpi/screen.png" />  
-        <splash density="land-xxhdpi" src="res/screen/android/drawable-land-xxhdpi/screen.png" />  
-        <splash density="land-xxxhdpi" src="res/screen/android/drawable-land-xxxhdpi/screen.png" />  
-        <splash density="port-hdpi" src="res/screen/android/drawable-port-hdpi/screen.png" />  
-        <splash density="port-ldpi" src="res/screen/android/drawable-port-ldpi/screen.png" />  
-        <splash density="port-mdpi" src="res/screen/android/drawable-port-mdpi/screen.png" />  
-        <splash density="port-xhdpi" src="res/screen/android/drawable-port-xhdpi/screen.png" />  
-        <splash density="port-xxhdpi" src="res/screen/android/drawable-port-xxhdpi/screen.png" />  
-        <splash density="port-xxxhdpi" src="res/screen/android/drawable-port-xxxhdpi/screen.png" />                 
+        <icon density="xxxhdpi" src="res/icon/android/xxxhdpi/icon.png" />                
     </platform>
     </platform>
     <platform name="ios">
     <platform name="ios">
         <allow-intent href="itms:*" />
         <allow-intent href="itms:*" />

+ 0 - 27
package-lock.json

@@ -12,7 +12,6 @@
         "cordova-android": "^9.1.0",
         "cordova-android": "^9.1.0",
         "cordova-plugin-file": "^6.0.2",
         "cordova-plugin-file": "^6.0.2",
         "cordova-plugin-media-capture": "^3.0.3",
         "cordova-plugin-media-capture": "^3.0.3",
-        "cordova-plugin-splashscreen": "^6.0.1",
         "cordova-plugin-webview-x5": "^0.3.2-alpha.1",
         "cordova-plugin-webview-x5": "^0.3.2-alpha.1",
         "cordova-plugin-whitelist": "^1.3.5"
         "cordova-plugin-whitelist": "^1.3.5"
       }
       }
@@ -256,26 +255,6 @@
         }
         }
       }
       }
     },
     },
-    "node_modules/cordova-plugin-splashscreen": {
-      "version": "6.0.1",
-      "resolved": "https://registry.npmmirror.com/cordova-plugin-splashscreen/-/cordova-plugin-splashscreen-6.0.1.tgz",
-      "integrity": "sha512-olJPBFRUuzunzeuB76TOBoq3yYlnhpWDk/S7ErR6MdqPz1KuK36omB9u4o//SdgfBbxHz+SsUtyvst68NrU3pA==",
-      "dev": true,
-      "engines": {
-        "cordovaDependencies": {
-          ">=4.0.0": {
-            "cordova-android": ">=3.6.0",
-            "cordova-windows": ">=4.4.0"
-          },
-          "2.0.0": {
-            "cordova-android": ">=3.6.0"
-          },
-          "7.0.0": {
-            "cordova": ">100"
-          }
-        }
-      }
-    },
     "node_modules/cordova-plugin-webview-x5": {
     "node_modules/cordova-plugin-webview-x5": {
       "version": "0.3.2-alpha.1",
       "version": "0.3.2-alpha.1",
       "resolved": "https://registry.npmmirror.com/cordova-plugin-webview-x5/-/cordova-plugin-webview-x5-0.3.2-alpha.1.tgz",
       "resolved": "https://registry.npmmirror.com/cordova-plugin-webview-x5/-/cordova-plugin-webview-x5-0.3.2-alpha.1.tgz",
@@ -1208,12 +1187,6 @@
       "integrity": "sha512-pVQOrNM7VAuVUMXibAlMGIArrftHPrRs4dUCoE+e2HEFUp3LmN3Yj539LjdUxcWmz/A/cHC65m9E3DS56YJhcg==",
       "integrity": "sha512-pVQOrNM7VAuVUMXibAlMGIArrftHPrRs4dUCoE+e2HEFUp3LmN3Yj539LjdUxcWmz/A/cHC65m9E3DS56YJhcg==",
       "dev": true
       "dev": true
     },
     },
-    "cordova-plugin-splashscreen": {
-      "version": "6.0.1",
-      "resolved": "https://registry.npmmirror.com/cordova-plugin-splashscreen/-/cordova-plugin-splashscreen-6.0.1.tgz",
-      "integrity": "sha512-olJPBFRUuzunzeuB76TOBoq3yYlnhpWDk/S7ErR6MdqPz1KuK36omB9u4o//SdgfBbxHz+SsUtyvst68NrU3pA==",
-      "dev": true
-    },
     "cordova-plugin-webview-x5": {
     "cordova-plugin-webview-x5": {
       "version": "0.3.2-alpha.1",
       "version": "0.3.2-alpha.1",
       "resolved": "https://registry.npmmirror.com/cordova-plugin-webview-x5/-/cordova-plugin-webview-x5-0.3.2-alpha.1.tgz",
       "resolved": "https://registry.npmmirror.com/cordova-plugin-webview-x5/-/cordova-plugin-webview-x5-0.3.2-alpha.1.tgz",

+ 1 - 3
package.json

@@ -16,7 +16,6 @@
     "cordova-android": "^9.1.0",
     "cordova-android": "^9.1.0",
     "cordova-plugin-file": "^6.0.2",
     "cordova-plugin-file": "^6.0.2",
     "cordova-plugin-media-capture": "^3.0.3",
     "cordova-plugin-media-capture": "^3.0.3",
-    "cordova-plugin-splashscreen": "^6.0.1",
     "cordova-plugin-webview-x5": "^0.3.2-alpha.1",
     "cordova-plugin-webview-x5": "^0.3.2-alpha.1",
     "cordova-plugin-whitelist": "^1.3.5"
     "cordova-plugin-whitelist": "^1.3.5"
   },
   },
@@ -24,8 +23,7 @@
     "plugins": {
     "plugins": {
       "cordova-plugin-whitelist": {},
       "cordova-plugin-whitelist": {},
       "cordova-plugin-webview-x5": {},
       "cordova-plugin-webview-x5": {},
-      "cordova-plugin-media-capture": {},
-      "cordova-plugin-splashscreen": {}
+      "cordova-plugin-media-capture": {}
     },
     },
     "platforms": [
     "platforms": [
       "android"
       "android"

BIN
res/screen/android/drawable-land-hdpi/screen.png


BIN
res/screen/android/drawable-land-ldpi/screen.png


BIN
res/screen/android/drawable-land-mdpi/screen.png


BIN
res/screen/android/drawable-land-xhdpi/screen.png


BIN
res/screen/android/drawable-land-xxhdpi/screen.png


BIN
res/screen/android/drawable-land-xxxhdpi/screen.png


BIN
res/screen/android/drawable-port-hdpi/screen.png


BIN
res/screen/android/drawable-port-ldpi/screen.png


BIN
res/screen/android/drawable-port-mdpi/screen.png


BIN
res/screen/android/drawable-port-xhdpi/screen.png


BIN
res/screen/android/drawable-port-xxhdpi/screen.png


BIN
res/screen/android/drawable-port-xxxhdpi/screen.png