DEV-Android | DEV Community Android App
kandi X-RAY | DEV-Android Summary
kandi X-RAY | DEV-Android Summary
This is the official repository for the dev.to's Android app.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of DEV-Android
DEV-Android Key Features
DEV-Android Examples and Code Snippets
Community Discussions
Trending Discussions on DEV-Android
QUESTION
I am trying to use the Angular's HttpClient
in my Nativescript application
but when I import it in my component I get Error: Trying to link invalid 'this' to a Java object
...Update
I also tried adding this in the Groceries example without changing anything else and it doesn't work
ANSWER
Answered 2017-Nov-11 at 22:59I ran into the same problem and it seems that I found the solution. The basic problem in Nativescript with Angular's http module seems to be that it overwrites the global.__extends function upon importing it the first time.
Importing NativeScriptHttpClientModule first (in app.module.ts) should fix this.
Since it does not help for your check if your nativescript-angular module is up-to-date or you could replicate its solution by hand:
QUESTION
I'm trying to create a new 2.5 project with typescript.
tns info says 2.5.3 for NS and 2.5.2 for tns-core-modules.
tns create test --template tsc
When I compile, I get the following error:
`
Executing before-prepare hook from C:\Users\pc\nativescript\sd4\hooks\before-prepare\nativescript-dev-android-snapshot.js Executing before-prepare hook from C:\Users\pc\nativescript\sd4\hooks\before-prepare\nativescript-dev-typescript.js Found peer TypeScript 2.2.2 app/app.ts(8,22): error TS2307: Cannot find module 'application'.
app/bundle-config.ts(1,11): error TS2304: Cannot find name 'global'.
app/bundle-config.ts(3,5): error TS2304: Cannot find name 'require'.
app/bundle-config.ts(6,5): error TS2304: Cannot find name 'global'. app/bundle-config.ts(6,46): error TS2304: Cannot find name 'require'.
app/main-page.ts(8,22): error TS2307: Cannot find module 'ui/page'.
app/main-view-model.ts(23,18): error TS2339: Property 'notifyPropertyChange' does not exist on type 'HelloWorldModel'.
`
...ANSWER
Answered 2017-May-23 at 11:59Here are the steps to create a project with the old template and using NativeScript 2.5.x
QUESTION
I've been seeing this for the last couple of days -
Project successfully prepared (android)
Executing after-prepare hook from C:\App\mobile-app\hooks\after-prepare\nativescript-dev-android-snapshot.js
Executing after-prepare hook from C:\App\mobile-app\hooks\after-prepare\nativescript-dev-sass.js
First call of getPlatformData without providing projectData.
So far, I've tried th following -
Removing/adding nativescript-sass
Uninstalling/installing/udating nativescript
Reverting project to a point where I know it was working for sure
It also complains about "+-- UNMET PEER DEPENDENCY nativescript-angular@1.2.0", so tried installing it, but in turn complainss about "UNMET PEER DEPENDENCY zone.js@^0.6.21", which didn't install either
Sure that it was a problem with my setup, I reinstaled everything. Then I reset windows and installed everything
Any help appreciated.
Thanks, Sid.
...ANSWER
Answered 2017-May-17 at 13:36In my case, I had NativeScript 3.0.1 installed, and I was trying to build my project that was written for NativeScript 2.5. Once I uninstalled 3.0.1 and reinstalled 2.5, this error went away.
QUESTION
Updated to v3 and get the following error:
...ANSWER
Answered 2017-May-05 at 18:11just got stuck on this with clean --ng project, I guess they need to optimize package.json that comes with the project as it fails to run.
I traced issue to tns-core-modules and found this issue on github that leaded me to only update my package.json version ov nativescript-angular to latest v3
"nativescript-angular": "3.0.0",
Found example here which I compared with mine: https://github.com/NativeScript/NativeScript/issues/4113
I left everything else as it is and the app is building now. let me know if it works for you. Davor
QUESTION
Did something significant change in version 2.5.0 of Nativescript?
Resulting from an error of my own doing. I accidentally uninstalled Nativescript through negligence and reinstalled it bringing my version from 2.4.1 (I believe) to 2.5.0. In the process I corrupted my working file.
Building a new one seems to work fine, but 2.5.0 has brought enough changes (to the app/package.json
file perhaps) that I can't install the nativescript-plugin-firebase
plugin. It just hangs like in the picture starting the installation but without the console.log information which was typical. See picture.
without finishing the build no matter if it is installed through nativescript CLI or by setting it as a dependency in the root/package.json
file. One thing I noticed is that tns build android would update the version to 2.5.0 as well.
I've even tried setting the entire package.json
file to be the versions that I used before and using tns update to set the nativescript version.
Is there a way I can reinstall Nativescript 2.4.1 as my principal install?
It seems that the plugin itself installs everything, but not the files in the scripts folder. They never prompt me to create the firebase.nativescript.json
file either.
Here is the current package.json file after running tns create [MYAPP] --ng
root/package.json
ANSWER
Answered 2017-Feb-07 at 02:39The "firebase plugin hangs" issue seems to be tripped by the new NativeScript 2.5 CLI not handling the firebase plugin prompting the user for config options.
You can find backstory on Github Issue for the plugin.
The quick workaround is create a firebase.nativescript.json
file at the root of your project, and enable the features you'd like. For example, I just use android and google_auth, so mine looks like this:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install DEV-Android
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page