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

Build fails because of `Theme.AppCompat.Light.NoActionBar not foundà #1038

Closed
teolemon opened this issue Jan 28, 2022 · 10 comments · Fixed by #1063
Closed

Build fails because of `Theme.AppCompat.Light.NoActionBar not foundà #1038

teolemon opened this issue Jan 28, 2022 · 10 comments · Fixed by #1063
Assignees
Labels
🐛 bug Something isn't working CI 🧪 Tests

Comments

@teolemon
Copy link
Member

teolemon commented Jan 28, 2022

What

Log

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':app:processDebugResources'.

A failure occurred while executing com.android.build.gradle.internal.res.LinkApplicationAndroidResourcesTask$TaskAction
Android resource linking failed
ERROR:/home/runner/work/smooth-app/smooth-app/packages/smooth_app/build/app/intermediates/packaged_manifests/debug/AndroidManifest.xml:62: AAPT: error: resource style/Theme.AppCompat.Light.NoActionBar (aka org.openfoodfacts.app:style/Theme.AppCompat.Light.NoActionBar) not found.

@teolemon
Copy link
Member Author

@M123-dev any idea what might have caused it in the Package merge ?

@teolemon teolemon changed the title Theme.AppCompat.Light.NoActionBar) not found Build fails because of `Theme.AppCompat.Light.NoActionBar not foundà Jan 30, 2022
@teolemon teolemon added the 🐛 bug Something isn't working label Jan 30, 2022
@monsieurtanuki
Copy link
Contributor

@teolemon @M123-dev My hunch: compileSdkVersion 31 and targetSdkVersion 31 in build.gradle.
In another 100% Android java project of mine, I've recently upgraded to 31. Could compile. But the app crashed at init time on Android 12 (not nice to have customers report that). Not the same issue, but I think 31 is problematic.

@teolemon
Copy link
Member Author

We are having the same issue on version 1 of OFF. I had to revert. It's probably some behavior change.

@M123-dev
Copy link
Member

M123-dev commented Jan 30, 2022

@monsieurtanuki sounds very likely like it.

From Stackoverflow it sounds like this is some change which happend 2015 when android 3 came out, so it's now probably completely removed.

https://stackoverflow.com/a/31402188/13313941

Example
Theme.AppCompat.Light.NoActionBar
Becomes
Theme.Holo.Light.NoActionBar

@M123-dev
Copy link
Member

I tried updating to Theme.Holo.Light.NoActionBar and without a theme at all, both didn't work. So I created a issue Yalantis/uCrop#816, we have to wait what the maintainer responds

@M123-dev
Copy link
Member

I just tried it with version 30 instead of 31 here https://github.com/openfoodfacts/smooth-app/tree/android-target-30 and it didn't work

The intersting things building on my machine works on 30 and 31

@M123-dev
Copy link
Member

M123-dev commented Feb 1, 2022

So we only need to import these line cause the image editing library depends on this native package, I was thinking about switching to a complete dart alternative, this solved this error, allows better debugging, support for other platforms etc...

Probably little less performance but we're not building a photo editing tool

@M123-dev
Copy link
Member

M123-dev commented Feb 1, 2022

@Excel-Adeniyi
Copy link

I am same Issue here,

Has there any solution yet?

@M123-dev
Copy link
Member

We switched to a different image crop @Excel-Adeniyi #1063

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working CI 🧪 Tests
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants