简体   繁体   中英

Android Studio - Unable to import class after added dependency in build.gradle

I am unable to import class after added dependency in build.gradle.

dependencies {
    ...
    compile 'com.mcxiaoke.volley:library:1.0.19'
}

Sync it with no error. Did some search about this issue. I found that it may be related to Project Structure -> Project -> Plugin Version. Imported module in Android Studio can't find imported class But I am not sure what version I should use.

My project version

Gradle version: 4.1
Android Plugin Version 3.0.1

mcxiaoke library is depricated now

      com.mcxiaoke.volley:library:1.0.19'

try official by google

try replacing your compile with this

 compile 'com.android.volley:volley:1.0.0'

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM