So far I have added the following to the end of my \"build.gradle\"
task copyFiles(type: Copy)
copyFiles {
description = \'Copies html5 files from the c
I had a very similar problem to yours and I was able to solve it as follows:
android.buildTypes.all{ buildType ->
task "${buildType.name}CopyFiles" (type: Copy)
"${buildType.name}CopyFiles" {
description = 'Copies html5 files from the common library...'
from '../../www'
into 'assets/www'
include('**/*')
}
tasks.getByPath(":${project.name}:assemble${buildType.name.capitalize()}").dependsOn "${buildType.name}CopyFiles"
}
The problem is, that Android Studio seems to call a specific assemble task like assembleDebug when you click on run, that's why you have to make sure to make all assemble tasks depend on your copy task.