sitefinitysteve / nativescript-google-analytics

Apache License 2.0
23 stars 14 forks source link

Attribute application@appComponentFactory value=XXX from [XXX] is also present at [XXX] #50

Open Jaroslav84 opened 4 years ago

Jaroslav84 commented 4 years ago

Building app produces the following gradle error:

Attribute application@appComponentFactory value=(android.support.v4.app.CoreComponentFactory) from [com.android.support:support-compat:28.0.0] AndroidManifest.xml:22:18-91
        is also present at [androidx.core:core:1.0.0]

As suggested I added this into AndroidManifest.xml:

<manifest xmlns:android="http://schemas.android.com/apk/res/android" 
    xmlns:tools="http://schemas.android.com/tools">

<application tools:replace="android:appComponentFactory"
        android:appComponentFactory="androidx>

...but it did not help.

I have a new error:

Execution failed for task ':app:transformClassesWithMultidexlistForDebug'.
> com.android.build.api.transform.TransformException: Error while generating the main dex list:
  Error while merging dex archives: 
  Learn how to resolve the issue at https://developer.android.com/studio/build/dependencies#duplicate_classes.
  Program type already present: android.support.v4.app.INotificationSideChannel$Stub$Proxy

I do use multiDexEnabled true so I don't know why it's crying about duplicate classes.

tns-android v5.2.1 minSDK 17 targetSdkVersion 28 (28.0.0)