distriqt / ANE-CustomResources

Android Custom Resources for AIR Applications
https://airnativeextensions.com
15 stars 4 forks source link

Compiled ANE not accepted in AIR 33.1 #49

Closed Marcophono2 closed 4 years ago

Marcophono2 commented 4 years ago

Hello!

I updated my ANEs to the AndroidX level but the new coded CustomResources.ANE stops Flash Builder with the error message that the files are not correct formated. It seems that your repository only compiles on API 27 where 29 is needed. I am just wondering why this isn't a bigger issue. As far as I know aps cannot be without the CustomResources.ANE if they want to use the PushNotifications.ANE!? Or do not use many users the Push ANE?

Best regards Marc

marchbold commented 4 years ago

Can you explain the issue a little more, we aren't having any issues with the custom resources ANEs we have generated for many clients.

Marcophono2 commented 4 years ago

Hi Michael! You are right, that wasn'r really a very clear issue description. :) I am trying to update my Android app the first time since september 2019. So I updates AIR from 32 to 33.1 and all ANEs to the AndroidX level, including changing the firebase ANE to the Google one. The updated com.distriqt.PushNotifications.ANE is the troublemaker for me. As soon as I include that ANE I cannot start my app. It opens for around 0.1 seconds and immediatelly closes again. No debug informations are traced. I replaced all old android support files with the new androidX files but no chance. Then I tried to downgrade to the old android support files level but keeping the new ANE files (not my final way but at the moment that would be okay for a short-term solution). But then I get aapt tool failed:C:\Users\Marcophono\AppData\Local\Temp\4923cc37-66a4-4ce6-b44c-34dcfaf33523\support-compat-27.0.2-res\values\values.xml:7: error: Attribute "fontProviderFetchStrategy" already defined with incompatible format. C:\Users\Marcophono\AppData\Local\Temp\4923cc37-66a4-4ce6-b44c-34dcfaf33523\core-1.0.0-res\values\values.xml:42: Original attribute defined here. C:\Users\Marcophono\AppData\Local\Temp\4923cc37-66a4-4ce6-b44c-34dcfaf33523\support-compat-27.0.2-res\values\values.xml:12: error: Attribute "fontProviderFetchTimeout" already defined with incompatible format. C:\Users\Marcophono\AppData\Local\Temp\4923cc37-66a4-4ce6-b44c-34dcfaf33523\core-1.0.0-res\values\values.xml:54: Original attribute defined here. C:\Users\Marcophono\AppData\Local\Temp\4923cc37-66a4-4ce6-b44c-34dcfaf33523\support-compat-27.0.2-res\values\values.xml:16: error: Attribute "fontStyle" already defined with incompatible format. C:\Users\Marcophono\AppData\Local\Temp\4923cc37-66a4-4ce6-b44c-34dcfaf33523\core-1.0.0-res\values\values.xml:62: Original attribute defined here. I compiled the CustomResources.ANE again with AIR33 but it is compiled with Android API 27.0.2. So I have two different problems: When trying to upgrade to androidX the push ANE prevents my app from launching for longer than 0.1 seconds. When trying to stay with the old android support files but with the new ANE files then the CustomResources.ANE makes trouble because it is only compiles with API 27.

May be it sounds all a bit confused now. But after 9 hours fighting with this I am a bit outpowered. :-)

Best regards Marc

marchbold commented 4 years ago

Our current ANEs will NOT work with the old android support ANEs. So don't even try that, you will get errors. Make sure you have completely removed the old ANEs. Even having them in the same directory as the androidx ANEs can cause issues with some IDEs.

You can ignore the target sdk for the custom resources ANE, this will not be causing an issue.

Sounds like you have an integration issue with the Push Notifications ANE. I'd suggest you post an issue in that repository, firstly check that you have all the new manifest additions and correctly added the new ANE dependencies. If you are using FCM then there are a few changes.

Marcophono2 commented 4 years ago

Thank you very much, Michael! Good to know that the custom resources ANE is not really the trouble maker. And yes, I still had the old ANEs in the directory. :-) But I will also check the manifest entries exactly right after having a couple of hours of sleep. :-) Thanks again for the help and for the quick replys!

Greetings from Germany to the wrong side of this planet! ;) Marc

Marcophono2 commented 4 years ago

Found the trouble maker! I was just looking totally at the wrong end! I missed to update a standard xml entry since androidx to

<provider
            android:name="androidx.lifecycle.ProcessLifecycleOwnerInitializer"
            android:authorities="air.marc.waesche.org.marcophono.lifecycle-process"
            android:exported="false"
            android:multiprocess="true" />

Happy that all is working again! :)

Best regards and thank you! Marc

marchbold commented 4 years ago

Glad you found the issue!