greenDAO
greenDAO copied to clipboard
Gradle Build error with GitHub Actions
Getting an error for DaoSession and DaoMaster is not found when Android CI GitHub action is triggered for a project. I also added ./gradlew greendao before the build command to be sure but it still gives the error. Although it builds successfully on local.
Note: One of the entities uses oneTo relation with Join on others, so it contains DaoSession, and that import also gives the error.
Android CI:
name: Android CI
on:
push:
branches: [ master, release, develop ]
pull_request:
branches: [ master, release, develop ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Build GreenDao Files
run: ./gradlew greendao
- name: Build with Gradle
run: ./gradlew build
Error:
/home/runner/work/iSolationAlert/iSolationAlert/app/src/main/java/edu/bu/metmobile/isolationalert/database/DaoHelper.java:51: error: cannot find symbol DaoMaster daoMaster = new DaoMaster(db); ^ symbol: class DaoMaster location: class DaoHelper
Are you using Android Studio to build locally? Or actually the same ./gradlew build
command? I guess there must be some difference regarding dependency configurations.