nativescript demo

liuyuqi-dellpc f4af2c6fcb go on 1 year ago
.vscode e5b9053b56 init 2 years ago
App_Resources e5b9053b56 init 2 years ago
app 09c438cb62 0 1 year ago
docs f4af2c6fcb go on 1 year ago
.editorconfig e5b9053b56 init 2 years ago
.gitignore e5b9053b56 init 2 years ago
CONTRIBUTING.md 84fd238b67 增加docs 1 year ago
README.md aa4ed576b8 0 1 year ago
jsconfig.json e5b9053b56 init 2 years ago
mkdocs.yml 84fd238b67 增加docs 1 year ago
nativescript.config.ts e5b9053b56 init 2 years ago
package-lock.json 388697a2b5 0 1 year ago
package.json 388697a2b5 0 1 year ago
requirements.txt 84fd238b67 增加docs 1 year ago
webpack.config.js e5b9053b56 init 2 years ago

README.md

nativescript-demo

Version Nativescript

  • gradle 6.4-all
  • build tools 3.6.4

nativescript类似于uniap,Convorda,实现 js+html 开发,打包为apk,ios等应用。

Usage


# Install dependencies
npm install

# Build for production
tns build <platform> --bundle

# Build, watch for changes and debug the application
tns debug <platform> --bundle

# Build, watch for changes and run the application



npm install nativescript@6.5.1 -g
npm remove -g nativescript

ns create demo1 --appid "me.yoqi.nativescript.demo1"

ns run android
ns run <platform> --bundle

ns build android
# /workspace/mobile/nativescript-demo/platforms/android/app/build/outputs/apk/debug/app-debug.apk

tns plugin remove nativescript-geolocation@4.5.0
tns plugin add nativescript-geolocation@3.0.1


tns run android
tns debug android --start

安装插件

tns plugin add nativescript-geolocation

使用:

var geolocation=require("nativescript-geolocation")

程序入口:

"main": "app/app.js",