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

[Bug]: Android build error with API Level 34 AND Unity 2020.3.42 #746

Closed
1 task done
super3dgames opened this issue Jul 14, 2024 · 3 comments
Closed
1 task done

Comments

@super3dgames
Copy link

super3dgames commented Jul 14, 2024

What happened?

BUILD ERROR

  • What went wrong:
    Execution failed for task ':launcher:processReleaseResources'.

A failure occurred while executing com.android.build.gradle.internal.res.LinkApplicationAndroidResourcesTask$TaskAction
AAPT2 aapt2-4.2.1-7147631-windows Daemon #0: Unexpected error during link, attempting to stop daemon.
This should not happen under normal circumstances, please file an issue if it does.

Error is AAPT2 aapt2-4.2.1-7147631-windows Daemon #0: Unexpected error during link, attempting to stop daemon.

Build Success without OneSignal Plugin

Error unity form : https://forum.unity.com/threads/cant-build-for-android-34.1486539/

Steps to reproduce?

1. create blank project
2. import OneSignal plugins
3. build android apk with API Level 34

What did you expect to happen?

Please fix this issue

Unity version

2020.3.42

OneSignal Unity SDK version

5.1.7

Platform

Android

Relevant log output

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@jkasten2
Copy link
Member

jkasten2 commented Jul 15, 2024

@super3dgames thanks for reporting!

I read through Unity forum link you shared and the concussion seems to be that OneSignal uses androidx.legacy:legacy-support-v4 which isn't compatible specifically when targeting Android API Level 34 AND using an older version of AGP (Android Gradle Plugin)

The options to resolve this issue are:

  1. Wait for PR [Bug]: Android build error with API Level 34 AND Unity 2020.3.42 #746 to land in a future OneSignal-Unity-SDK update.
  2. Upgrade to Unity 2022.3 or higher (since this uses a newer enough AGP version)
  3. Export your game as an Android Studio Project. Update the requirements to minimum AGP 7.2.0 / Gradle 7.2.0 / Java 11 (source)
  4. Target Android API Level 33. (temporary, as Google Play Store requires API 34 starting 2024/08/31, however you may request an extension from them)

@super3dgames
Copy link
Author

Thanks for your answer . but with Target Android API Level 33 we already success to build apk.
We will try your provided steps.

@jkasten2 jkasten2 changed the title [Bug]: Android build error with API Level 34 [Bug]: Android build error with API Level 34 AND Unity 2020.3.42 Jul 16, 2024
@shepherd-l
Copy link
Contributor

Closing due to inactivity. If you are still having issues, feel free to open a new issue

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

3 participants