1 comment
Comment actions Permalink

this works:

add resources folder at the same level as src, mark it as resources folder.

build.gradle:

sourceSets {
main {
java.srcDirs 'src'
resources.srcDirs 'resources'
}
}

 

assuming there is a dir "resources/img", path to files in this dir is:

public class Resource {
public static String PathToImg(String name) {
return "/img/" + name;
}
}
0

Please sign in to leave a comment.