findmate / cordova-plugin-jitsi-meet

Cordova plugin for jitsi meet react native sdk
17 stars 21 forks source link

Jitsi-Meet Plugin Android Cordova Gradle issues #1

Closed flean closed 4 years ago

flean commented 4 years ago

Not sure if you can help but really looking for help to solve this issue.

I had to tweak some things for iOS and now it works without issues but android I can't get it to run.

I'm not an expert in Cordova plugins and this seems like a settings issue of some sort.

I put this in my jitsiplugin.gradle

configurations.all {
        resolutionStrategy {
            force "com.google.android.gms:play-services-basement:15.0.1"
            force "com.google.android.gms:play-services-tasks:15.0.1"
        }
    }

To remove this error

Dependency resolved to an incompatible version: Dependency(fromArtifactVersion=ArtifactVersion(groupId=com.google.android.gms, artifactId=play-services-stats, version=15.0.1), toArtifact=Artifact(groupId=com.google.android.gms, artifactId=play-services-basement), toArtifactVersionString=[15.0.1])

FAILURE: Build failed with an exception.

Program type already present: android.support.v4.media.MediaBrowserCompat$ConnectionCallback$StubApi21 How do I fix this?

Here is the complete jitsiplugin.gradle

repositories{
    jcenter()
    maven {
        url "https://github.com/jitsi/jitsi-maven-repository/raw/master/releases"
    }
    maven {
        url "https://maven.google.com"
    }
    configurations.all {
        resolutionStrategy {
            force "com.google.android.gms:play-services-basement:15.0.1"
            force "com.google.android.gms:play-services-tasks:15.0.1"
        }
    }
}
android {
    compileSdkVersion 26
            buildToolsVersion "26.0.1"

    defaultConfig {
        minSdkVersion 21
        targetSdkVersion 26
        multiDexEnabled true
        ndk {
            abiFilters 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64'
        }

        packagingOptions {
                // The project react-native does not provide 64-bit binaries at the
                // time of this writing. Unfortunately, packaging any 64-bit
                // binaries into the .apk will crash the app at runtime on 64-bit
                // platforms.
                // exclude '/lib/mips64/**'
                // exclude '/lib/arm64-v8a/**'
                // exclude '/lib/x86_64/**'
        }
    }

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }

    dexOptions {
            jumboMode = true
    }
}
dependencies {
    implementation  ('org.jitsi.react:jitsi-meet-sdk:2.+') {
        transitive=true;
    }
//  implementation "com.android.support:appcompat-v7:26.1.0"
//  implementation 'com.android.support.constraint:constraint-layout:1.1.3'
    implementation 'androidx.appcompat:appcompat:1.1.0'
    implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
}
IllusionVK commented 4 years ago

Hey @flean do you use https://github.com/dpa99c/cordova-android-support-gradle-release ? we use this to help manage version conflicts, which i think os the main cause of your problems?

flean commented 4 years ago

Hey @flean do you use https://github.com/dpa99c/cordova-android-support-gradle-release ? we use this to help manage version conflicts, which i think os the main cause of your problems?

@IllusionVK , I'll try this today. Really hoping this works, I've been struggling with this for over a week. I'll report back and thanks.

flean commented 4 years ago

If anyone has issues I solved it by adding this

cordova-plugin-androidx@1.0.2
cordova-plugin-androidx-adapter@1.1.0