0

I'm building a NativeScript app. For implementing Drawer, I'm trying to use 'Telerik NativeScript UI' plugin. But, something is not working after installing the plugin & my NativeScript build is getting failed.

Here are 2 screenshots of the build failed.

enter image description here

enter image description here

My package.json file content

{
  "description": "NativeScript Application",
  "license": "SEE LICENSE IN <your-license-filename>",
  "readme": "NativeScript Application",
  "repository": "<fill-your-repository-here>",
  "nativescript": {
    "id": "org.nativescript.testapp",
    "tns-android": {
      "version": "2.0.0"
    }
  },
  "dependencies": {
    "@angular/common": "2.0.0-rc.1",
    "@angular/compiler": "2.0.0-rc.1",
    "@angular/core": "2.0.0-rc.1",
    "@angular/platform-browser": "2.0.0-rc.1",
    "@angular/platform-browser-dynamic": "2.0.0-rc.1",
    "@angular/platform-server": "2.0.0-rc.1",
    "@angular/router-deprecated": "2.0.0-rc.1",
    "nativescript-angular": "0.1.1",
    "nativescript-telerik-ui": "^1.1.1",
    "tns-core-modules": "^2.0.0"
  },
  "devDependencies": {
    "babel-traverse": "6.9.0",
    "babel-types": "6.10.2",
    "babylon": "6.8.1",
    "filewalker": "0.1.2",
    "lazy": "1.0.11",
    "nativescript-dev-typescript": "^0.3.2",
    "typescript": "^1.8.10"
  }
}

My NativeScript CLI version is 2.0.1

Any idea, what's probably going wrong ?

-------It's fixed-------

The solution is, after getting the error..

  • Don't remove the plugin

  • Remove the platform(android/ios)

  • Add the platform once again(android/ios)

  • Rebuild the app

Vladimir Amiorkov
  • 2,652
  • 3
  • 17
  • 35
Suresh
  • 5,687
  • 12
  • 51
  • 80

2 Answers2

3

Try

platform remove android

and then

platform add android
tns run android 
Aaron Ullal
  • 4,855
  • 8
  • 35
  • 63
  • Thanks for the quick reply. I did that & recovered my old state. But, what's the issue with the plugin? I want 'Drawer' functionality in my app & I think that's the single plugin which can do the job. – Suresh Jun 21 '16 at 15:25
  • Thanks for the guide. – Suresh Jun 22 '16 at 03:19
0

I have had this issue every time I try to add a new plugin to nativescript (e.g the phone, telerik-UI, and contact plugins). What worked for me was just navigating into platform > android and then running gradlew clean. This way you wouldn't have to re-add the android platform every time you add a plugin.

  • Thanks for the reply. I never tried that one. Next time , I'll do. But, I'd fixed my problem by - adding platform again rather than removing platform & adding platform. But, even if that seems like Telerik NativeScritp UI has some error in it because of which it's not working with AngularJS2 & TypeScript. Now, waiting for the new release of the plugin. – Suresh Jun 30 '16 at 03:13
  • Glad to hear that you managed to fix your problem. I have found a lot of plugins for Nativescript to be very hit or miss as to whether they work as intended. I myself am running into issues in other areas related to plugins as well. Good luck! – brandon-thimmesch Jul 01 '16 at 19:27