adjust / react_native_sdk

This is the React Native SDK of
http://www.adjust.com
MIT License
126 stars 68 forks source link

Program type already present #161

Open MuhammedAlmaz opened 2 years ago

MuhammedAlmaz commented 2 years ago

I checked all dependency on my packages but there is not any package which using react-native-adjust. I tried force only one time implement the dependency with this code block but it doesn't work already.

Force implementation code;

    configurations.all {
        resolutionStrategy {
            force  group: 'com.adjust.sdk', name: 'adjust-android', version: '4.29.1'
        }
    }
AGPBI: {"kind":"error","text":"Program type already present: com.adjust.sdk.ActivityHandler$10","sources":[{}],"tool":"D8"}
com.android.builder.dexing.DexArchiveMergerException: 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: com.adjust.sdk.ActivityHandler$10
    at com.android.builder.dexing.D8DexArchiveMerger.getExceptionToRethrow(D8DexArchiveMerger.java:131)
    at com.android.builder.dexing.D8DexArchiveMerger.mergeDexArchives(D8DexArchiveMerger.java:118)
    at com.android.build.gradle.internal.transforms.DexMergerTransformCallable.call(DexMergerTransformCallable.java:102)
    at com.android.build.gradle.internal.tasks.DexMergingTaskRunnable.run(DexMergingTask.kt:444)
uerceg commented 2 years ago

Hi @MuhammedAlmaz,

In current state of things, our React Native SDK contains our native Android SDK added as a JAR dependency. So there is no need to have any other reference to it in your Gradle file. Are you still facing the same issue if you remove all native Adjust Android SDK references from Gradle file?

MuhammedAlmaz commented 2 years ago

Hi @uerceg ,

I checked all gradle files there is not any adjust sdk. I removed all but i guess this error again. Idk why. I clear gradle files, caches etc.

I could run this app 1 month ago. After i update android studio, it stopped working .