goderbauer / contact_picker Goto Github PK
View Code? Open in Web Editor NEWA Flutter plugin for picking a contact from the address book.
License: BSD 3-Clause "New" or "Revised" License
A Flutter plugin for picking a contact from the address book.
License: BSD 3-Clause "New" or "Revised" License
I had to modify the following
@Override
public void onMethodCall(MethodCall call, Result result) {
if (call.method.equals("selectContact")) {
if (pendingResult != null) {
pendingResult.error("multiple_requests", "Cancelled by a second request.", null);
pendingResult = null;
}
pendingResult = result;
Intent i = new Intent(Intent.ACTION_PICK, ContactsContract.CommonDataKinds.Phone.CONTENT_URI);
activity.startActivityForResult(i, PICK_CONTACT);
} else {
result.notImplemented();
}
}
to this instead for it to work
@Override
public void onMethodCall(MethodCall call, Result result) {
if (call.method.equals("selectContact")) {
if (pendingResult == null) {
pendingResult = result;
Intent i = new Intent(Intent.ACTION_PICK, ContactsContract.CommonDataKinds.Phone.CONTENT_URI);
activity.startActivityForResult(i, PICK_CONTACT);
} else {
Log.v("ContactPickerPlugin", "Multiple requests may have been made");
}
} else {
result.notImplemented();
}
}
库非常不错,如果能支持多个 FlutterActivity 的情况就更好了。
我这边使用 https://github.com/alibaba-flutter/hybrid_stack_manager 实现 Flutter 和 Native 的混合工程,会多次开启 FlutterActivity,却只注册一次。而 ContactPickerPlugin 只在注册的时候绑定所在的 FlutterActivity,并放在成员变量,用该成员变量来启动联系人 Intent,后续开启新的 FlutterActivity 也不会再更新该成员变量,导致收不到 onActivityResult 回调。
/Users/premware/Downloads/flutter_sdk/.pub-cache/hosted/pub.dartlang.org/contact_picker-0.0.2/ios/Classes/ContactPickerPlugin.m:45:24:
warning: 'CNContactPickerViewController' is only available on iOS 9.0 or newer [-Wunguarded-availability]
- (void)contactPicker:(CNContactPickerViewController *)picker
^
In module 'ContactsUI' imported from
/Users/premware/Downloads/flutter_sdk/.pub-cache/hosted/pub.dartlang.org/contact_picker-0.0.2/ios/Classes/ContactPickerPlugin.m:6:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.2.sdk/System/Library/Frameworks/Conta
ctsUI.framework/Headers/CNContactPickerViewController.h:25:12: note: 'CNContactPickerViewController' has been marked as being
introduced in iOS 9.0 here, but the deployment target is iOS 8.0.0
@interface CNContactPickerViewController : UIViewController
^
/Users/premware/Downloads/flutter_sdk/.pub-cache/hosted/pub.dartlang.org/contact_picker-0.0.2/ios/Classes/ContactPickerPlugin.m:45:1:
note: annotate 'contactPicker:didSelectContactProperty:' with an availability attribute to silence this warning
- (void)contactPicker:(CNContactPickerViewController *)picker
^
/Users/premware/Downloads/flutter_sdk/.pub-cache/hosted/pub.dartlang.org/contact_picker-0.0.2/ios/Classes/ContactPickerPlugin.m:46:31:
warning: 'CNContactProperty' is only available on iOS 9.0 or newer [-Wunguarded-availability]
didSelectContactProperty:(CNContactProperty *)contactProperty {
^
In module 'ContactsUI' imported from
/Users/premware/Downloads/flutter_sdk/.pub-cache/hosted/pub.dartlang.org/contact_picker-0.0.2/ios/Classes/ContactPickerPlugin.m:6:
In module 'Contacts' imported from
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.2.sdk/System/Library/Frameworks/Conta
ctsUI.framework/Headers/CNContactPickerViewController.h:9:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.2.sdk/System/Library/Frameworks/Conta
cts.framework/Headers/CNContactProperty.h:21:12: note: 'CNContactProperty' has been marked as being introduced in iOS 9.0 here, but
the deployment target is iOS 8.0.0
@interface CNContactProperty : NSObject <NSCopying, NSSecureCoding>
^
/Users/premware/Downloads/flutter_sdk/.pub-cache/hosted/pub.dartlang.org/contact_picker-0.0.2/ios/Classes/ContactPickerPlugin.m:45:1:
note: annotate 'contactPicker:didSelectContactProperty:' with an availability attribute to silence this warning
- (void)contactPicker:(CNContactPickerViewController *)picker
^
/Users/premware/Downloads/flutter_sdk/.pub-cache/hosted/pub.dartlang.org/contact_picker-0.0.2/ios/Classes/ContactPickerPlugin.m:58:33:
warning: 'CNContactPickerViewController' is only available on iOS 9.0 or newer [-Wunguarded-availability]
- (void)contactPickerDidCancel:(CNContactPickerViewController *)picker {
^
In module 'ContactsUI' imported from
/Users/premware/Downloads/flutter_sdk/.pub-cache/hosted/pub.dartlang.org/contact_picker-0.0.2/ios/Classes/ContactPickerPlugin.m:6:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.2.sdk/System/Library/Frameworks/Conta
ctsUI.framework/Headers/CNContactPickerViewController.h:25:12: note: 'CNContactPickerViewController' has been marked as being
introduced in iOS 9.0 here, but the deployment target is iOS 8.0.0
@interface CNContactPickerViewController : UIViewController
^
/Users/premware/Downloads/flutter_sdk/.pub-cache/hosted/pub.dartlang.org/contact_picker-0.0.2/ios/Classes/ContactPickerPlugin.m:58:1:
note: annotate 'contactPickerDidCancel:' with an availability attribute to silence this warning
- (void)contactPickerDidCancel:(CNContactPickerViewController *)picker {
^
API_AVAILABLE(ios(9.0))
/Users/premware/Downloads/flutter_sdk/.pub-cache/hosted/pub.dartlang.org/contact_picker-0.0.2/ios/Classes/ContactPickerPlugin.m:33:5:
warning: 'CNContactPickerViewController' is only available on iOS 9.0 or newer [-Wunguarded-availability]
CNContactPickerViewController *contactPicker = [[CNContactPickerViewController alloc] init];
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In module 'ContactsUI' imported from
/Users/premware/Downloads/flutter_sdk/.pub-cache/hosted/pub.dartlang.org/contact_picker-0.0.2/ios/Classes/ContactPickerPlugin.m:6:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.2.sdk/System/Library/Frameworks/Conta
ctsUI.framework/Headers/CNContactPickerViewController.h:25:12: note: 'CNContactPickerViewController' has been marked as being
introduced in iOS 9.0 here, but the deployment target is iOS 8.0.0
@interface CNContactPickerViewController : UIViewController
^
/Users/premware/Downloads/flutter_sdk/.pub-cache/hosted/pub.dartlang.org/contact_picker-0.0.2/ios/Classes/ContactPickerPlugin.m:33:5:
note: enclose 'CNContactPickerViewController' in an @available check to silence this warning
CNContactPickerViewController *contactPicker = [[CNContactPickerViewController alloc] init];
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/premware/Downloads/flutter_sdk/.pub-cache/hosted/pub.dartlang.org/contact_picker-0.0.2/ios/Classes/ContactPickerPlugin.m:33:54:
warning: 'CNContactPickerViewController' is only available on iOS 9.0 or newer [-Wunguarded-availability]
CNContactPickerViewController *contactPicker = [[CNContactPickerViewController alloc] init];
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In module 'ContactsUI' imported from
/Users/premware/Downloads/flutter_sdk/.pub-cache/hosted/pub.dartlang.org/contact_picker-0.0.2/ios/Classes/ContactPickerPlugin.m:6:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.2.sdk/System/Library/Frameworks/Conta
ctsUI.framework/Headers/CNContactPickerViewController.h:25:12: note: 'CNContactPickerViewController' has been marked as being
introduced in iOS 9.0 here, but the deployment target is iOS 8.0.0
@interface CNContactPickerViewController : UIViewController
^
/Users/premware/Downloads/flutter_sdk/.pub-cache/hosted/pub.dartlang.org/contact_picker-0.0.2/ios/Classes/ContactPickerPlugin.m:33:54:
note: enclose 'CNContactPickerViewController' in an @available check to silence this warning
CNContactPickerViewController *contactPicker = [[CNContactPickerViewController alloc] init];
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/premware/Downloads/flutter_sdk/.pub-cache/hosted/pub.dartlang.org/contact_picker-0.0.2/ios/Classes/ContactPickerPlugin.m:35:46:
warning: 'CNContactPhoneNumbersKey' is only available on iOS 9.0 or newer [-Wunguarded-availability]
contactPicker.displayedPropertyKeys = @[ CNContactPhoneNumbersKey ];
^~~~~~~~~~~~~~~~~~~~~~~~
In module 'ContactsUI' imported from
/Users/premware/Downloads/flutter_sdk/.pub-cache/hosted/pub.dartlang.org/contact_picker-0.0.2/ios/Classes/ContactPickerPlugin.m:6:
In module 'Contacts' imported from
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.2.sdk/System/Library/Frameworks/Conta
ctsUI.framework/Headers/CNContactPickerViewController.h:9:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.2.sdk/System/Library/Frameworks/Conta
cts.framework/Headers/CNContact.h:160:34: note: 'CNContactPhoneNumbersKey' has been marked as being introduced in iOS 9.0 here, but
the deployment target is iOS 8.0.0
CONTACTS_EXTERN NSString * const CNContactPhoneNumbersKey NS_AVAILABLE(10_11, 9_0);
^
/Users/premware/Downloads/flutter_sdk/.pub-cache/hosted/pub.dartlang.org/contact_picker-0.0.2/ios/Classes/ContactPickerPlugin.m:35:46:
note: enclose 'CNContactPhoneNumbersKey' in an @available check to silence this warning
contactPicker.displayedPropertyKeys = @[ CNContactPhoneNumbersKey ];
^~~~~~~~~~~~~~~~~~~~~~~~
/Users/premware/Downloads/flutter_sdk/.pub-cache/hosted/pub.dartlang.org/contact_picker-0.0.2/ios/Classes/ContactPickerPlugin.m:47:25:
warning: 'CNContactFormatter' is only available on iOS 9.0 or newer [-Wunguarded-availability]
NSString *fullName = [CNContactFormatter stringFromContact:contactProperty.contact
^~~~~~~~~~~~~~~~~~
In module 'ContactsUI' imported from
/Users/premware/Downloads/flutter_sdk/.pub-cache/hosted/pub.dartlang.org/contact_picker-0.0.2/ios/Classes/ContactPickerPlugin.m:6:
In module 'Contacts' imported from
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.2.sdk/System/Library/Frameworks/Conta
ctsUI.framework/Headers/CNContactPickerViewController.h:9:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.2.sdk/System/Library/Frameworks/Conta
cts.framework/Headers/CNContactFormatter.h:42:12: note: 'CNContactFormatter' has been marked as being introduced in iOS 9.0 here, but
the deployment target is iOS 8.0.0
@interface CNContactFormatter : NSFormatter
^
/Users/premware/Downloads/flutter_sdk/.pub-cache/hosted/pub.dartlang.org/contact_picker-0.0.2/ios/Classes/ContactPickerPlugin.m:47:25:
note: enclose 'CNContactFormatter' in an @available check to silence this warning
NSString *fullName = [CNContactFormatter stringFromContact:contactProperty.contact
^~~~~~~~~~~~~~~~~~
/Users/premware/Downloads/flutter_sdk/.pub-cache/hosted/pub.dartlang.org/contact_picker-0.0.2/ios/Classes/ContactPickerPlugin.m:48:62:
warning: 'CNContactFormatterStyleFullName' is only available on iOS 9.0 or newer [-Wunguarded-availability]
style:CNContactFormatterStyleFullName];
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In module 'ContactsUI' imported from
/Users/premware/Downloads/flutter_sdk/.pub-cache/hosted/pub.dartlang.org/contact_picker-0.0.2/ios/Classes/ContactPickerPlugin.m:6:
In module 'Contacts' imported from
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.2.sdk/System/Library/Frameworks/Conta
ctsUI.framework/Headers/CNContactPickerViewController.h:9:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.2.sdk/System/Library/Frameworks/Conta
cts.framework/Headers/CNContactFormatter.h:17:28: note: 'CNContactFormatterStyle' has been marked as being introduced in iOS 9.0 here,
but the deployment target is iOS 8.0.0
typedef NS_ENUM(NSInteger, CNContactFormatterStyle)
^
/Users/premware/Downloads/flutter_sdk/.pub-cache/hosted/pub.dartlang.org/contact_picker-0.0.2/ios/Classes/ContactPickerPlugin.m:48:62:
note: enclose 'CNContactFormatterStyleFullName' in an @available check to silence this warning
style:CNContactFormatterStyleFullName];
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/premware/Downloads/flutter_sdk/.pub-cache/hosted/pub.dartlang.org/contact_picker-0.0.2/ios/Classes/ContactPickerPlugin.m:51:37:
warning: 'CNLabeledValue' is only available on iOS 9.0 or newer [-Wunguarded-availability]
[CNLabeledValue localizedStringForLabel:contactProperty.label],
^~~~~~~~~~~~~~
In module 'ContactsUI' imported from
/Users/premware/Downloads/flutter_sdk/.pub-cache/hosted/pub.dartlang.org/contact_picker-0.0.2/ios/Classes/ContactPickerPlugin.m:6:
In module 'Contacts' imported from
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.2.sdk/System/Library/Frameworks/Conta
ctsUI.framework/Headers/CNContactPickerViewController.h:9:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.2.sdk/System/Library/Frameworks/Conta
cts.framework/Headers/CNLabeledValue.h:18:12: note: 'CNLabeledValue' has been marked as being introduced in iOS 9.0 here, but the
deployment target is iOS 8.0.0
@interface CNLabeledValue<ValueType : id <NSCopying, NSSecureCoding>> : NSObject <NSCopying, NSSecureCoding>
^
/Users/premware/Downloads/flutter_sdk/.pub-cache/hosted/pub.dartlang.org/contact_picker-0.0.2/ios/Classes/ContactPickerPlugin.m:51:37:
note: enclose 'CNLabeledValue' in an @available check to silence this warning
[CNLabeledValue localizedStringForLabel:contactProperty.label],
^~~~~~~~~~~~~~
Gets stuck here
Installing build/app/outputs/apk/app.apk...
Removing the contact_picker package entirely from my app was the only way to get it running again.
My system setup (in case it helps anyone)
[✓] Flutter (Channel beta, v0.9.4, on Mac OS X 10.13.6 17G65, locale en-US)
• Flutter version 0.9.4 at /Users/jess/development/flutter
• Framework revision f37c235c32 (6 weeks ago), 2018-09-25 17:45:40 -0400
• Engine revision 74625aed32
• Dart version 2.1.0-dev.5.0.flutter-a2eb050044
[✓] Android toolchain - develop for Android devices (Android SDK 28.0.2)
• Android SDK at /Users/jess/Library/Android/sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-28, build-tools 28.0.2
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b01)
• All Android licenses accepted.
[✓] iOS toolchain - develop for iOS devices (Xcode 10.1)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 10.1, Build version 10B61
• ios-deploy 1.9.2
• CocoaPods version 1.5.3
[✓] Android Studio (version 3.1)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin version 27.1.1
• Dart plugin version 173.4700
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b01)
[✓] Connected devices (1 available)
• XT1585 • ZY222TP46P • android-arm64 • Android 7.0 (API 24)
I have used contact_picker for contact search in flutter app, but when i click the back option, i received response "unfortunately app was closed".
Please guide me, how to fix the issue.
Thanks,
[VERBOSE-2:ui_dart_state.cc(157)] Unhandled Exception: MissingPluginException(No implementation found for method selectContact on channel contact_picker)
#0 MethodChannel.invokeMethod (package:flutter/src/services/platform_channel.dart:319:7)
<asynchronous suspension>
#1 ContactPicker.selectContact (package:contact_picker/contact_picker.dart:23:24)
#2 AddFriendState.build.<anonymous closure> (package:socia_reto/add_friend.dart:30:56)
#3 _InkResponseState._handleTap (package:flutter/src/material/ink_well.dart:706:14)
#4 _InkResponseState.build.<anonymous closure> (package:flutter/src/material/ink_well.dart:789:36)
#5 GestureRecognizer.invokeCallback (package:flutter/src/gestures/recognizer.dart:182:24)
#6 TapGestureRecognizer.handleTapUp (package:flutter/src/gestures/tap.dart:486:11)
#7 BaseTapGestureRecognizer._checkUp (package:flutter/src/gestures/tap.dart:264:5)
#8 BaseTapGestureRecognizer.handlePrimaryPointer (package:flutter/src/gestures/tap.dart:199:7<…>
while we click contacts from phonebook, the app suddenly crashed. But there was no issue in the previous versions
is it possible to select more than one contact?
It fails to build with this error.
/Users/xxxxxxxxx/.pub-cache/hosted/pub.dartlang.org/contact_picker-0.0.2/android/build.gradle:34: Error: Google Play requires that apps target API level 26 or higher.
[ExpiredTargetSdkVersion]
targetSdkVersion 25
~~~~~~~~~~~~~~~~~~~
The SDK version needs to be updated.
Sorry if this is a stupid issue, this is my first Android app and first contact with Dart or Flutter.
The relevant part of my code that calls this library:
onPressed: () async {
try {
var contact = await _contactPicker.selectContact();
if (contact != null) {
R.navigateTo(
context,
'/peer/${contact.phoneNumber.number}',
transition: TransitionType.fadeIn,
);
} else {
print('contact is null');
}
} catch (exc, st) {
print('exception');
print(exc);
print(st);
}
},
The contact picker is shown correctly and when I do select a contact from the contact picker it does what I expect (the route navigation), but when I click on "back" in the contact picker the app crashes.
Before crashing, it prints 'contact is null'
, which is odd. Adding that try-catch
block didn't change a thing.
The error logs from the Flutter CLI:
I/Timeline( 8684): Timeline: Activity_idle id: android.os.BinderProxy@39635fb9 time:9891368
I/OpenGLRenderer( 8684): Initialized EGL, version 1.4
I/Timeline( 8684): Timeline: Activity_idle id: android.os.BinderProxy@39635fb9 time:9908917
I/OpenGLRenderer( 8684): Initialized EGL, version 1.4
I/Timeline( 8684): Timeline: Activity_idle id: android.os.BinderProxy@39635fb9 time:9918850
I/flutter ( 8684): contact is null
D/AndroidRuntime( 8684): Shutting down VM
E/AndroidRuntime( 8684): FATAL EXCEPTION: main
E/AndroidRuntime( 8684): Process: com.yourcompany.debtmanager, PID: 8684
E/AndroidRuntime( 8684): java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=2015, result=0, data=null} to activity {com.yourcompany.debtmanager/com.yourcompany.debtmanager.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'android.net.Uri android.content.Intent.getData()' on a null object reference
E/AndroidRuntime( 8684): at android.app.ActivityThread.deliverResults(ActivityThread.java:3607)
E/AndroidRuntime( 8684): at android.app.ActivityThread.handleSendResult(ActivityThread.java:3650)
E/AndroidRuntime( 8684): at android.app.ActivityThread.access$1400(ActivityThread.java:154)
E/AndroidRuntime( 8684): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1370)
E/AndroidRuntime( 8684): at android.os.Handler.dispatchMessage(Handler.java:102)
E/AndroidRuntime( 8684): at android.os.Looper.loop(Looper.java:135)
E/AndroidRuntime( 8684): at android.app.ActivityThread.main(ActivityThread.java:5294)
E/AndroidRuntime( 8684): at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime( 8684): at java.lang.reflect.Method.invoke(Method.java:372)
E/AndroidRuntime( 8684): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:904)
E/AndroidRuntime( 8684): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:699)
E/AndroidRuntime( 8684): Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'android.net.Uri android.content.Intent.getData()' on a null object reference
E/AndroidRuntime( 8684): at net.goderbauer.flutter.contactpicker.ContactPickerPlugin.onActivityResult(ContactPickerPlugin.java:66)
E/AndroidRuntime( 8684): at io.flutter.app.FlutterActivityDelegate.onActivityResult(FlutterActivityDelegate.java:137)
E/AndroidRuntime( 8684): at io.flutter.app.FlutterActivity.onActivityResult(FlutterActivity.java:103)
E/AndroidRuntime( 8684): at android.app.Activity.dispatchActivityResult(Activity.java:6192)
E/AndroidRuntime( 8684): at android.app.ActivityThread.deliverResults(ActivityThread.java:3603)
E/AndroidRuntime( 8684): ... 10 more
I/Process ( 8684): Sending signal. PID: 8684 SIG: 9
Lost connection to device.
full logs are below:
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':contact_picker:verifyReleaseResources'.
> 1 exception was raised by workers:
com.android.builder.internal.aapt.v2.Aapt2Exception: Android resource linking failed
flutter/build/contact_picker/intermediates/res/merged/release/values/values.xml:168: error: resource android:attr/fontStyle not found.
flutter/build/contact_picker/intermediates/res/merged/release/values/values.xml:169: error: resource android:attr/font not found.
flutter/build/contact_picker/intermediates/res/merged/release/values/values.xml:170: error: resource android:attr/fontWeight not found.
flutter/build/contact_picker/intermediates/res/merged/release/values/values.xml:171: error: resource android:attr/fontVariationSettings not found.
flutter/build/contact_picker/intermediates/res/merged/release/values/values.xml:172: error: resource android:attr/ttcIndex not found.
error: failed linking references.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
this is while i am trying to make release build but app is running fine.
FAILURE: Build failed with an exception.
Where:
Initialization script '/Users/ruqqzz-macbook/FlutterSDK/flutter/packages/flutter_tools/gradle/aar_init_script.gradle' line: 133
What went wrong:
Could not get unknown property 'runtimeConfiguration' for object of type com.android.build.gradle.internal.api.LibraryVariantImpl.
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
The plugin contact_picker could not be built due to the issue above.
Hi,
When i pick the contact using contact_picker, its just redirect to back page instead of showing the contact information for particular selected contact.
Thanks,
Karthick
Hello @goderbauer, do you still want to maintain this plugin?
I am asking this because I see that you haven't been replying to issues nor commenting on PRs opened in this repo since may 2018.
In such situations, I would usually create a plugin myself with a variation of the name and include upgrades / bug fixes, but I realize that others have already done this:
So I would rather avoid squatting the "yet_another_contact_picker" package name, which would add even more confusion to that which one has to go through for such a simple functionality.
I would more specifically be interested in upgrading it to the latest Android embedding v2, but I guess there are other improvements that this plugin could benefit from.
Any reply would be appreciated :) thanks
It will caused error handler application such as File Application in the choose dialog by using ContactsContract.CommonDataKinds.Phone.CONTENT_URI as the contact_picker on MI 9. But if changed into ContactsContract.CommonDataKinds.Phone.CONTENT_TYPE, everything works fine.Please figure out if I was wrong, thanks.
Please update this to null safety
First I have selected one contact from the list it works fine, but when I try to change selected contact with another one it does not do it.
Getting the ff error when i run pod install
:
No podspec found for
contact_picker_webin
.symlinks/plugins/contact_picker_web/ios``
This is the output from flutter doctor -v:
[✓] Flutter (Channel stable, 1.22.6, on Mac OS X 10.14.6 18G3020 darwin-x64, locale en)
• Flutter version 1.22.6 at /Users/ralph/Documents/flutter
• Framework revision 9b2d32b605 (5 weeks ago), 2021-01-22 14:36:39 -0800
• Engine revision 2f0af37152
• Dart version 2.10.5
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
• Android SDK at /Users/ralph/Library/Android/sdk
• Platform android-30, build-tools 29.0.2
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 11.3.1)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 11.3.1, Build version 11C504
• CocoaPods version 1.9.3
[!] Android Studio (version 4.1)
• Android Studio at /Applications/Android Studio.app/Contents
✗ Flutter plugin not installed; this adds Flutter specific functionality.
✗ Dart plugin not installed; this adds Dart specific functionality.
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)
[✓] VS Code
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.19.0
[✓] Connected device (1 available)
• iPhone 11 (mobile) • 5102DF40-3298-412C-8CDE-E488F24AFB48 • ios • com.apple.CoreSimulator.SimRuntime.iOS-13-3 (simulator)
! Doctor found issues in 1 category.
When I use it on iOS platform this is the error I get. But it works well on Android
can not support androidx ,will error when build apk
The plugins contact_picker, flutter_contact
use a deprecated version of the Android embedding.
To avoid unexpected runtime failures, or future build failures, try to see if these plugins support the Android V2 embedding. Otherwise, consider removing them since a future release
If you are plugin author, take a look at the docs for migrating the plugin to the V2 embedding: https://flutter.dev/go/android-plugin-migration.se of Flutter will remove these deprecated APIs.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.