Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

include.gradle file generated from the @progress archive package creates issues #191

Closed
joey0xx opened this issue May 19, 2017 · 8 comments
Labels

Comments

@joey0xx
Copy link

joey0xx commented May 19, 2017

Did you verify this is a real problem by searching Stack Overflow?

Yes

Tell us about the problem

When building a project I get the following error:
Flavor 'nativescript-telerik-ui' has unknown dimension 'nativescript-telerik-ui'.

It only happens when I install the package from the @progress scope. When I install it from a local .tgz file it builds without any issues.

I researched a bit and found out that the include.gradle is associated with this error so I installed the package from the @progress scope and from a local .tgz file and compared the include.gradle files.

The contents of the include.gradle file from the package in the @progress scope looks like this:

android {
	productFlavors {
		"nativescript-telerik-ui" {
			dimension "nativescript-telerik-ui"
		}
	}
}

And the contents of the include.gradle file from the package in the local .tgz file looks like this:

android {
	productFlavors {
		"F6" {
			dimension "nativescripttelerikuipro"
		}
	}
}

So I replaced the include.gradle generated from the @progress scope with the latter and it got past that error.

Update* Read in the following url that when the plugin doesnt have the inlcude.gradle file, at build time gradle generates a default one with default elements:
https://docs.nativescript.org/plugins/plugins#includegradle-specification

It seems like that i sthe case and for some reason its throwing the error.

Which platform(s) does your issue occur on?

Android

Please provide the following version numbers that your issue occurs with:

  • **Progress NativeScript UI version: 2.0.1

  • **CLI: 3.0.0

  • **Cross-platform modules: 3.0.0

  • **Runtime(s): tns-android: 3.0.0 and tns-ios: 2.5.0

  • **Other Plugin(s):

"dependencies": {
    "@angular/animations": "^4.1.1",
    "@angular/common": "^4.1.1",
    "@angular/compiler": "^4.1.1",
    "@angular/compiler-cli": "^4.1.1",
    "@angular/core": "^4.1.1",
    "@angular/forms": "^4.1.1",
    "@angular/http": "^4.1.1",
    "@angular/platform-browser": "~4.1.1",
    "@angular/router": "~4.1.1",
    "@progress/nativescript-telerik-ui-pro": "^2.0.1",
    "bootstrap": "3.3.7",
    "email-validator": "1.0.4",
    "nativescript-angular": "~3.0.0",
    "nativescript-bottombar": "^2.0.1",
    "nativescript-cardview": "^2.0.0-rc.0",
    "nativescript-fresco": "^3.0.2",
    "nativescript-hockey-sdk": "^1.1.0",
    "nativescript-mapbox": "^2.5.3",
    "nativescript-ngx-fonticon": "^2.0.0",
    "nativescript-social-share": "1.3.1",
    "nativescript-theme-core": "~1.0.2",
    "nativescript-unit-test-runner": "^0.3.3",
    "reflect-metadata": "^0.1.8",
    "rxjs": "^5.0.1",
    "tns-core-modules": "^3.0.0",
    "typescript": "^2.3.2"
  },
  "devDependencies": {
    "zone.js": "^0.8.4",
    "babel-traverse": "6.8.0",
    "babel-types": "6.8.1",
    "babylon": "6.8.0",
    "codelyzer": "0.0.28",
    "filewalker": "0.1.2",
    "jasmine-core": "^2.4.1",
    "karma": "^1.2.0",
    "karma-jasmine": "^1.0.2",
    "karma-nativescript-launcher": "^0.4.0",
    "lazy": "1.0.11",
    "nativescript-dev-typescript": "^0.3.2",
    "tslint": "^3.14.0",
  }

Please tell us how to recreate the issue in as much detail as possible.

  1. create a new hello world app: tns create HelloWorld --template nativescript-template-ng-tutorial
  2. use the command npm login --registry=https://registry.npm.telerik.com/ --scope=@progress to log in if you're a paying customer.
  3. use the command npm install --save @progress/nativescript-telerik-ui-pro to install the plugin
  4. use tns run android

Is there code involved? If so, please share the minimal amount of code needed to recreate the problem.

Nope.

@VladimirAmiorkov
Copy link
Contributor

Hi @joey0xx ,

Thank you for bringing this to our attention. We are going to review it as soon as possible and update you regarding its status, but from what I currently see there is some incorrect "parameters" passed to the 'pro' version of the plugin stored to the @progress scope.

We apologize for any inconvenience that this is causing.

@jvelezc
Copy link

jvelezc commented May 20, 2017

+1 same error.

@nalrodriguez
Copy link

+1 , having the same problem.

@ginev
Copy link
Contributor

ginev commented May 22, 2017

Hi @joey0xx, @jvelezc and @nalrodriguez,

There seems to be a problem with tns build android/tns run android and plugins that are scoped which we will investigate. For the time being, you can easily overcome this by placing the nativescript-telerik-ui-pro folder out of @progress in node_modules at the same level with the other modules. This fixes it for me.

@Jaishankarb
Copy link

+1 same error.

@NickIliev
Copy link
Collaborator

related to NativeScript/nativescript-cli#2837

@dtopuzov
Copy link

dtopuzov commented Jun 9, 2017

@joey0xx, @jvelezc, @nalrodriguez
We have a fix in CLI and Android Runtime that should solve the problem, can you please try with:

npm un -g nativescript
npm cache clean
npm i -g nativescript@next
tns platform remove android --path <Your Project>
tns platform add android@next --path <Your Project>
rm -rf <Your Project>/platforms
rm -rf <Your Project>/node_modules
tns run android

@joey0xx
Copy link
Author

joey0xx commented Jun 11, 2017

Thank you this fixes it for me. Though I did have a minor problem because I had the local .tgz dependency installed and after installing from the @progress I tried making it work by adding the reference to the library in the tsconfig.json file so that I dont have to change the import path from lets say "nativescript-telerik-ui-pro/sidedrawer" to "@progress/nativescript-telerik-ui-pro/sidedrawer"

"paths": {
            "*": [
                "./node_modules/@progress/*"
            ]
}

After doing that I was getting an error after running the build in the emulator saying couldn't find the module "nativescript-telerik-ui-pro/sidedrawer/angular". Thought it was maybe I had to add a reference to the android.d.ts and ios.d.ts in the reference.d.ts files but then I had another error:

node_modules/@progress/nativescript-telerik-ui-pro/ios.d.ts(342,2): error TS1070: 'public' modifier cannot appear on a type member.

node_modules/@progress/nativescript-telerik-ui-pro/ios.d.ts(6821,15): error TS2420: Class 'TKDataSource' incorrectly implements interface 'TKAutoCompleteDataSource'.
  Property 'currentCompletionMode' is missing in type 'TKDataSource'.

TypeScript compiler failed with exit code 1

While it works without a problem by simply changing the import paths to include @progress, would've been nice to have the reference in the tsconfig.json and get it to work like that.

Thank you for your hard work. @VladimirAmiorkov @ginev @dtopuzov

@ginev ginev closed this as completed Jul 12, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

8 participants