【发布时间】:2019-06-19 08:49:25
【问题描述】:
尽量不打扰安卓开发者。 我已经检查了一个分支来在 Gitlab 中设置 CI/CD 管道,这样我就可以从源代码构建 APK。
该应用使用 Android Studio 构建良好,但在 docker 内使用 gradlew 构建时失败。
第一个错误是:
:app:compileDebugJavaWithJavacwarning: Supported source version 'RELEASE_7' from annotation processor 'android.arch.persistence.room.RoomProcessor' less than -source '1.8'
/builds/root/android-build/app/src/main/java/rs/project/ssam/drive/database/AppDatabase.java:17: warning: Schema export directory is not provided to the annotation processor so we cannot export the schema. You can either provide `room.schemaLocation` annotation processor argument OR set exportSchema to false.
public abstract class AppDatabase extends RoomDatabase {
在我设置exportSchema = false之后
又遇到一个错误
:app:compileDebugJavaWithJavac/builds/root/android-build/app/src/main/java/rs/project/ssam/drive/api/repository/UserRepository.java:25: error: no suitable method found for injectInto(rs.project.ssam.drive.api.repository.UserRepository)
App.getInstance().getComponent().injectInto(this);
这就是我陷入困境的地方,并在“强制”他们提供帮助之前尝试尽可能多地进行研究。
欢迎任何建议。
【问题讨论】:
-
我按照本指南设置管道。 about.gitlab.com/2018/10/24/…
标签: android docker gitlab-ci gradlew