eIDmSDK / eID-mSDK-Android

eID mSDK zabezpečuje komunikáciu s občianskym preukazom vybaveným čipom s duálnym (kontaktným aj bezkontaktným) rozhraním na mobilných zariadeniach s NFC. Preukazy s duálnym rozhraním sú vydávané od 1.12.2022.
https://eidas.minv.sk/download
Other
9 stars 0 forks source link

Problemy s rozbehanim sample aplikacie #1

Closed Matej-Hlatky closed 9 months ago

Matej-Hlatky commented 9 months ago

Dobry den, po pullnitu si master, nejde rozbehat sample Android aplikacia.

Je tam viac problemov.

V prvom rade - nespravne Maven credentials - po syncu hlasi chybu:

Unauthorized
    at org.gradle.internal.resource.transport.http.HttpClientHelper.processResponse(HttpClientHelper.java:234)
Caused by: org.gradle.internal.resource.transport.http.HttpErrorStatusCodeException: Could not GET 'https://maven.pkg.github.com/eIDmSDK/eID-mSDK-Android/sk/eid/eid-sdk/1.3.4/eid-sdk-1.3.4.pom'. Received status code 401 from server: 

Ak si aj jednotlive AAR subory stiahnem a naimportujem cez lib adresar, sample aplikacia ma dalej tieto problemy:

Nasledne sa aplikacia uz da rozbehat, avsak pri interakcii na vypis certifikatov atd. sa len zobrazi genericka chyba v aplikacii; v Logcat nie je Exception a tym padom SDK a sample aplikacia su vlastne nefunkcne.

Prosim o fix credentials a upravu dema, resp. spravne nastavene dependencies vo vykompilovanych AAR. dakujem krasne. ☮️

Matej-Hlatky commented 9 months ago

OK,

pokial sa nefixne Maven repository access, tak riesenia su taketo.

V oboch pripadoch treba rucne potahat AAR subory z https://github.com/eIDmSDK?tab=packages&repo_name=eID-mSDK-Android

Riesenie 1:

  1. Stiahnut vsetky *.aar do /app/libs flat a nasledne zmenit dependencies nasledovne:
  2. V /settings.gradle zmazat "maven.pkg.github.com/..." repository.
    // EID SDK
    implementation files("libs/auth-sdk-1.3.4.aar")
    implementation files("libs/base-sdk-1.3.4.aar")
    implementation files("libs/core-sdk-1.3.4.aar")
    implementation files("libs/eid-exceptions-sdk-1.3.4.aar")
    implementation files("libs/eid-sdk-1.3.4.aar")
    implementation files("libs/jmrtd-sdk-1.3.4.aar")
    implementation files("libs/pin-management-sdk-1.3.4.aar")
    implementation files("libs/sign-sdk-1.3.4.aar")
    implementation files("libs/tutorial-sdk-1.3.4.aar")

    implementation "com.jakewharton.timber:timber:4.7.1"
    implementation "com.squareup.okhttp3:logging-interceptor:4.7.2"
    implementation "org.ejbca.cvc:cert-cvc:1.4.13"
    implementation "org.bouncycastle:bcpkix-jdk15on:1.70"
    implementation "net.sf.scuba:scuba-sc-android:0.0.23"
    implementation "org.jetbrains.kotlin:kotlin-parcelize-runtime:1.8.10"
    implementation "com.squareup.retrofit2:retrofit:2.9.0"
    implementation "com.squareup.retrofit2:converter-gson:2.9.0"
    implementation "org.bouncycastle:bcpkix-jdk15on:1.70"
    implementation "com.tbuonomo:dotsindicator:4.3"
    implementation "com.airbnb.android:lottie:5.0.3"
    implementation "com.scottyab:rootbeer-lib:0.1.0"

Riesenie 2:

  1. Stiahnut vsetky *.aar a *.pom do /libs, vytvorit Maven-like adresarovu strukturu, cize: "\libs\sk\eid\auth-sdk\1.3.4\auth-sdk-1.3.4.pom" atd.
  2. V /settings.gradle upravit Maven repository na uri("libs")
  3. V /app/build.gradle netreba menit nic.

cheers.

gamelaster commented 9 months ago

Vyzerá že to už fixli: https://github.com/eIDmSDK/eID-mSDK-Android?tab=readme-ov-file#in%C5%A1tal%C3%A1cia

gamelaster commented 9 months ago

Dneska som skúsil zbuildiť example appku from scratch a bez akýchkoľvek problémov.