我使用指南中的命令创建了项目:
vue init nativescript-vue/vue-cli-template <project-name>
Run Code Online (Sandbox Code Playgroud)
然后使用以下命令构建发行版APK:
tns build android --bundle --release --key-store-path ./my_key.jsk --key-store-password *** --key-store-alias key1 --key-store-alias-password ***
Run Code Online (Sandbox Code Playgroud)
但是,当我将APK上传到Google Play控制台时,出现此错误:
此版本不符合Google Play 64位要求
带有此页面的链接:https : //developer.android.com/distribute/best-practices/develop/64-bit。
如何构建与新要求兼容的发行版APK?
其他人说我应该添加ndk.abiFilters 'armeabi-v7a','arm64-v8a','x86','x86_64'到我的Gradle脚本中。那是我应该做的吗?到底在哪里?
我正在将 nativescript 与 vue.js 一起使用,并且正在尝试执行诸如 DOM 操作之类的操作。这是我的模板中的示例代码:
<Label textWrap="true">
<FormattedString id="formString"
backgroundColor="yellow"
effectiveHeight="100"
effectiveWidth="100%">
<Span text="This text has a " />
</FormattedString>
</Label>
Run Code Online (Sandbox Code Playgroud)
我想通过他的 id获取标签元素FormattedString - formString 在 javascript 中是这样的:
let fs = doument.getElementById('formString');
我怎样才能在 Nativescript-Vue 中做到这一点?我知道有库nativescript-dom,但我不想将整个库用于简单的 getById。
此时我要做的就是让项目运行。
我跑 tns run android
应用程序会生成,但是在启动应用程序时会引发错误
ReferenceError:未定义HTMLElement
因此,当我尝试引入新的nativescript主题核心(2.2.0)时,一切就开始了。我遵循了他们在多个地方发布的指南。一切看起来都很好。然后我跑tns run android了,第一次得到了HTMLElement未定义错误。
然后,我决定再次开始,从一个干净的项目开始。请按照此处的步骤操作:https://nativescript-vue.org/en/docs/getting-started/quick-start/
而且当我运行时,即使我根本没有修改模板,tns run android我仍然会得到相同的HTMLElement未定义错误。
我不知道这是一个错误还是我做错了什么
tns-版本6.1.2
节点-v 12.10.0
npm -v 6.10.3
所以无论现在我做什么我都会收到此错误...
就像我说的那样,代码明智的是,使用此模板存储库的干净提示获取此错误:https : //github.com/nativescript-vue/vue-cli-template
这是堆栈。
User-MacBook-Pro:hello-world user$ tns run android
Searching for devices...
Preparing project...
Bundling application for entryPath ./main...
File change detected. Starting incremental webpack compilation...
webpack is watching the files…
[BABEL] Note: The code generator has deoptimised the …Run Code Online (Sandbox Code Playgroud) 我正在尝试创建一个 Nativescript Vue 应用程序,在我的 Android 10 设备 (Samsung S10+) 上进行测试时,状态栏部分覆盖了操作栏。
即使在游乐场应用程序中也可以看到效果。
该问题可以通过删除 android 配置中的透明状态栏选项来解决。但这意味着状态栏的颜色不会是动态的。
有人遇到过这种情况吗?
当尝试在 2019 年 6 月遵循 NativeScript for Vue 快速入门:https://nativescript-vue.org/en/docs/getting-started/quick-start/ 时,Android SDK 版本为 29。
在命令$ tns run android --bundle或运行时tns doctor,我收到以下错误:You need to have the Android SDK Build-tools installed on your system. You can install any version in the following range: '>=23 <=28'是的,我也收到消息Your ANDROID_HOME environment variable is set and points to correct directory.,但当然它是版本 29,而不是'>=23 <=28'
其他 SO 响应似乎没有解决这个问题。
在这种情况下如何安装旧版本?
我想知道是否可以使用带有淡入淡出效果的 UIScrollView 与 nativescript 请?
例如:https : //medium.com/@luisfmachado/uiscrollview-with-fade-effect-246e332e8b24
我阅读了文档https://nativescript-vue.org/en/docs/elements/components/scroll-view/,但我没有找到这些信息。
我想要这个结果,例如:
你有什么想法吗?谢谢
我不知道如何将本机代码放入我的组件中
<template>
<ScrollView class="scroll" orientation="vertical" row="1" ref="scrollView">
<StackLayout marginLeft="10" marginRight="10" class="container-verses">
<StackLayout horizontalAlignment="center">
<Label textWrap="true" textAlignment="center" text="hello" color="#FFFFFF" fontSize="20"/>
...
<Label textWrap="true" textAlignment="center" text="hello" color="#FFFFFF" fontSize="20"/>
</StackLayout>
</StackLayout>
</ScrollView>
</template>
<script>
export default {
name : 'FadeScrollView',
computed: {},
methods : {
//
}
};
</script>
<style lang='scss' scoped>
</style>
Run Code Online (Sandbox Code Playgroud) 我正在使用 NativeScript-vue。
我想使用 WebView 在本地资源中显示 HTML 文件。
src/components/App.vue:
<template>
<Frame>
<Page>
<GridLayout columns="*" rows="*">
<WebView row="0" col="0" src="~/assets/index.html" />
</GridLayout>
</Page>
</Frame>
</template>
Run Code Online (Sandbox Code Playgroud)
src/main.ts:
import Vue from 'nativescript-vue';
import App from './components/App.vue';
new Vue({
render: h => h(App)
}).$start();
Run Code Online (Sandbox Code Playgroud)
src/assets/index.html:
<html>
<body>
<div>test</div>
</body>
</html>
Run Code Online (Sandbox Code Playgroud)
App_Resources/Android/src/main/AndroidManifest.xml:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="__PACKAGE__"
android:versionCode="10000"
android:versionName="1.0">
<supports-screens
android:smallScreens="true"
android:normalScreens="true"
android:largeScreens="true"
android:xlargeScreens="true"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.INTERNET"/>
<application
android:name="com.tns.NativeScriptApplication"
android:allowBackup="true"
android:icon="@drawable/icon"
android:label="@string/app_name"
android:theme="@style/AppTheme"
android:usesCleartextTraffic="true">
<activity
android:name="com.tns.NativeScriptActivity"
android:label="@string/title_activity_kimera"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize|smallestScreenSize|screenLayout|locale|uiMode" …Run Code Online (Sandbox Code Playgroud) 我想在nativescript-vue. 有没有可用的插件可以让我设计这样的布局并且它可以工作same as web <select>元素?我只是看着ListPicker组件,但它的布局不同。或者我怎样才能用ListPicker组件实现这样的布局?
任何帮助或建议将不胜感激。
任何人都可以帮忙吗?
我有这个一页应用程序来显示问题:
如果您修改一个字段,然后按顶部的“保存”,则更改的字段不会显示在控制台上...
<template>
<Page>
<ActionBar>
<Label text="SAVE" @tap="saveScreen()" />
</ActionBar>
<StackLayout>
<RadDataForm :source="person"/>
</StackLayout>
</Page>
</template>
<script>
export default {
data () {
return {
person: {
name: 'John',
age: 23,
email: 'john@company.com',
city: 'New York',
street: '5th Avenue',
streetNumber: 11,
},
};
},
methods: {
saveScreen() {
console.log('=======personName: ' + JSON.stringify(this.person))
}
}
}
</script>
<style>
</style>
Run Code Online (Sandbox Code Playgroud)
我意识到这几乎是一个基本问题,我在互联网上搜索了答案,但找不到...
在此先感谢您的帮助。问候,汉斯
Vuetify似乎是一个有用的框架。我想知道是否可以在带有 VUE.js 的 NativeScript 应用程序中使用它
我试过了 :
yarn add vuetify
<v-btn :href="source"
icon
large
target="_blank"
v-on="on"
>
<v-icon large>mdi-code-tags</v-icon>
</v-btn>
Run Code Online (Sandbox Code Playgroud)
但错误说:
没有元素 v-btn 的已知组件。
nativescript-vue ×10
nativescript ×9
android ×3
vue.js ×3
javascript ×2
build ×1
vuetify.js ×1