-
Notifications
You must be signed in to change notification settings - Fork 664
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
Errors while building on android device #30
Comments
It seems that it can't find the plugin somehow. Run |
hi, thank you for your concern, I did exactly what you said. It runs on ios without problem but not on android. here are the logs. `flutter build apk FAILURE: Build failed with an exception.
BUİLD FAILED in 43s Process finished with exit code 1.` Here is the flutter doctor results ! Doctor found issues in 1 category. Process finished with exit code 0.` |
What’s the minimum and target version of your app |
Dear Miguel, |
Would you mind to try the Replace your file picker dependency in the
|
@xyzbilal is this still happening with the solution provided? |
@miguelpruivo i was having exactly the same problem. a Flutter upgrade forced me to target sdk 28 and to set the |
and i should note iOS builds now fail too, with:
i can't tell if that's a result of the image_picker_modern package itself or whether it's missing from the beta git branch. |
I'm sorry I was focused to finish a project. in couple of days I will try it. |
Hey, I would like you to know that I was facing the same problem but after trying the beta branch the error disappeared. However, now image_picker_modern is broken. |
possible to use image_picker as the dependency and not image_picker_modern? the former has already handled the androidX migration: https://pub.dartlang.org/packages/image_picker#-changelog-tab- |
@blaneyneil @Hussain-AlBayyat I just reverted it back to Could you clean your project and see if it is working now? Thank you. |
i removed my .pub-cache and ran packages get again, cleaned, and still got this trying to build android: The following Dart file: |
@blaneyneil no, it's not there actually as you can see here and here. Maybe try to run |
It is working now, thank you. |
yes, this is working. thanks much. the git repo was cached so kept pulling in the old beta. and then another package broke because of androidX... |
Good to know, I'll try to update Leaving this issue open as of now so others can see it. |
Works nicely thank you for your effort. |
Version 1.2.0 is now out on |
Hi, I m receiving errors while building project for android devices. I searched for the solution but no idea about it. any idea?
/Users/bilalsimsek/Desktop/Flutter/flutter/.pub-cache/hosted/pub.dartlang.org/file_picker-1.1.1/android/src/main/java/com/mr/flutter/plugin/filepicker/FilePickerPlugin.java:10: error: cannot find symbol
import android.support.v4.app.ActivityCompat;
^
symbol: class ActivityCompat
location: package android.support.v4.app
/Users/bilalsimsek/Desktop/Flutter/flutter/.pub-cache/hosted/pub.dartlang.org/file_picker-1.1.1/android/src/main/java/com/mr/flutter/plugin/filepicker/FilePickerPlugin.java:11: error: package android.support.v4.content does not exist
import android.support.v4.content.ContextCompat;
^
/Users/bilalsimsek/Desktop/Flutter/flutter/.pub-cache/hosted/pub.dartlang.org/file_picker-1.1.1/android/src/main/java/com/mr/flutter/plugin/filepicker/FilePickerPlugin.java:127: error: cannot find symbol
return PackageManager.PERMISSION_GRANTED == ContextCompat.checkSelfPermission(activity, permission);
^
symbol: variable ContextCompat
location: class FilePickerPlugin
/Users/bilalsimsek/Desktop/Flutter/flutter/.pub-cache/hosted/pub.dartlang.org/file_picker-1.1.1/android/src/main/java/com/mr/flutter/plugin/filepicker/FilePickerPlugin.java:135: error: cannot find symbol
ActivityCompat.requestPermissions(activity, perm, PERM_CODE);
^
symbol: variable ActivityCompat
location: class FilePickerPlugin
The text was updated successfully, but these errors were encountered: