0

I've encountered an error in my Gradle Log. It prevents my Android Studio App to deploy / do a Gradle sync.

Full Error Message:

Gradle sync failed: Could not find kxml2.jar (net.sf.kxml:kxml2:2.3.0).
        Searched in the following locations:
        file:/C:/Program Files/Android/Android Studio/gradle/m2repository/net/sf/kxml/kxml2/2.3.0/kxml2-2.3.0.jar
        Consult IDE log for more details (Help | Show Log)

In this directory "C:/Program Files/Android/Android Studio/gradle/m2repository/net/sf/kxml/kxml2" is indeed no file named kxml2.jar.

Sloppily creating the file with no content, doesnt solve the Problem, expectedly.

And Google doesn't help me at all, so I need you help.

Elias

EDIT:

This is the full error Message from the idea.log:

2017-05-30 09:39:19,203 [ 145127]   WARN - ect.sync.idea.ProjectSetUpTask -  
2017-05-30 09:39:19,203 [ 145127]   INFO - ect.sync.idea.ProjectSetUpTask - Could not find kxml2.jar (net.sf.kxml:kxml2:2.3.0).
Searched in the following locations:
    file:/C:/Program Files/Android/Android Studio/gradle/m2repository/net/sf/kxml/kxml2/2.3.0/kxml2-2.3.0.jar

Consult IDE log for more details (Help | Show Log) 
2017-05-30 09:39:19,203 [ 145127]   INFO - e.project.sync.GradleSyncState - Sync with Gradle for project 'ShishaTobacco' failed: Could not find kxml2.jar (net.sf.kxml:kxml2:2.3.0).
Searched in the following locations:
    file:/C:/Program Files/Android/Android Studio/gradle/m2repository/net/sf/kxml/kxml2/2.3.0/kxml2-2.3.0.jar

Consult IDE log for more details (Help | Show Log) 
2017-05-30 09:39:19,252 [ 145176]   INFO -       #com.jetbrains.cidr.lang - Clearing symbols finished in 0 s. 
2017-05-30 09:39:19,253 [ 145177]   INFO -       #com.jetbrains.cidr.lang - Loading symbols finished in 0 s. 
2017-05-30 09:39:19,255 [ 145179]   INFO -       #com.jetbrains.cidr.lang - Building symbols finished in 0 s. 
2017-05-30 09:39:19,255 [ 145179]   INFO -       #com.jetbrains.cidr.lang - Saving symbols finished in 0 s. 

Edit 2:

I've just reinstalled Android Studio, now everything is working fine.

Elias
  • 89
  • 1
  • 3
  • 10
  • did you add `compile group: 'net.sf.kxml', name: 'kxml2', version: '2.3.0'` ? – IntelliJ Amiya May 30 '17 at 07:06
  • Have you tried searching on a search engine for the jar file, downloading the file and then placing it in `C:/Program Files/Android/Android Studio/gradle/m2repository/net/sf/kxml/kxml2/2.3.0/`? – Ken May 30 '17 at 07:25
  • @IntelliJAmiya I've just tried you solution and addet your code line in the build.gradle, but still the same error. – Elias May 30 '17 at 07:28
  • @i_pk_pjers_i I've dowonloaded this file (http://www.java2s.com/Code/Jar/k/Downloadkxml2jar.htm) and inserted it in the /2.3.0/ directory. Still the same error. – Elias May 30 '17 at 07:31

0 Answers0