将firebase项目从旧域升级到新的google firebase域时出现以下错误.
无法解决:com.google.firebase:firebase-core:9.0.0
我按照Firebase文档中提到的步骤,在" 将Firebase添加到Android项目"一节中,主题可用库.
我有什么选择来解决这个错误?
为什么RelativeLayout
替换为ConstraintLayout
android空活动的默认布局文件.我需要知道为什么要使用ConstraintLayout
它,它为我们提供了什么其他好处.
运行启用了即时运行的应用程序时,Android Studio会出错.我今天已将我的android工作室更新为2.3,从那时起它向我展示了以上信息.
目前,我在我的应用程序中显示手机的所有联系人作为自定义回收站视图.到目前为止,我在列表项视图中显示联系人的姓名,手机号码和个人资料图片,但我需要获取该联系人的所有信息,并在自定义详细信息页面中单击我的应用程序的列表项时显示该信息.
对于每个联系人,可以使用不同的信息集,例如我收到的电子邮件很少,但很少有联系人不存在.
我的问题是
如何获取给定联系人的所有信息而不会错过任何一个位.是否有一个结构可以遍历并检查每个键的值?
此外,当我在我的应用列表中填充系统联系人时,我在列表中多次找到相同的联系人.我认为这是因为在我的设备的帐户管理器中,许多帐户都注册了相同的号码,例如whatsapp,gmail.如果是这样,如何在我的列表中只显示该号码一次.
android android-contentresolver contactscontract android-contentprovider
在我的api资源管理器中,我在向端点执行插入时遇到以下错误,该端点将一些数据插入到firebase中.
503
- Show headers -
{
"error": {
"errors": [
{
"domain": "global",
"reason": "backendError",
"message": "java.lang.IllegalStateException: This feature is only available to backend instances."
}
],
"code": 503,
"message": "java.lang.IllegalStateException: This feature is only available to backend instances."
}
}
Run Code Online (Sandbox Code Playgroud)
此外,我在端点类中使用以下代码,其中firebase是静态对象引用.
FirebaseOptions options = new FirebaseOptions.Builder()
.setServiceAccount(servletContext.getResourceAsStream("/WEB-INF/google-services.json"))
.setDatabaseUrl("https://contactifyapp.firebaseio.com/")
.build();
if (firebaseApp == null)
firebaseApp = FirebaseApp.initializeApp(options);
// As an admin, the app has access to read and write all data, regardless of Security Rules
DatabaseReference ref = FirebaseDatabase …
Run Code Online (Sandbox Code Playgroud) java google-app-engine android google-cloud-endpoints firebase-realtime-database
我从Firebase控制台下载了我的服务帐户凭据json文件,将它放在GAE端点项目的主目录中,当我在本地运行它时,它会给出安全性异常.
java.security.AccessControlException: access denied ("java.io.FilePermission" "\src\main\secret.json" "read")
Run Code Online (Sandbox Code Playgroud)
我尝试将.json文件放在src目录下,但没有帮助.
google-app-engine android json google-cloud-endpoints firebase-realtime-database
这似乎是一个错误的问题,但听我说.当我调用System.currentTimeMillis()时,它给了我秒,当我从在线毫秒转换为人类可读格式时,转换器给我GMT或UTC时间而不是我当地时间.有没有办法以毫秒为单位获得当前的本地时间,因为当我输入当地时间时,在线转换器上的毫秒值会发生变化.
总而言之,我的问题是以毫秒为单位获取当前本地时间,这与我在java中使用System.currentTimeMillis()函数的方式有所不同.
在我的回收视图中,当我在列表中向上滚动时,会触发 swiperefreshlayout ,这会阻碍列表向上移动。我浏览了这个博客,但它解决了列表视图的这个问题。对于 recycleview 的这个问题,是否有任何类似的解决方法,因为本博客中使用的 onscrollListener 已被弃用。
<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/main_content"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
app:layout_scrollFlags="scroll|exitUntilCollapsed"
tools:context="com.morpho.innovationlab.trustwall.Dashboard">
<android.support.design.widget.AppBarLayout
android:id="@+id/appbar"
android:layout_width="match_parent"
android:layout_height="250dp"
android:fitsSystemWindows="true"
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar">
<android.support.design.widget.CollapsingToolbarLayout
android:id="@+id/collapsing_toolbar"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
app:contentScrim="?attr/colorPrimary"
app:expandedTitleMarginEnd="64dp"
app:expandedTitleMarginStart="48dp"
app:layout_scrollFlags="scroll|exitUntilCollapsed">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal"
app:layout_collapseMode="parallax"
app:layout_scrollFlags="scroll|enterAlways|enterAlwaysCollapsed">
<ImageView
android:id="@+id/backdrop"
android:layout_width="100dp"
android:layout_height="100dp"
android:layout_margin="10dp"
android:importantForAccessibility="no"
android:src="@drawable/tw_logo"
app:layout_collapseMode="parallax"
app:layout_scrollFlags="scroll|enterAlways|enterAlwaysCollapsed" />
<LinearLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_margin="40dp"
android:layout_weight="1"
android:orientation="vertical">
<TextView
android:id="@android:id/text1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Trustwall"
android:textColor="@android:color/white"
android:textSize="24sp"
app:layout_collapseMode="parallax"
app:layout_scrollFlags="scroll|enterAlways|enterAlwaysCollapsed" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Your Privacy is our priority"
android:textColor="@android:color/white"
android:textSize="12sp"
app:layout_collapseMode="parallax"
app:layout_scrollFlags="scroll|enterAlways|enterAlwaysCollapsed" />
</LinearLayout> …
Run Code Online (Sandbox Code Playgroud) 我试图使用android studio工具添加firebase,但我在Android studio项目结构的开发者服务中找不到任何云模块.
我可以使用手动步骤执行此操作,但想知道为什么我在Android Studio中没有看到它.是否由于一些缺少的插件要求?
即使我们到达列表的末尾(顶部或底部),当我们尝试滚动时,如何更改 recyclerview 上的灰色或白色叠加层。我找不到可以用来执行此操作的属性名称。