错误为local.properties (No such file or directory)
。
我的yml
文件:
language: android
android:
components:
- platform-tools
- build-tools-27.1.1
- build-tools-27.0.3
- android-27
before_install:
- yes | sdkmanager "platforms;android-27"
我也试过了this解决方案但没有用。我无法上传local.properties
因为它有局部变量。
答案 0 :(得分:2)
我在this帖子上找到了答案。
添加build.gradle
if (project.rootProject.file('local.properties').exists()) {
apply from: 'https://raw.githubusercontent.com/nuuneoi/JCenter/master/installv1.gradle'
apply from: 'https://raw.githubusercontent.com/nuuneoi/JCenter/master/bintrayv1.gradle'
}
答案 1 :(得分:0)
我遇到了同样的问题,找到了一个更简单的解决方案:
before_script:
- touch local.properties
这将在运行脚本之前创建文件,但无需在项目中创建“假”文件并将其添加到项目中。