NativeScript / NativeScript/plugins
@nativescript/google-signin Configure Placement
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- TypeScript
- Star
- 206
- Fork
- 123
- Merge trung bình
- 2 ngày 1 giờ
- Pull request đã merge (30 ngày)
- 1
Mô tả
From the comment and past experiences I figured the configure method needed to be called in main.ts.
https://github.com/NativeScript/plugins/issues/492#issuecomment-1547155963
Also be sure you have called configure in main.ts (or app.ts depending on project type), eg:
import { GoogleSignin } from '@nativescript/google-signin';
GoogleSignin.configure();
This results in a error
GoogleSignin configuration error: Error: java.lang.NullPointerException: Parameter specified as non-null is null: method kotlin.jvm.internal.Intrinsics.checkNotNullParameter, parameter activity
and a GoogleSignin.signIn() error of
.signIn Error: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean android.content.Intent.migrateExtraStreamToClipData(android.content.Context)' on a null object reference
Putting the configure in a component or service after main.ts, still ensuring it's called only once, fixes this but it conflicts with @NathanWalker's recommendation
Examples made from ns create example-app --ng:
https://github.com/NicholasSmilovic/nativescript-google-signin-demo -> master broken
https://github.com/NicholasSmilovic/nativescript-google-signin-demo/pull/1 -> working
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Bắt đầu với các entry point main.ts/app.ts và các lệnh gọi configure và signIn của @nativescript/google-signin được mô tả trong issue. So sánh ví dụ bị lỗi với pull request đang hoạt động được liên kết, sau đó xác minh rằng việc cấu hình từ entry point được khuyến nghị không còn tạo ra các lỗi Android và signIn thực hiện thành công.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- android, typescript
- Lĩnh vực
- authentication, mobile
- Loại issue
- Lỗi
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 35/100