Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.

Conversation

@sir-boformer
Copy link
Contributor

@sir-boformer sir-boformer commented Aug 11, 2018

Fixes flutter/flutter#20482

image_picker only depends on android.support.v4.content.FileProvider and android.support.v4.app.ActivityCompat. Both are included in the utils package.

The full appcompat is not needed.

I'm not sure why the old build gradle used api instead of implementation for the dependency. api is not required, so I fixed that as well.

@gerryhigh
Copy link
Contributor

See also this PR #712 which I'm waiting for it to be merged

Copy link
Member

@goderbauer goderbauer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Can you please bump the version number in the pubspec.yaml and update the Changelog so we can merge & publish this change? Thanks!

@sir-boformer
Copy link
Contributor Author

@goderbauer Done.

While we are at it, can you take a look at #716?

Copy link
Member

@goderbauer goderbauer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, will merge after I have resolved the analyzer issue.

@sir-boformer
Copy link
Contributor Author

I think the analyzer issues are now resolved? I bumped the version number again because 0.4.7 was already taken

@goderbauer
Copy link
Member

Can you also update the version in the pubspec.yaml?

@sir-boformer
Copy link
Contributor Author

done

@goderbauer goderbauer merged commit 69380a9 into flutter:master Aug 28, 2018
@goderbauer
Copy link
Member

This is live on pub now.

@slightfoot
Copy link
Member

@goderbauer we started getting issues with this today. Although this might seem a small change but its not a revision change. Because of the dependency change it should at least be a minor version change. I believe that's in the semver recommendations. Either way, it breaks a lot of builds that use image_picker: "^0.4.6" caret restriction.

Currently any 3rd party library, firebase/google or other that depend on play-services currently will break. All of the play service libraries depend on play-services-basement. Which in it's latest version com.google.android.gms:play-services-basement:15.0.1 depends on com.android.support:support-v4:26.1.0.

So for the moment we're building against image_picker 0.4.7.

https://mvnrepository.com/artifact/com.google.android.gms/play-services-basement/15.0.1

@sir-boformer
Copy link
Contributor Author

@slightfoot To fix this, add this to your build.gradle:

dependencies {
    ...
    implementation 'com.android.support:support-v4:27.1.1'
}

@goderbauer The dependency change introduced by this PR caused issues for quite a few people (at least 2 reports today. I also experienced issues when I added Firebase to my app a few days ago, because Firebase ships with an old version of the support library.

To fix this, one must explicitly add the full support library as a dependency.

Maybe it would be better to add the full support library dependency again? It is technically not required for image_picker (and increases the APK size by 1MB), but makes it easier to use for people who use Firebase or other outdated libraries.

@goderbauer
Copy link
Member

@sir-boformer For now we should probably change the dependency back. Do you want to send a PR?

nichtverstehen pushed a commit to nichtverstehen/plugins that referenced this pull request Sep 6, 2018
@l-k22
Copy link

l-k22 commented Sep 28, 2018

I'm having this issue trying to using the current package of image_picker

andreidiaconu pushed a commit to andreidiaconu/plugins that referenced this pull request Feb 17, 2019
andreidiaconu added a commit to andreidiaconu/plugins that referenced this pull request Feb 17, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

image_picker: "com.android.support:appcompat-v7" dependency can be replaced with less heavy "com.android.support:support-core-utils"

6 participants