BlinkID / blinkid-android

Everything you need to add AI-driven ID scanning into your native Android app.
https://microblink.com/identity/identity-document-scanning/
438 stars 153 forks source link

Error on build project #183

Closed zakblacki closed 4 years ago

zakblacki commented 4 years ago

I just cloned the repository on android when build project error

Error:(15, -1) android-apt-compiler: [main7] C:\Users\zakbl\Desktop\AndroidStudioProjects\blinkid-android\BlinkIDSample\LibUtils\src\main\res\values\styles.xml:15: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.NoActionBar'.

Theses lines are causing issues

    `<style name="Theme.AppTheme" parent="Theme.AppCompat.NoActionBar">
    <item name="colorPrimary">@color/microblink_blue</item>
    <item name="colorPrimaryDark">@color/backgroundDark</item>
    <item name="colorAccent">@color/microblink_blue</item>

    <item name="vpiIconPageIndicatorStyle">@style/Widget.IconPageIndicator</item>
    <item name="vpiTabPageIndicatorStyle">@style/Widget.TabPageIndicator</item>

    <item name="windowNoTitle">true</item>
    <item name="android:windowBackground">@color/background</item>

    <item name="alertDialogTheme">@style/Theme.AppTheme.AlertDialogStyle</item>
</style>

<style name="Theme.AppTheme.FullScreen" parent="Theme.AppTheme">
    <item name="android:windowFullscreen">true</item>
    <item name="android:windowContentOverlay">@null</item>
</style>

<style name="Theme.AppTheme.AlertDialogStyle" parent="ThemeOverlay.AppCompat.Dialog.Alert">
    <item name="android:background">#555</item>
</style>`
i1E commented 4 years ago

Hi @zakblacki,

which sample app you are trying to build? BlinkID SDK depends on androidx.appcompat:appcompat library and theme Theme.AppCompat.NoActionBar is from that library. LibUtils depends on BlinkID SDK and transitively on androidx.appcompat:appcompat library which means that appcompat should be present. Dependencies in build.gradle from LibUtils are:

dependencies {
    implementation("com.microblink:blinkid:${rootProject.ext.blinkIdVersion}@aar") {
        transitive = true // transitive dependency is androidx.appcompat:appcompat
    }
}

Try adding explicit dependency to appcompat:

implementation "androidx.appcompat:appcompat:1.1.0"
zakblacki commented 4 years ago

My bad I opened the project directly after cloning not the source \BlinkIDSample