Visitar URL original
cannot access SupportSQLiteDatabase · Issue #475 · sqlcipher/android-database-sqlcipher · GitHub
Skip to content

cannot access SupportSQLiteDatabase #475

Closed

Description

@hirani89

I get the error below when trying to compile my app.

error: cannot access SupportSQLiteDatabase
class file for androidx.sqlite.db.SupportSQLiteDatabase not found

When I use the gradle method, everything works like a charm. But after building the project myself and and implementing the generated .aar file in my project, it does not seem to work.

The are no instructions on what to do after building the project yourself. How do I use the generated .aar file in my project successfully?

Regards,

Activity

  1. commonsguy commented on Sep 9, 2019

    @commonsguy
    Collaborator

    But after... implementing the generated .aar file in my project

    How exactly are you doing this?

    From your symptoms, my guess is that you copied the AAR into some directory (e.g., libs/) and are adding it to the project Gradle file via a statement like implementation fileTree(dir: 'libs', include: ['*.aar']). If so, that will not work for most AAR files. That approach only adds the AAR itself, not any transitive dependencies. The pre-built AAR is distributed via a Maven repository, with a POM file that contains a list of the transitive dependencies, so Gradle knows to download them. You would need to decide how to include those transitive dependencies in your project. One simple but crude approach is to copy the relevant lines from the library's build.gradle file into your own (in this case, implementation "androidx.sqlite:sqlite:2.0.1").

  2. hirani89 commented on Sep 11, 2019

    @hirani89
    Author

    Thanks. All now working.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions