Glide: "Could not get unknown property 'sourceSets'" for disklrucache, why?

Created on 11 Sep 2017  路  11Comments  路  Source: bumptech/glide

Could not get unknown property 'sourceSets' for project ':third_party:disklrucache' of type org.gradle.api.Project.
Open File

repro-needed stale

Most helpful comment

Follow the instructions here: https://github.com/bumptech/glide#build and it should "just" work.

If you're trying to build from ZIP files, you likely will have problems because not everything will be available. -src ZIP/JAR files are usually provided to be attached in the IDE for code navigation, not for build reproducibility. "Source code.zip" at the release page is the repo's source code, but there are git submodules present in the repo (see .gitmodules and settings.gradle), which cannot be fetched when built from ZIP because there's no .git folder.

If you want a specific version, just clone as described in Readme and then git checkout <tag> before gradlew. List of <tag>s can be found via git tag.

All 11 comments

which branch? Did you follow the setup instructions from the branch's Readme?

I meet the same issue. and how to solve this problem?
I use the latest relase 4.1.1.
Could anyone give me some advice? thx

Just to clarify, are you compiling Glide from sources, or are you getting this in your own project?

I was trying to compiling Glide from source. this problem occured.

I meet the same issue.
@TWiStErRob
Can you help me to solve this problem ? I use studio3.0 .
thx

This issue has been automatically marked as stale because it has not had activity in the last seven days. It will be closed if no further activity occurs within the next seven days. Thank you for your contributions.

I also meet the same issue @kangdawei @TWiStErRob @dede1314 @AchillesPeng @sjudd

i also meet the same problem in master branch when i build the source code ,
use Android Studio 3.0.1 on Windows 10 java version 1.8.0_112
@TWiStErRob

Error:(169, 0) Could not get unknown property 'sourceSets' for project ':third_party:disklrucache' of type org.gradle.api.Project.
<a href="openFile:...\glide-master\glide\build.gradle">Open File</a>

when i click open file, AndroidStudio show me
" + getInternalJavaProjectsForJar().collect { it.sourceSets.main.allJava } "

def getSourceFilesForVariantJar(variantName) {
    getAndroidLibraryVariantsForJar(variantName).collect {
        it.getJavaCompiler().source.findAll {
            return !it.getName().equals("R.java") && !it.getName().equals("BuildConfig.java")
        }
    }
    + getInternalJavaProjectsForJar().collect { it.sourceSets.main.allJava }  
}

png

I saw same problem. I had unpacked the glide-master.zip file and noticed that glide-master/third_party/ disklrucache directory was empty. I managed to get things working by downloading the version of disklrucahe refrenced here into that empty directory. Android Studio built for me and I could run the svg demo.

I suspect that github's zip file of a project does not like the sort of indirection to another project, but I am not certain.

git clone [email protected]:bumptech/glide.git works
but downloading the archive from the page does not.

Follow the instructions here: https://github.com/bumptech/glide#build and it should "just" work.

If you're trying to build from ZIP files, you likely will have problems because not everything will be available. -src ZIP/JAR files are usually provided to be attached in the IDE for code navigation, not for build reproducibility. "Source code.zip" at the release page is the repo's source code, but there are git submodules present in the repo (see .gitmodules and settings.gradle), which cannot be fetched when built from ZIP because there's no .git folder.

If you want a specific version, just clone as described in Readme and then git checkout <tag> before gradlew. List of <tag>s can be found via git tag.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

StefMa picture StefMa  路  3Comments

technoir42 picture technoir42  路  3Comments

Anton111111 picture Anton111111  路  3Comments

kenneth2008 picture kenneth2008  路  3Comments

ersen-osman picture ersen-osman  路  3Comments