Skip to content Skip to sidebar Skip to footer

I Started A New Kotlin Android Project But I Got This Error - "expected A Single Classpath Entry, Found: []"

I am using the latest version of android studio, with Kotlin. Anyone with a solution will really appreciated https://i.stack.imgur.com/kkRm1.png

Solution 1:

Plugins are missing, something like that

apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-kapt'

Solution 2:

None of those work for you?

If you have ever changed where android is stored (i.e. saving gradle or APK files on an external drive) this may help.

Expectedasingleclasspathentry, found: []

I had this error but my real problem was very different. Before I upgraded my storage, I used an external drive to host Android APKs and gradle files.

I had promptly forgotten this earlier when beginning a new project, no longer using the external drive!

I went into File -> Settings -> Build, Execution, Deployment -> Gradle -> emptied the "Gradle User Home" so it points back at default.

Fixed! Maybe this will help someone... another example of an error that really didn't reflect the problem.

Solution 3:

This is because your project is still using the previous project gradle. Open Android Studio, go to File ->Settings->Build,Execution,Deployment->Gradle user home: and select the correct gradle folder (the one which is reside in your current project folder).

Hope this will work for you

Solution 4:

I also faced the same issue and this solution work for me after trying many other ways. I went into File -> Settings -> Build, Execution, Deployment -> Gradle -> claer the "Gradle User Home" at top and save changes. After that i have updated my Gradle version from 6.5 to 6.7.1 and sync project. It works fine.

Post a Comment for "I Started A New Kotlin Android Project But I Got This Error - "expected A Single Classpath Entry, Found: []""