nativescript

How to use nativescript's WebView in angular2?

醉酒当歌 提交于 2019-12-01 08:25:44
问题 I'm trying to insert a web-view on my page and listen the 'loadFinishedEvent'... But for do this, i need to find the webview in my component (ts file), through nativescript way i need to wrap my xml (UI) with a tag: <Page xmlns="http://schemas.nativescript.org/tns.xsd But doing this i got this error: " TypeError: this.page.frame._getNavBarVisible is not a function ", and without the Page tag i've already tried with some ways but with unsuccessful... I do not found any sample of this too, can

NativeScript can't find Android SDK on Mac OS

孤街浪徒 提交于 2019-12-01 00:51:47
I've installed NativeScript and I try to do tns platform add android but it doesn't work. ANDROID_HOME path is correct and I have installed SDK (API 22 and the newest one) and tools (25.0.2). When I run tns doctor it says: WARNING: The Android SDK is not installed or is not configured properly. Cannot find a compatible Android SDK for compilation. To be able to build for Android, install Android SDK 22 or later. You need to have the Android SDK Build-tools installed on your system. You can install any version in the following range: '>=25.0.2'. You need to have Android SDK 22 or later and the

NativeScript can't find Android SDK on Mac OS

孤街醉人 提交于 2019-11-30 19:24:32
问题 I've installed NativeScript and I try to do tns platform add android but it doesn't work. ANDROID_HOME path is correct and I have installed SDK (API 22 and the newest one) and tools (25.0.2). When I run tns doctor it says: WARNING: The Android SDK is not installed or is not configured properly. Cannot find a compatible Android SDK for compilation. To be able to build for Android, install Android SDK 22 or later. You need to have the Android SDK Build-tools installed on your system. You can

Cannot find a compatible Android SDK for compilation when running `tns platform add android`

家住魔仙堡 提交于 2019-11-30 12:58:31
问题 I am following an official NativeScript tutorial and having a problem configuring my OS X environment for android development. When running tns platform add android I receive the following error: Cannot find a compatible Android SDK for compilation. To be able to build for Android, install Android SDK 21 or later. The tns doctor command also returns warnings on android-sdk issues: Cannot find a compatible Android SDK for compilation. To be able to build for Android, install Android SDK 21 or

Nativescript background-image fullscreen

风流意气都作罢 提交于 2019-11-30 09:46:38
I want to create app in Nativescript with fullscreen image on page. I have to use background-image: url('~/images/background.jpg'); . But how to make it full screen. Thanks for your help Brad Martin You need to use the NativeScript supported CSS properties to achieve this. I've used the following CSS on a background-image attached to the <Page> view before and it works fine. .coverImage { background-image: url('~/images/kiss.jpg'); background-repeat: no-repeat; background-position: center; background-size: cover; } If you want the Page to have a fullscreen image background, add your images to

Fetch Api:Can not get data from localhost

帅比萌擦擦* 提交于 2019-11-30 09:26:09
问题 I have been trying to create an android app using nativescript.I am using fetch module to get response from my server.When I am trying to get response from httpbin.org/get ,it is OK.But when I am trying to get response from my local server,I am getting Network Request Failed. error. Sending to httpbin.org/get- return fetchModule.fetch("https://httpbin.org/get").then(response => { return response.text(); }).then(function (r) { console.log(r); }, function (e) { console.log(e); }); Sending to

Nativescript android remove action bar

元气小坏坏 提交于 2019-11-30 08:09:53
I am trying to develop android app using Nativescript and try to remove Action Bar (top bar with "testns" title), but don't know how. I am using code below but not working. Currently using tns v.1.3.0 var frameModule = require("ui/frame"); exports.pageLoaded = function(){ var topmost = frameModule.topmost(); topmost.android.showActionBar = false; }; You can explicitly control the visibility of the ActionBar by setting the actionBarHidden property of the Page , look this: import {Page} from "ui/page"; export class AppComponent { constructor(page: Page) { page.actionBarHidden = true; } } Finally

Swift Version NativeScript

99封情书 提交于 2019-11-30 07:55:37
Using NativeScript how can I run a project under iOS? I get these messages when I run tns run iOS --bundle Webpack compilation complete. Watching for file changes. Webpack build done! Copying template files... Platform ios successfully added. v4.2.0 Executing before-shouldPrepare hook from /Users/Zian/Documents/Projects/NativeScript/Hybrid/hooks/before-shouldPrepare/nativescript-dev-webpack.js Preparing project... Executing before-prepareJSApp hook from /Users/Zian/Documents/Projects/NativeScript/Hybrid/hooks/before-prepareJSApp/nativescript-dev-webpack.js Installing pods... Analyzing

Cannot find a compatible Android SDK for compilation when running `tns platform add android`

混江龙づ霸主 提交于 2019-11-30 04:38:24
I am following an official NativeScript tutorial and having a problem configuring my OS X environment for android development. When running tns platform add android I receive the following error: Cannot find a compatible Android SDK for compilation. To be able to build for Android, install Android SDK 21 or later. The tns doctor command also returns warnings on android-sdk issues: Cannot find a compatible Android SDK for compilation. To be able to build for Android, install Android SDK 21 or later. Run $ android to manage your Android SDK versions. You need to have the Android SDK Build-tools

Nativescript localhost http call fails on iOS

拥有回忆 提交于 2019-11-29 18:44:58
I am using Nativescript sidekick cloud build on windows to test my app on iOS - I have also connected my iPhone. According to this post I am sending my http requests to localhost but they keep failing with this error. Http failure response for http://localhost:52553/api/rewards/all : 0 Unknown Error Error: Could not connect to the server. Here is my implementation of rewards service import { Injectable } from "@angular/core"; import { HttpClient } from "@angular/common/http"; import { Observable, of } from 'rxjs'; import { SimpleReward } from "../models/simple-reward"; import { take,