Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
pom421 opened this issue May 31, 2018 · 1 comment
Open

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

pom421 opened this issue May 31, 2018 · 1 comment

Comments

@pom421
Copy link

pom421 commented May 31, 2018

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
Copy link

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants