amitshekhariitbhu / Android-Debug-Database

A library for debugging android databases and shared preferences - Make Debugging Great Again
https://outcomeschool.com
Apache License 2.0
8.39k stars 872 forks source link

Could not find com.amitshekhar.android:debug-db:1.0.5. in Android studio Flamingo #227

Closed yashshree29 closed 3 weeks ago

yashshree29 commented 11 months ago

Cannot build gradle successfully after adding this dependency in Android studio | 2022.2.1 Patch 1 Does it support new android studio versions?

nilesh-gore commented 6 months ago

Full Build Output For New Project

dependencies {
    debugImplementation("com.github.amitshekhariitbhu.Android-Debug-Database:debug-db:v1.0.6")
}
* What went wrong:
Execution failed for task ':app:desugarDebugFileDependencies'.
> Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
   > Could not find com.github.amitshekhariitbhu.Android-Debug-Database:debug-db:v1.0.6.
     Searched in the following locations:
       - https://dl.google.com/dl/android/maven2/com/github/amitshekhariitbhu/Android-Debug-Database/debug-db/v1.0.6/debug-db-v1.0.6.pom
       - https://repo.maven.apache.org/maven2/com/github/amitshekhariitbhu/Android-Debug-Database/debug-db/v1.0.6/debug-db-v1.0.6.pom
     Required by:
         project :app

* Try:
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.
amitshekhariitbhu commented 3 weeks ago

Solution:

Add this in your settings.gradle:

maven { url 'https://jitpack.io' }

If you are using settings.gradle.kts, add the following:

maven { setUrl("https://jitpack.io") }

Add this in your build.gradle

debugImplementation 'com.github.amitshekhariitbhu.Android-Debug-Database:debug-db:1.0.7'

If you are using build.gradle.kts, add the following:

debugImplementation("com.github.amitshekhariitbhu.Android-Debug-Database:debug-db:1.0.7")

Using the Android Debug Database with encrypted database

Add this in your build.gradle

debugImplementation 'com.github.amitshekhariitbhu.Android-Debug-Database:debug-db-encrypt:1.0.7'

If you are using build.gradle.kts, add the following:

debugImplementation("com.github.amitshekhariitbhu.Android-Debug-Database:debug-db-encrypt:1.0.7")

And to provide the password for the DB, you should add this in the Gradle: DBPASSWORD{VARIABLE}, if for example, PERSON is the database name: DB_PASSWORD_PERSON

debug {
    resValue("string", "DB_PASSWORD_PERSON", "password")
}