sjhoeksma / cordova-plugin-keychain-touch-id

Touch ID plugin with saving password in keychain for IOS and android
87 stars 160 forks source link

Gradle build failed on Android due to drawable not present #42

Open pom421 opened 6 years ago

pom421 commented 6 years ago

I install the plugin with

cordova plugin add cordova-plugin-keychain-touch-id

Then when i run my app with cordova run android, i got an error

:processDebugResources/Users/pomauguet/workspace/impots/APPLI/trunk/impots-gouv/platforms/android/res/layout/fingerprint_dialog_content.xml:37: AAPT: error: resource drawable/ic_fp_40px (aka fr.gouv.finances.smartphone.android:drawable/ic_fp_40px) not found.

/Users/pomauguet/workspace/impots/APPLI/trunk/impots-gouv/platforms/android/res/layout/fingerprint_dialog_content.xml:37: error: resource drawable/ic_fp_40px (aka fr.gouv.finances.smartphone.android:drawable/ic_fp_40px) not found.
error: failed linking file resources.

Failed to execute aapt
com.android.ide.common.process.ProcessException: Failed to execute aapt
    at com.android.builder.core.AndroidBuilder.processResources(AndroidBuilder.java:796)
    at com.android.build.gradle.tasks.ProcessAndroidResources.invokeAaptForSplit(ProcessAndroidResources.java:551)
    at com.android.build.gradle.tasks.ProcessAndroidResources.doFullTaskAction(ProcessAndroidResources.java:285)

Indeed, there is no ic_fp_40px in the drawable directory.

kikecortes6 commented 6 years ago

i had the same issue, i remove the platform,

$-cordova platform remove android

then uninstall the plugin,

$-ionic cordova plugin removecordova-plugin-keychain-touch-id

clean cordova

$-cordova clean

reinstall it,

$- ionic cordova plugin add cordova-plugin-keychain-touch-id

make the resources,

$-ionic cordova resources android

go to platforms/android/res/ and make a folder name drawable and copy ic_fp_40px.png found on platforms/android/res/drawable-hdpi

copy all drawable folder found on platforms/android/res/ to platforms/android/app/src/main/res

then just build platform

$- ionic cordova build android

Tell me if it works for you!