Cordova
D:\Cordova\HCClient>node -v
v14.16.1
D:\Cordova\HCClient>npm -v
6.14.12
D:\Cordova>npm uninstall cordova -g
removed 594 packages in 9.332s
D:\Cordova>npm install cordova -g
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm WARN deprecated uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
C:\Users\Administrator\AppData\Roaming\npm\cordova -> C:\Users\Administrator\AppData\Roaming\npm\node_modules\cordova\bin\cordova hello-world-ef13abd8 (168ms)
+ cordova@10.0.0
added 491 packages from 258 contributors in 80.729s
Project
D:\Cordova\HCClient>cordova plugin add cordova-plugin-inappbrowser
Installing "cordova-plugin-inappbrowser" for android
Adding cordova-plugin-inappbrowser to package.json
D:\Cordova\HCClient>
D:\Cordova\HCClient>
D:\Cordova\HCClient>
D:\Cordova\HCClient>cordova plugin ls
cordova-plugin-inappbrowser 5.0.0 "InAppBrowser"
cordova-plugin-whitelist 1.3.5 "Whitelist"
Android 9.0
D:\Cordova\HCClient\www\js\index.js
document.addEventListener('deviceready', onDeviceReady, false);
function onDeviceReady() {
console.log('Running cordova-' + cordova.platformId + '@' + cordova.version);
document.getElementById('deviceready').classList.add('ready');
cordova.InAppBrowser.open('http://192.168.1.100:9000/', '_blank', 'location=no');
}
Deploy
(isp) D:\Cordova\HCClient>cordova build android --debug
Checking Java JDK and Android SDK versions
ANDROID_SDK_ROOT=D:\SDK\android\SDK (recommended setting)
ANDROID_HOME=D:\SDK\android\SDK (DEPRECATED)
Using Android SDK: D:\SDK\android\SDK
Subproject Path: CordovaLib
Subproject Path: app
Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.5/userguide/command_line_interface.html#sec:command_line_warnings
BUILD SUCCESSFUL in 2s
40 actionable tasks: 2 executed, 38 up-to-date
Built the following apk(s):
D:\Cordova\HCClient\platforms\android\app\build\outputs\apk\debug\app-debug.apk```
|