error:
:buildMetadata
Exception in thread "main" java.lang.IllegalArgumentException: Class android.support.v7.widget.AppCompatCheckedTextView conflict: C:\Git\nativescript-cli-tests\TNS_App\platforms\android\build\intermediates\exploded-aar\com.android.support\appcompat-v
7\23.1.1\jars\classes.jar and C:\Git\nativescript-cli-tests\TNS_App\platforms\android\build\intermediates\exploded-aar\com.android.support\appcompat-v7\22.2.1\jars\classes.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
problem:
Two .jar files:
android.support.v7.widget.AppCompatCheckedTextViewexplanation:
With new metadata generator we fail the gradle build instead of Skip-ing errors.
This scenario happens when there are two libraries different only in their version:
build/intermediates/exploded-aar/ folder..jar files and these .jar files are passed to the metadata generator..jar files contain the same types, the metadata generator blows up.Solutions:
.aar files that come from plugins not downloaded from jcenter or maven)exploded-aar folderping @rosen-vladimirov We agreed on the second approach.
This problem is very simple to reproduce. When there is an update of the template gradle file and you try to build again without using the gradle clean command, there will be some leftover exploded-aar files that will come into conflict with each other.
This problem has an easy solution:
It will be the developer's job to keep in mind that he needs to do a gradle clean in the platforms/android folder (later on it will be available through CLI), after he changed the native project's dependency configuration in some way.
example:
compile "com.android.support:appcompat-v7:19.0.0"
compile "com.android.support:appcompat-v7:23.0.0"
tns clean android, but for now you need to go to the platforms/android folder open a cmd there and execute gradlew cleanEDIT: iOS doesn't need clean command, which is a problem featurewise.
As a temporary solution, I've removed the android platform and added again later.
It's quite faster than I was expecting and worked beautifully.
tns platform remove android
tns platform add android
After that, you are good to go 馃槃
Most helpful comment
As a temporary solution, I've removed the android platform and added again later.
It's quite faster than I was expecting and worked beautifully.
After that, you are good to go 馃槃