0

我正在尝试插入一个名为 Mesibo 的 SDK 进行通信,在我的项目中,当我尝试导入时它立即变灰:import com.mesibo.api.mesibo;带有消息cannot resolve symbol 'mesibo'unused import围绕它

这是build.gradle文件:

apply plugin: 'com.android.application'

android {
    compileSdkVersion 28
    defaultConfig {
        applicationId "com.example.richard.myapplication"
        minSdkVersion 15
        targetSdkVersion 28
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    implementation 'com.mesibo.api:mesibo:1.0.5'
    implementation 'com.mesibo.api:calls:1.0.3'
    implementation 'com.mesibo.api:ui:1.0.4'
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'com.android.support:appcompat-v7:28.0.0-rc01'
    implementation 'com.android.support.constraint:constraint-layout:1.1.2'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'com.android.support.test:runner:1.0.2'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
}

import com.mesibo.api.mesibo;

我正在关注他们的文档,并且由于某种原因,导入会阻止 gradle 与项目同步。我对 Android Studio 很陌生,这是我第一次尝试在其中放置 SDK + API。

4

1 回答 1

4

这在您的 Java/Kotlin 代码中,而不是在 Gradle 中

import com.mesibo.api.mesibo;

所以从那里删除它,然后编译代码,然后将它添加到你需要这个类的其他源文件中。

而且我认为他们的文档很差......应该是

import com.mesibo.api.Mesibo;

https://github.com/mesibo/samples/tree/master/android/MesiboSample/app/src/main/java/com/mesibo/firstsample

于 2018-08-26T08:58:12.183 回答