Libgdx, Transitive dependencies Android,Java library project, Jar

后端 未结 2 1507
清歌不尽
清歌不尽 2021-01-22 17:56

I have just created template Libgdx project (Core,Android,Windows). Core is regular Java project library. There is a dependency in Core to XStream.jar library. Core contains fil

2条回答
  •  死守一世寂寞
    2021-01-22 18:15

    You need to fix your

    compile fileTree(dir: 'libs', include: '*.jar')
    

    line. If your libs folder is in core project's folder, add above line to

    project(":core") {...
    
        dependencies {....
            compile fileTree(dir: 'libs', include: '*.jar')
        }
    }
    

    part of your build.gradle file. And add below line to your Android project's part in the build.gradle file.

    project(":android") {...
    
        dependencies {....
            compile fileTree(dir: '../libs', include: '*.jar')
        }
    }
    

    Android must have this line but it is not necessary for other projects.

提交回复
热议问题