在为Android开发Flutter插件时如何安装和使用第三方依赖

时间:2019-05-07 09:52:35

标签: android flutter-plugin

我正在开发用于flutter的插件,该插件使用Android的send bird SDK。 即使将SDK添加到android/build.gradle支架中的flutter create --template=plugin的依存关系中,我也无法使用该SDK

android/build.gradle配置

...

buildscript {
    repositories {
        google()
        jcenter()
        maven { url "https://raw.githubusercontent.com/smilefam/SendBird-SDK-Android/master/" }
    }

    dependencies {
        classpath 'com.android.tools.build:gradle:3.2.1'
    }
}

rootProject.allprojects {
    repositories {
        google()
        jcenter()
        maven { url "https://raw.githubusercontent.com/smilefam/SendBird-SDK-Android/master/" }
    }
}

apply plugin: 'com.android.library'

android {
    compileSdkVersion 28

    defaultConfig {
        minSdkVersion 16
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    lintOptions {
        disable 'InvalidPackage'
    }
}

dependencies {
    implementation 'com.sendbird.sdk:sendbird-android-sdk:3.0.92'
}

以下是尝试从Android初始化SDK

enter image description here

渐变输出

WARNING: API 'variantOutput.getProcessResources()' is obsolete and has been replaced with 'variantOutput.getProcessResourcesProvider()'.
It will be removed at the end of 2019.
For more information, see https://d.android.com/r/tools/task-configuration-avoidance.
To determine what is calling variantOutput.getProcessResources(), use -Pandroid.debug.obsoleteApi=true on the command line to display more information.
Affected Modules: app

0 个答案:

没有答案