@nativescript/google-signin Configure Placement
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 35/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- android, typescript
- 领域
- authentication, mobile
调研方向
从 issue 中描述的入口点 main.ts/app.ts 以及 @nativescript/google-signin 的 configure 和 signIn 调用开始。将损坏的示例与链接的可正常工作的 pull request 进行比较,然后验证从推荐的入口点进行配置不再产生 Android 错误,并且 signIn 成功。
由索引模型根据 Issue 内容生成。
描述
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
- 主要语言
- TypeScript
- 星标
- 206
- 派生
- 123
- 平均合并
- 2 天 1 小时
- 30 天内合并 PR
- 1
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
NativeScript/plugins 的其他 Issue
-
难度 1/5 1 小时以内 新手友好度 92/100
NativeScript/plugins#680 ·
-
难度 2/5 1-3 小时 新手友好度 82/100
NativeScript/plugins#671 ·
-
难度 1/5 1 小时以内 新手友好度 72/100
NativeScript/plugins#640 ·
-
难度 4/5 3-5 天 新手友好度 45/100
NativeScript/plugins#668 ·
-
难度 4/5 3-5 天 新手友好度 45/100
NativeScript/plugins#665 · 1 条评论 ·
查看 NativeScript/plugins 的全部 Issue
相似的 Issue
-
check:passed streams:add
难度 2/5 1-3 小时 新手友好度 68/100
-
难度 2/5 1-3 小时 新手友好度 76/100
-
难度 2/5 1-3 小时 新手友好度 68/100
-
usability
难度 2/5 1-3 小时 新手友好度 68/100
inmanta/web-console#7367 ·
-
难度 1/5 1 小时以内 新手友好度 78/100
nearform/ag-grid-url-sync#160 ·