Error and build exception on Nativescript 1.7
See original GitHub issueBuild 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:
- Created 7 years ago
- Comments:5 (2 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Works like a charm 😃
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.