Android Studio “unused import” message when putting SDK inside build.gradle

Android Studio “unused import” message when putting SDK inside build.gradle



I'm trying to insert an SDK called Mesibo for communication, and in my project it instantly greys out when I try to import: import com.mesibo.api.mesibo; with the message cannot resolve symbol 'mesibo' and unused import around it


import com.mesibo.api.mesibo;


cannot resolve symbol 'mesibo'


unused import



This is the build.gradle file:


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;



I'm following their documentation, and the import stops gradle from syncing with the project for some reason. I'm very new to Android Studio and this is my first time attempting to place an SDK + API in.




1 Answer
1



This goes in your Java/Kotlin code, not in Gradle


import com.mesibo.api.mesibo;



So remove it from there, and then compile the code, then add it to the other source files you need this class.



And I think that their documentation is very poor... should be


import com.mesibo.api.Mesibo;



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





It gives me the cannot resolve symbol error in the java too
– compsciman
Aug 26 at 9:01





mesibo is not a class name. I don't know what you are trying to import
– cricket_007
Aug 26 at 9:03


mesibo






By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Popular posts from this blog

PHP code is not being executed, instead code shows on the page

Administrative divisions of China

Cardinality of the set of algorithms