问题
There is an open source project here.
After trying multiple times to build it, there is an error that make build Failed :
Task failed with an exception.
Where:
Build file '/src/apps/build.gradle' line: 19
What went wrong:
A problem occurred evaluating root project 'apps'.
Could not get unknown property 'PrivateData' for object of type org.gradle.api.internal.initialization.DefaultScriptHandler.
Here is line 19 :
buildscript {
PrivateData.merge(project, "all-apps")
...
}
And the defined PrivateData.merge(...)
is in /buildSrc/src/main/java/MergePrivateData.kt
file:
object PrivateData {
...
@JvmStatic
@JvmOverloads
fun merge(project: Project, dataDirName: String = "") {
...
}
...
}
The source successful build is here and I follow the steps, but I can not find my mistake.
Please help me.
回答1:
- From the
apps
folder remove thebuildSrc
file. - From the root copy the
buildSrc
folder into theapps
folder and rebuild it.
来源:https://stackoverflow.com/questions/64742632/could-not-get-unknown-property-privatedata-for-object-of-type-org-gradle-api-i