question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error and build exception on Nativescript 1.7

See original GitHub issue

Build failed with an exception

:cleanLocalAarFiles
:ensureMetadataOutDir
:collectAllJars
:buildMetadata
Exception in thread "main" java.lang.IllegalArgumentException: Class com.google.android.gms.ads.formats.NativeAd$Image conflict: /Users/macbook/apptest/platforms/android/build/intermediates/exploded-aar/com.google.android.gms/play-services-ads/7.5.0/jars/classes.jar and /Users/macbook/apptest/node_modules/nativescript-local-notifications/node_modules/nativescript-plugin-google-play-services/platforms/android/google-play-services_lib/libs/google-play-services.jar
    at com.telerik.metadata.ClassRepo.cacheJarFile(ClassRepo.java:21)
    at com.telerik.metadata.Builder.build(Builder.java:38)
    at com.telerik.metadata.Generator.main(Generator.java:44)
:buildMetadata FAILED

* What went wrong:
Execution failed for task ':buildMetadata'.
> Process 'command '/Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home/bin/java'' finished with non-zero exit value 1

Using: Nativescript 1.7.1 Android 5.1

Extra modules: nativescript-admob lodash

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
MiroValchevcommented, Apr 28, 2016

Works like a charm 😃

0reactions
EddyVerbruggencommented, Apr 27, 2016

I think this was releated to the length of the cloned project folder name. When creating a new NativeScript app with the name nativescript-local-notifications-demo the CLI will not allow it. But when cloning the repo you won’t get that warning. So I’ve explicitly mentioned that in the readme of the demo app.

What also might have been the case is that the Google Play Services library was causing problems. I’ve just released 1.0.2 to npm which should no longer bother you.

Please test with a fresh CLI project to verify these changes.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error Handling - NativeScript Docs
Learn how to handle errors in NativeScript core modules, how to define custom error ... (development mode) Throw exceptions as soon as an...
Read more >
Android Build Error · Issue #533 · NativeScript/android-runtime
Whenever I try to build or run an android project I usually run into this problem. FAILURE: Build failed with an exception.
Read more >
nativescript - Execution failed for task - Stack Overflow
I found that the error was caused by this package : "nativescript-google-maps-sdk". Maybe one of the only that i havn't uninstall to see...
Read more >
@nativescript/core | Yarn - Package Manager
This repo contains the NativeScript command-line interface, which lets you create, build, and run apps using NativeScript. The CLI is written in TypeScript....
Read more >
NativeScript Error After Xcode Update - YouTube
Updating software is sometimes (most of the time these days) a scary thing. You never know if there will be incompatibilities that will ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found