StringCare/AndroidLibrary

Resource not found

jimlyas opened this issue · 3 comments

This is the log
image

And this is my build.gradle (app) :
image

I am using version 4.0.0, please help @efraespada

@jimlyas
What resource is not found? The strings.xml is detected with your current SC config (the default).

The sourceSets config also seems to be the default, so you can remove it.

So you only need this:

stringcare {
    debug true
    assetsFiles = ["*.json"]
}

If you want to add more files:

stringcare {
    debug true
    assetsFiles = ["*.json"]
    stringFiles = ["strings.xml", "other_strings.xml"]
}

Also, I recommend you to use the FileInputStream as a separate field and close() the stream after load it in the Properties object.

apply plugin: StringCare

def apiKeyProperties = new Properties()
def apiFile = file('./apiKey.properties')
def inputStream = new FileInputStream(apiFile)
apiKeyProperties.load(inputStream)
inputStream.close()

stringcare {
    debug true
    assetsFiles = ["*.json"]
}

thanks, it worked... :)