ministero-salute / it-dgc-verificaC19-android

VerificaC19 is the official Italian customization of the EU Digital COVID Certificate Verifier App for the Android Operating System
https://www.dgc.gov.it
Apache License 2.0
103 stars 54 forks source link

I'm a beginner, how do I solve this? #287

Closed djnicolai closed 1 year ago

djnicolai commented 2 years ago

Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'.

Could not resolve all task dependencies for configuration ':app:debugCompileClasspath'. Could not resolve project :dgc-sdk. Required by: project :app No matching configuration of project :dgc-sdk was found. The consumer was configured to find an API of a component, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'debug', attribute 'org.jetbrains.kotlin.platform.type' with value 'androidJvm' but:

  • None of the consumable configurations have attributes. Could not resolve project :decoder. Required by: project :app No matching configuration of project :decoder was found. The consumer was configured to find an API of a component, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'debug', attribute 'org.jetbrains.kotlin.platform.type' with value 'androidJvm' but:
  • None of the consumable configurations have attributes.
rawmain commented 2 years ago

Hello @djnicolai

Could not determine the dependencies of task ':app:compileDebugJavaWithJavac' [...]

Because you haven't read / followed the instructions of the provided Readme - Build paragraph.

djnicolai commented 2 years ago

Hello @djnicolai

Could not determine the dependencies of task ':app:compileDebugJavaWithJavac' [...]

Because you haven't read / followed the instructions of the provided Readme - Build paragraph.

Could not determine the dependencies of task ':app:lintDebug'.

Could not resolve all artifacts for configuration ':app:debugCompileClasspath'. Could not resolve project :dgc-sdk. Required by: project :app No matching configuration of project :dgc-sdk was found. The consumer was configured to find an API of a component, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'debug', attribute 'org.jetbrains.kotlin.platform.type' with value 'androidJvm' but:

  • None of the consumable configurations have attributes. Could not resolve project :decoder. Required by: project :app No matching configuration of project :decoder was found. The consumer was configured to find an API of a component, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'debug', attribute 'org.jetbrains.kotlin.platform.type' with value 'androidJvm' but:
  • None of the consumable configurations have attributes.
rawmain commented 2 years ago

Hello @djnicolai

Could not determine the dependencies of task ':app:lintDebug'.

Again...

As clearly written, in order to successfully build and run the project, you must read & follow the instructions of the provided Readme - Build paragraph.

Until your build environment doesn't match the settings.gradle project structure for app / dgc-sdk / decoder subdirectories, you'll keep on getting such build resolution errors.

\ Therefore :

  1. Set the right subdirectories' names/structure of the cloned projects - just according to the provided instructions
Subdirectory Name Subdirectory Content = Repository to be cloned
dgca-verifier-app-android https://github.com/ministero-salute/it-dgc-verificaC19-android
dgca-app-core-android https://github.com/eu-digital-green-certificates/dgca-app-core-android
it-dgc-verificac19-sdk-android https://github.com/ministero-salute/it-dgc-verificac19-sdk-android
dgc-certlogic-android https://github.com/eu-digital-green-certificates/dgc-certlogic-android

.

  1. Edit it-dgc-verificac19-sdk-android\sdk\build.gradle by replacing BASE_URL, SERVER_HOST and CERTIFICATE_SHA values for the buildType debug config with the corresponding values of the buildType release config
    buildTypes {
        debug {
            minifyEnabled false
            buildConfigField "String", "BASE_URL", "\"https://get.dgc.gov.it/v1/dgc/\""
            buildConfigField "String", "SERVER_HOST", "\"get.dgc.gov.it\""
            buildConfigField "String", "CERTIFICATE_SHA", "\"sha256/7cZJIDPacG8FS3pq6Mvxg+7yBDM/VYc2alOcbVe/e74=\""
            buildConfigField "String", "SDK_VERSION", "\"1.1.6\""
        }

\ Once you've carefully read & followed such trivial instructions, you'll be finally able to build and run both debug and release variants of the app project inside the dgca-verifier-app-android subdirectory.

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.