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

Build failing on android with 2.4.0 #3139

Closed
40x opened this issue Nov 22, 2016 · 13 comments
Closed

Build failing on android with 2.4.0 #3139

40x opened this issue Nov 22, 2016 · 13 comments
Labels

Comments

@40x
Copy link

40x commented Nov 22, 2016

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

Yes

Tell us about the problem

Build is failing on android after update

Which platform(s) does your issue occur on?

Android

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

This is the package.json file that I have:

"nativescript": {
    "id": "io.egen.protec",
    "tns-ios": {
      "version": "2.4.0"
    },
    "tns-android": {
      "version": "2.4.0"
    }
  },
  "dependencies": {
    "@angular/common": "2.0.0",
    "@angular/compiler": "2.0.0",
    "@angular/core": "2.0.0",
    "@angular/http": "2.0.0",
    "@angular/platform-browser": "2.0.0",
    "@angular/platform-browser-dynamic": "2.0.0",
    "@angular/platform-server": "2.0.0",
    "@angular/router": "3.0.0",
    "email-validator": "^1.0.7",
    "lodash": "^4.16.6",
    "nativescript-angular": "1.0.0",
    "nativescript-background-http": "^2.4.0",
    "nativescript-camera": "0.0.8",
    "nativescript-drop-down": "^1.4.0",
    "nativescript-email": "^1.3.3",
    "nativescript-imagepicker": "^2.4.1",
    "nativescript-iqkeyboardmanager": "^1.0.1",
    "nativescript-ng2-fonticon": "^1.3.3",
    "nativescript-permissions": "^1.2.1",
    "nativescript-phone": "^1.2.3",
    "nativescript-social-share": "^1.3.1",
    "nativescript-swiss-army-knife": "^1.0.71",
    "nativescript-telerik-ui-pro": "^1.4.1",
    "reflect-metadata": "0.1.8",
    "rxjs": "5.0.0-beta.12",
    "tns-core-modules": "^2.4.0"
  },
  "devDependencies": {
    "babel-traverse": "6.9.0",
    "babel-types": "6.9.0",
    "babylon": "6.8.0",
    "filewalker": "0.1.2",
    "lazy": "1.0.11",
    "nativescript-dev-typescript": "^0.3.2",
    "typescript": "^2.0.10",
    "zone.js": "0.6.21"
  }

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

This is the console output

:asbg:runAstParser
Running full build
finished with reading lines with js files
Warning: there already is an extend called com.tns.NativeScriptActivity.
Warning: there already is an extend called com.tns.FragmentClass.
:asbg:generateBindings
:mergeF0F1F2F3F4F5DebugShaders
:compileF0F1F2F3F4F5DebugShaders
:generateF0F1F2F3F4F5DebugAssets
:mergeF0F1F2F3F4F5DebugAssets
:generateF0F1F2F3F4F5DebugResValues
:generateF0F1F2F3F4F5DebugResources
:mergeF0F1F2F3F4F5DebugResources
:processF0F1F2F3F4F5DebugManifest
:processF0F1F2F3F4F5DebugResources FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':processF0F1F2F3F4F5DebugResources'.
> Error: more than one library with package name 'com.telerik.android.data'

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 30.926 secs
Command /Users/xyz/abc/platforms/android/gradlew failed with exit code 1

Not sure if related, but I started seeing this warning message for both ios and android

Could not find folder: /Users/xyz/abc/platforms/ios/protec/app/tns_modules/tns-core-modules
@tsonevn
Copy link
Contributor

tsonevn commented Nov 22, 2016

Hi @NgSculptor,
Try to upgrade the dependencies in your project package.json file as following the below-attached code snippet.

{
  "description": "NativeScript Application",
  "license": "SEE LICENSE IN <your-license-filename>",
  "readme": "NativeScript Application",
  "repository": "<fill-your-repository-here>",
  "nativescript": {
    "id": "org.nativescript.sample3139"
  },
  "dependencies": {
    "@angular/common": "2.1.2",
    "@angular/compiler": "2.1.2",
    "@angular/core": "2.1.2",
    "@angular/forms": "2.1.2",
    "@angular/http": "2.1.2",
    "@angular/platform-browser": "2.1.2",
    "@angular/platform-browser-dynamic": "2.1.2",
    "@angular/router": "3.1.2",
    "nativescript-angular": "1.1.3",
    "nativescript-theme-core": "^0.2.1",
    "reflect-metadata": "~0.1.8",
    "rxjs": "5.0.0-beta.12",
    "tns-core-modules": "2.4.0"
  },
  "devDependencies": {
    "nativescript-dev-android-snapshot": "^0.*.*",
    "nativescript-dev-typescript": "^0.3.2",
    "typescript": "^2.0.10",
    "zone.js": "~0.6.21"
  }
}

Delete node_modules, platforms, hooks folders and clear npm cache npm cache clear. Then rebuild your project with tns run android.

Hope this helps.

@40x
Copy link
Author

40x commented Nov 22, 2016

@tsonevn still getting the same error. I already tried what you have mentioned above, just copy pasted your package.json file just to be sure.

@40x
Copy link
Author

40x commented Nov 22, 2016

@tsonevn I also noticed that the TS files are not longer compiled into JS files. Looks like something else is also messed up. Im using the package.json that you specified

@NathanaelA

This comment was marked as abuse.

@40x
Copy link
Author

40x commented Nov 22, 2016

@NathanaelA Just to confirm, you are not having any issues with Android builds? Can you share your dependencies?

@NathanaelA

This comment was marked as abuse.

@NathanaelA

This comment was marked as abuse.

@40x
Copy link
Author

40x commented Nov 23, 2016

@NathanaelA I am on v4.4.5, the only solution for me right now was to revert to 2.3.0

@NathanaelA

This comment was marked as abuse.

@tsonevn
Copy link
Contributor

tsonevn commented Nov 24, 2016

Hi @NgSculptor ,

I research further this problem and found that this problem could be caused due to haveing nativescript-imagepicker and nativescript-telerik-ui plugins in the same time in your project. The image picker plugin has a dependency for nativescript-telerik-ui, because RadListView component has been used in the plugin. Regarding to that, could you verify, whether removing ``nativescript-imagepicker` will resolve your problem with building the application for android. We will investigate this problem deeper and will provide possible solution for using the both plugin in the same time. You should also upgrade the dependencies in your example by following the given code snippet from my previous comment.

Regards,
@tsonevn

@NathanaelA

This comment was marked as abuse.

@enchev
Copy link
Contributor

enchev commented Nov 25, 2016

This issue was moved to NativeScript/nativescript-cli#2258

@enchev enchev closed this as completed Nov 25, 2016
@lock
Copy link

lock bot commented Aug 29, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked and limited conversation to collaborators Aug 29, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants