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

Android resource linking failed #569

Closed
PhillippOhlandt opened this Issue Apr 8, 2019 · 2 comments

Comments

Projects
None yet
2 participants
@PhillippOhlandt
Copy link

PhillippOhlandt commented Apr 8, 2019

Your Environment

  • Plugin version: ^3.0.3
  • Platform: Android
  • OS version: 9
  • Device manufacturer and model: Oneplus 6
  • Running in Simulator: no
  • Cordova version (cordova -v): 9.0.0
  • Cordova platform version (cordova platform ls): android 8.0.0
  • Plugin configuration options: Standard from Readme
  • Link to your project:

Context

I installed the plugin with the default config from the readme (for config.xml) and tried to generate the APK.

Expected Behavior

The APK gets generated properly and the app functions the same way as before.

Actual Behavior

I get a compile error:

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:processReleaseResources'.
> Android resource linking failed
  /project-path/platforms/android/app/src/main/res/xml/authenticator.xml:2: AAPT: error: resource mipmap/icon (aka app.package.name:mipmap/icon) not found.

  error: failed linking file resources.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 8s
23 actionable tasks: 1 executed, 22 up-to-date
/project-path/platforms/android/gradlew: Command failed with exit code 1 Error output:
FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:processReleaseResources'.
> Android resource linking failed
  /project-path/platforms/android/app/src/main/res/xml/authenticator.xml:2: AAPT: error: resource mipmap/icon (aka app.package.name:mipmap/icon) not found.

  error: failed linking file resources.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 8s

Possible Fix

There seems to be something missing in my project I think.

Steps to Reproduce

  1. run the installation command from README
  2. add the config entries to config.xml
  3. deleted plugins and platforms folder content
  4. run cordova prepare to regenerate plugins and platforms
  5. run cordova build android --release

Context

At this stage, I just want the APK to generate with the plugin being installed

Debug logs

Relevant compile output is shown above.

@rathodkaran07

This comment has been minimized.

Copy link

rathodkaran07 commented Apr 9, 2019

Is this solved?

@PhillippOhlandt

This comment has been minimized.

Copy link
Author

PhillippOhlandt commented Apr 9, 2019

Yes, I had to configure the plugin to use ic_launcher instead of icon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.