greenrobot / greenDAO

greenDAO is a light & fast ORM solution for Android that maps objects to SQLite databases.
http://greenrobot.org/greendao/
12.63k stars 2.89k forks source link

Gradle Build error with GitHub Actions #1037

Closed aditmodhvadia closed 4 months ago

aditmodhvadia commented 4 years ago

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

greenrobot-team commented 4 years ago

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.

greenrobot-team commented 4 months ago

Closing this issue due to inactivity. :zzz: Feel free to comment with more details or submit a new issue.