打包失败报错:Unable to find a matching variant of project,
原因是android项目中app/gradle 的依赖还没过,解决方案:检查你所要打包的配置,在其中加上如下:
beta{
....
matchingFallbacks = ['release', 'debug']
...
}
添加完成后 再次打包会报错,信息如下:
Lint found fatal errors while assembling a release target.
To proceed, either fix the issues identified by lint, or modify your build script as follows:
...
android {
lintOptions {
checkReleaseBuilds false
// Or, if you prefer, you can continue to check for errors in release builds,
// but continue the build even when errors are found:
abortOnError false
}
}
...
根据报错引导还需在app/gradle添加:
android {
''''
lintOptions {
checkReleaseBuilds false
// Or, if you prefer, you can continue to check for errors in release builds,
// but continue the build even when errors are found:
abortOnError false
}
.....
}
这样再打包就OK了