小编par*_*ola的帖子

如何使用 Retrofit 2.0 绕过 android SSL 证书检查

我是android编程的新手。因此,任何帮助将不胜感激:所以我正在开发一个新项目,其中我使用 Retrofit 2.0 beta 2(Rest Client)。所发生的情况是,我用于 Web 服务的网站未经验证,并且没有 SSL 证书。谁能帮我绕过 SSL 证书检查。

java ssl android ssl-certificate

7
推荐指数
1
解决办法
6491
查看次数

Android Studio 2.2预览3布局错误

我刚刚更新了我android studio2.2 Preview 3尝试新的constraint layout我把一个edittext放入布局并在我的手机上运行应用程序但这就是我得到的

例

然后我尝试将constraint layout代码转换回代码之前constraint layout,结果是一样的.

activity_main.xml

<?xml version="1.0" encoding="utf-8"?>
<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:layout_width="match_parent"
    android:layout_height="match_parent"
    android:fitsSystemWindows="true"
    tools:context="com.ellohinc.constrainttest.MainActivity">

    <android.support.design.widget.AppBarLayout
        android:layout_height="wrap_content"
        android:layout_width="match_parent"
        android:theme="@style/AppTheme.AppBarOverlay">

        <android.support.v7.widget.Toolbar
            android:id="@+id/toolbar"
            android:layout_width="match_parent"
            android:layout_height="?attr/actionBarSize"
            android:background="?attr/colorPrimary"
            app:popupTheme="@style/AppTheme.PopupOverlay" />

    </android.support.design.widget.AppBarLayout>

    <include layout="@layout/content_main"/>

    <android.support.design.widget.FloatingActionButton
        android:id="@+id/fab"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="bottom|end"
        android:layout_margin="@dimen/fab_margin"
        android:src="@android:drawable/ic_dialog_email" />
Run Code Online (Sandbox Code Playgroud)

content_main.xml

<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:id="@+id/content_main"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    app:layout_behavior="@string/appbar_scrolling_view_behavior"
    tools:showIn="@layout/activity_main"
    tools:context="com.ellohinc.constrainttest.MainActivity">

    <TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="Hello World!"
        app:layout_constraintBottom_toBottomOf="@+id/content_main"
        app:layout_constraintLeft_toLeftOf="@+id/content_main"
        app:layout_constraintRight_toRightOf="@+id/content_main"
        app:layout_constraintTop_toTopOf="@+id/content_main" />

    </android.support.constraint.ConstraintLayout>
Run Code Online (Sandbox Code Playgroud)

请任何帮助将不胜感激.

java android android-layout android-studio android-studio-2.2

7
推荐指数
1
解决办法
956
查看次数

在 Cloud Firestore 中使用顺序 ID 的限制

我在stackoverflow帖子中读到(链接在这里

通过为文档使用可预测的(例如顺序的)ID,您可以增加到达后端基础设施热点的机会。这降低了写操作的可扩展性。

我想如果有人能更好地解释使用顺序或用户提供的 ID 时可能发生的限制。

firebase google-cloud-firestore

4
推荐指数
1
解决办法
924
查看次数

Javascript/NodeJS 中的协议缓冲区字段选项

如何获取与协议缓冲区字段相关的选项?

假设我有一个带有自定义选项的字段,例如:

syntax = "proto3";

package main;

import "google/protobuf/descriptor.proto";

extend google.protobuf.FieldOptions {
   bool required = 7000;
}

message Person {
  string name = 1 [(required) = true];
}
Run Code Online (Sandbox Code Playgroud)

生成了 js 文件protoc

syntax = "proto3";

package main;

import "google/protobuf/descriptor.proto";

extend google.protobuf.FieldOptions {
   bool required = 7000;
}

message Person {
  string name = 1 [(required) = true];
}
Run Code Online (Sandbox Code Playgroud)

我已经阅读了如何从此处检索其他语言的选项,但似乎可以在 Javascript 中进行任何操作。

任何帮助将不胜感激!

javascript protocol-buffers node.js protoc

3
推荐指数
1
解决办法
1554
查看次数