Firebase plug-in Installation Issue


Hello there,

after I create brand-new myApp --ng, I have a nice nativescript app project create with ng2-ish setup. nice, however, follow, i have plug-in installed with no error, and a setup.json file also generated as well. went to firebase and generated 2 project tokens, one for android another for ios. added both token files to their respective folder under appresource, import firebase and init firebase in main.ts file. from here, then I hit tns build android and failed with below error:

Running incremental build
?[1m> Building 60% > :asbg:runAstParser?[22m?[35Dfinished with reading lines with js files
?[1m> Building 60% > :asbg:runAstParser?[22m?[35D?[1m> Building 60%?[22m?[0K?[14D?[1m> Building 61% > :asbg:generateBindings?[22m?[39D:asbg:generateBindings?[0K
Exception in thread “main”
?[1m> Building 61% > :asbg:generateBindings?[22m?[39D?[1A?[ File already exists. This may lead to undesired behavior.
Please change the name of one of the extended classes.
at org.nativescript.staticbindinggenerator.Generator.writeBindings(
at org.nativescript.staticbindinggenerator.Main.main(
:asbg:generateBindings ?[33mFAILED?[39m

?[31mFAILURE: ?[39m?[31mBuild failed with an exception.?[39m

  • Where:
    Build file ‘C:\xxxxxxxxx\Projects\TNS\ng4-cocapp\platforms\android\build-tools\android-static-binding-generator\build.gradle’ line: 251

  • What went wrong:
    Execution failed for task ‘:asbg:generateBindings’.
    ?[33m> ?[39mProcess ‘command ‘C:\Program Files\Java\jdk1.8.0_131\bin\java.exe’’ finished with non-zero exit value 1




after dig a bit - I installed a newer version of the firebase-plugin. removed android platform folder completely and re-build the project, I get a positive sign of building has been successed.

however, when I try to push code to device, i am having new issue underneath. W/System.err(22256), no idea what is this trying to tell me… any idea?

here is the console log:
Successfully transferred all files.
Refreshing application…
Successfully synced application org.nativescript.cocappn on device 7acf5a17.

Executing before-watch hook from C:\Users\canklw\Desktop\SAS\Projects\TNS\cocapp-ng\hooks\before-watch\nativescript-dev-typescript.js
Found peer TypeScript 2.2.2
D/JS: AssetExtraction(22256): Can’t remove previously installed assets in /data/data/org.nativescript.cocappn/files/app
D/JS: AssetExtraction(22256): Can’t remove previously installed assets in /data/data/org.nativescript.cocappn/files/internal
D/JS: AssetExtraction(22256): Can’t remove previously installed assets in /data/data/org.nativescript.cocappn/files/snapshots/armeabi-v7a
2:28:34 PM - Compilation complete. Watching for file changes.

JS: firebase init done
W/System.err(22256): at com.tns.Runtime.callJSMethodNative(Native Method)
W/System.err(22256): at com.tns.Runtime.dispatchCallJSMethodNative(
W/System.err(22256): at com.tns.Runtime.callJSMethodImpl(
W/System.err(22256): at com.tns.Runtime.callJSMethod(
W/System.err(22256): at com.tns.Runtime.callJSMethod(
W/System.err(22256): at com.tns.Runtime.callJSMethod(


never mind, I found the errors are irrelevant to the actual issue. please ignore the issue here.


This is helpful to me, as I just hit this problem myself. I’ll follow your lead!


Hello Jen, I am able to go over all the issues, however, its been doing
here and there and I already forget how I made it through. so far
everything is going as expected. also, I added firebase push service add-on
to your getservice from firebase. was so sure why you use zone, and why you
are not use angularfire2. can you explain that? I was using af2 for ionic
apps, was pretty decent.


you can’t use AngularFire in a NativeScript app, you would want to use Eddy’s plugin. AF2 is expecting DOM manipulation