我正在尝试在GitLab CI中创建发行版APK,但出现此错误
error: resource android:style/TextAppearance.Material.Notification not found.
error: resource android:style/TextAppearance.Material.Notification.Info not found.
error: resource android:style/TextAppearance.Material.Notification.Time not found.
error: resource android:style/TextAppearance.Material.Notification.Title not found.
/root/.gradle/caches/transforms-1/files-1.1/support-compat-
27.0.1.aar/166d3ac0ee43db9be0ff07950d58cb97/res/values/values.xml:20:5-70: AAPT: error: resource android:attr/fontStyle not found.
/root/.gradle/caches/transforms-1/files-1.1/support-compat- 27.0.1.aar/166d3ac0ee43db9be0ff07950d58cb97/res/values/values.xml:20:5-70: AAPT: error: resource android:attr/font not found.
/root/.gradle/caches/transforms-1/files-1.1/support-compat-27.0.1.aar/166d3ac0ee43db9be0ff07950d58cb97/res/values/values.xml:20:5-70: AAPT: error: resource android:attr/fontWeight not found.
error: failed linking references.
:viewPagerLibrary:verifyReleaseResources FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':viewPagerLibrary:verifyReleaseResources'.
> com.android.ide.common.process.ProcessException: Failed to execute aapt
我尝试在本地计算机上构建项目并创建发行版APK,但没有任何错误,但是在GitLab中我什至无法构建项目,而且我可以在GitLab上的debug mod中构建项目。 我该如何解决这个问题?感谢您的建议。
我的.gitlab-ci.yml
assembleDebug_build:
stage: build
script:
- ./gradlew assembleDebug
artifacts:
paths:
- app/build/outputs/
assembleRelease_build:
stage: build
script:
- ./gradlew clean assembleRelease
artifacts:
name: "build_${CI_PROJECT_NAME}_${CI_BUILD_REF_NAME}_${CI_JOB_NAME}_${CI_JOB_ID}"
paths:
- app/build/outputs/