我有一个FEMALE
在我的数据库中命名的表.它有ID
作为Primary Key
,它有一个Image
列.
我的问题是如何使用SQL查询存储图像?
每当我添加com.google.firebase:firebase-firestore:19.0.0
到Gradle并运行应用程序时,都会发生以下错误。
E/AndroidRuntime: FATAL EXCEPTION: main
Process: meter.meter, PID: 13588
java.lang.NoSuchMethodError: No virtual method setTokenProvider(Lcom/google/firebase/internal/InternalTokenProvider;)V in class Lcom/google/firebase/FirebaseApp; or its super classes (declaration of 'com.google.firebase.FirebaseApp' appears in /data/app/meter.meter-Qosf8nECYGfI4HI93CwJrw==/split_lib_dependencies_apk.apk!classes2.dex)
at com.google.firebase.auth.zzp.create(Unknown Source:4)
at com.google.firebase.components.ComponentRuntime.lambda$new$0(com.google.firebase:firebase-common@@17.0.0:66)
at com.google.firebase.components.ComponentRuntime$$Lambda$1.get(Unknown Source:4)
at com.google.firebase.components.Lazy.get(com.google.firebase:firebase-common@@17.0.0:53)
at com.google.firebase.components.ComponentRuntime.initializeEagerComponents(com.google.firebase:firebase-common@@17.0.0:155)
at com.google.firebase.FirebaseApp.initializeAllApis(com.google.firebase:firebase-common@@17.0.0:642)
at com.google.firebase.FirebaseApp.initializeApp(com.google.firebase:firebase-common@@17.0.0:358)
at com.google.firebase.FirebaseApp.initializeApp(com.google.firebase:firebase-common@@17.0.0:321)
at com.google.firebase.FirebaseApp.initializeApp(com.google.firebase:firebase-common@@17.0.0:305)
at com.google.firebase.provider.FirebaseInitProvider.onCreate(com.google.firebase:firebase-common@@17.0.0:53)
at android.content.ContentProvider.attachInfo(ContentProvider.java:1917)
at android.content.ContentProvider.attachInfo(ContentProvider.java:1892)
at com.google.firebase.provider.FirebaseInitProvider.attachInfo(com.google.firebase:firebase-common@@17.0.0:47)
at android.app.ActivityThread.installProvider(ActivityThread.java:6391)
at android.app.ActivityThread.installContentProviders(ActivityThread.java:5938)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5853)
at android.app.ActivityThread.access$1100(ActivityThread.java:199)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1650)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:193)
at android.app.ActivityThread.main(ActivityThread.java:6669)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858) …
Run Code Online (Sandbox Code Playgroud) android firebase firebase-authentication firebaseui google-cloud-firestore
使用CameraX.LensFacing.FRONT
,在模拟器上进行测试时会发生此错误
E/AndroidRuntime: FATAL EXCEPTION: main
Process: meter.meter, PID: 15289
java.lang.RuntimeException: Unable to start activity ComponentInfo{meter.meter/meter.meter.CameraActivity}: java.lang.IllegalArgumentException: Suggested resolution map missing resolution for camera 1
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2913)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3048)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:78)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1808)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:193)
at android.app.ActivityThread.main(ActivityThread.java:6669)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
Caused by: java.lang.IllegalArgumentException: Suggested resolution map missing resolution for camera 1
at androidx.camera.core.Preview.onSuggestedResolutionUpdated(Preview.java:310)
at androidx.camera.core.UseCase.updateSuggestedResolution(UseCase.java:375)
at androidx.camera.core.CameraX.calculateSuggestedResolutions(CameraX.java:458)
at androidx.camera.core.CameraX.bindToLifecycle(CameraX.java:144)
at meter.meter.CameraActivity.onCreate(CameraActivity.java:68)
at android.app.Activity.performCreate(Activity.java:7136)
at android.app.Activity.performCreate(Activity.java:7127)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1271)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2893) …
Run Code Online (Sandbox Code Playgroud) 如何构建社交网络数据库结构,例如twitter
我们可以在时间轴上关注用户并获取其所有推文,我已经检查了此Firestore-如何构建提要和关注系统,
但帖子中的解决方案似乎存在缺陷。
Firestore是不同的,它需要冗余数据才能有效地访问数据,但是假设我正在跟踪1000个人,并且如果我需要通过查询我正在跟踪的15个用户的数据并使用limit(10)
方法来获取所有这些用户的信息,则orderBy(timeStamp)
可能未读查询之间的帖子,因为我们使用来获取帖子last post timeStamp
,如何在Firestore中构建社交媒体应用程序的数据
我有一个 firebase 项目,运行 firebase 函数时收到以下错误日志,下面是错误日志和代码。错误是
Cannot read property 'toDate' of undefined
,将 a 转换admin.firestore.Timestamp
为Date
格式。如何解决这个错误
错误日志:
Unhandled error TypeError: Cannot read property 'toDate' of undefined
at new PostTable (/srv/lib/index.js:9:34)
at cal.then.docCollection (/srv/lib/index.js:69:39)
at <anonymous>
at process._tickDomainCallback (internal/process/next_tick.js:229:7)
Run Code Online (Sandbox Code Playgroud)
班级
class PostTable {
public commentCount: number
public dateTime: number;
public docId: string;
public post: string;
public userId: string;
public userName: string;
constructor(commentCount: number, dateTime: admin.firestore.Timestamp, docId: string, post: string, userId: string, userName: string) {
this.commentCount = commentCount
this.dateTime = …
Run Code Online (Sandbox Code Playgroud) javascript firebase typescript google-cloud-functions google-cloud-firestore
我已经loop
在我的代码中添加Views
了Layout
,下面的代码是一个Loop which is present in another loop
,我有这么多的循环,Activity takes so much time to start
如何处理这个?
foreach (InfoQuery item in InfoList)
{
if (item == "kitten")
{
if (!done)
{
TextView view= new TextView(ApplicationContext);
view.LayoutParameters = mainLayout.LayoutParameters;
view.TextSize = TypedValue.ApplyDimension(ComplexUnitType.Sp, 3, ApplicationContext.Resources.DisplayMetrics);
view.SetPadding((int)TypedValue.ApplyDimension(ComplexUnitType.Dip, 10, ApplicationContext.Resources.DisplayMetrics), 0, (int)TypedValue.ApplyDimension(ComplexUnitType.Dip, 10, ApplicationContext.Resources.DisplayMetrics), 0);
view.Text = item.position;
layout2.AddView(view,0);
done = true;
}
TextView view2= new TextView(ApplicationContext);
view2.LayoutParameters = mainLayout.LayoutParameters;
view2.TextSize = TypedValue.ApplyDimension(ComplexUnitType.Sp, 3, ApplicationContext.Resources.DisplayMetrics); ;
view2.SetPadding((int)TypedValue.ApplyDimension(ComplexUnitType.Dip, 30, …
Run Code Online (Sandbox Code Playgroud) android xamarin.android android-inflate android-view xamarin
android ×3
firebase ×3
xamarin ×2
android-view ×1
firebaseui ×1
image ×1
imageview ×1
javascript ×1
sql ×1
sql-server ×1
t-sql ×1
typescript ×1
vision-api ×1