由于项目比较老,是脚本通过ant编译的。编译时报错如下:
Analytics other plugin to proto: Unknown plugin type org.jetbrains.kotlin.gradle.internal.AndroidSubplugin expected enum ORG_JETBRAINS_KOTLIN_GRADLE_INTERNAL_ANDROIDSUBPLUGIN
Selected primary task 'SignAPK' from project :
FAILURE: Build failed with an exception.
* What went wrong:
Could not determine the dependencies of task ':SignAPK'.
> Task with path 'assembleRelease' not found in root project 'SoulMate'.
* Try:
Run with --stacktrace option to get the stack trace. Run with --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 353ms
最后发现,是因为修改了local.properties,没有配置sdk.dir属性,配置为本机目录后(我的配置是sdk.dir=/data/sdk),解决了问题.