Skip to content
This repository has been archived by the owner on Oct 14, 2021. It is now read-only.

Migrate flutter_ffmpeg to support AndroidX #11

Closed
wants to merge 1 commit into from

Conversation

wreppun
Copy link
Contributor

@wreppun wreppun commented Feb 21, 2019

This would require a major version rev (to 0.2.0).

More details on the Great AndroidX Plugin Migration can be found at https://github.com/flutter/flutter/wiki/Postmortem:-AndroidX-plugin-migration

@tanersener
Copy link
Owner

Do you receive errors regarding AndroidX? I'm not sure whether this PR alone will be enough to support AndroidX or not; parent library mobile-ffmpeg still uses old support library.

@wreppun
Copy link
Contributor Author

wreppun commented Feb 23, 2019

In order to get my project building with AndroidX, the only change I had to make for this library was:
compileSdkVersion 28

The other changes are just the result of using Android Studio's auto-migrate tool.

With either the single change, or the changes via migration tool, I don't see any errors.

@tanersener
Copy link
Owner

In order to get my project building with AndroidX, the only change I had to make for this library was:
compileSdkVersion 28

Can you help me understand why you had to add compileSdkVersion 28. Was there an error there?

An application can have a higher compileSdkVersion or targetSdkVersion then its dependencies. It shouldn't be a problem.

@wreppun
Copy link
Contributor Author

wreppun commented Feb 24, 2019

The error was:

FAILURE: Build failed with an exception.                                                   
                                                                                                                                                                  
* What went wrong:                                                              
Execution failed for task ':flutter_ffmpeg:verifyReleaseResources'.                                                                                                               
> java.util.concurrent.ExecutionException: com.android.builder.internal.aapt.v2.Aapt2Exception: Android resource linking failed
  Output:  <path>/build/flutter_ffmpeg/intermediates/res/merged/release/values-v28/values-v28.xml:7: error: resource android:attr/dialogCornerRadius not found.                                                                                                                                                                                
  <path>/build/flutter_ffmpeg/intermediates/res/merged/release/values-v28/values-v28.xml:11: error: resource android:attr/dialogCornerRadius not found.
  <path>/build/flutter_ffmpeg/intermediates/res/merged/release/values/values.xml:959: error: resource android:attr/fontVariationSettings not found.
  <path>/build/flutter_ffmpeg/intermediates/res/merged/release/values/values.xml:960: error: resource android:attr/ttcIndex not found.      
  error: failed linking references.            

This flutter resource talking about AndroidX says:

The error messages from Gradle vary. Sometimes the messages mention “package androidx” or “package android.support” directly. However, often the Gradle error messages aren’t obvious, and instead talk about “AAPT,” “AAPT2,” or otherwise mention failing at “parsing resources.”

The error did not reappear after changing the compileSdkVersion.

@tanersener
Copy link
Owner

Thanks, I managed to reproduce the issue and see the same error.

Can you create this PR towards the development branch? master includes only the released changes and I don't want to publish a new release if possible.

@wreppun
Copy link
Contributor Author

wreppun commented Feb 24, 2019

Closed in favor of #12.

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

Successfully merging this pull request may close these issues.

None yet

2 participants