小编Hos*_*san的帖子

Android:客户端尚未准备就绪..等待进程上线

我有错误,每当我尝试启动应用程序时它都会崩溃.我尝试了几次使用虚拟和我的手机,但它仍然没有

我在项目中使用firebase auth和数据库,虽然没有错误,我想知道它对错误有什么影响.

$ adb shell am start -n "com.example.juice.health/com.example.juice.health.MainActivity" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER
Client not ready yet..Waiting for process to come online
Connected to process 3016 on device Nexus_5X_API_23 [emulator-5554]
Application terminated.
Run Code Online (Sandbox Code Playgroud)

清单:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.juice.health">

<uses-permission android:name="android.permission.INTERNET" />

<application
    android:allowBackup="true"
    android:icon="@mipmap/ic_launcher"
    android:label="@string/app_name"
    android:supportsRtl="true"
    android:theme="@style/AppTheme">
    <activity
        android:name=".MainActivity"
        android:exported="true">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
    <activity android:name=".LoginActivity"/>
    <activity android:name=".ProfileActivity"/>
    <activity android:name=".EditProfileActivity"></activity>
</application>

</manifest>
Run Code Online (Sandbox Code Playgroud)

android adb android-studio

10
推荐指数
2
解决办法
3万
查看次数

'com.github.triplet.play' 任务 ':app:generateAppNameReleasePlayResources' 的配置发现一些问题

在我将 android studio 更新到 3.4.2 和 gradle 后,当我运行此行时

gradlew publishApkappNameRelease 
Run Code Online (Sandbox Code Playgroud)

我收到此错误:

* What went wrong: Some problems were found with the configuration of task ':app:generateappNameReleasePlayResources'.
> File 'E:\Projects\packagename\app\src\main\play' specified for property '$1' does not exist.
> File 'E:\Projects\packagename\app\src\appName\play' specified for property '$2' does not exist.
> File 'E:\Projects\packagename\app\src\release\play' specified for property '$3' does not exist.
> File 'E:\Projects\packagename\app\src\appNameRelease\play' specified for property '$4' does not exist.

* Try: Run with --stacktrace option to get the stack trace. Run with --info or …
Run Code Online (Sandbox Code Playgroud)

android gradle android-gradle-plugin gradle-play-publisher

5
推荐指数
1
解决办法
2768
查看次数

Retrofit2:如何从响应中保存 cookie

我需要从 cookie 添加一些授权信息以响应下一个请求。

它适用于邮递员 - 我提出授权请求,然后是第二个请求,效果很好。但是如果我删除 cookie - 第二个请求返回错误,我必须再次进行授权请求。

但是在我的应用程序中,第二个请求总是返回相同的错误。我试图通过使用拦截器找到所需的 cookie,但我没有找到它

val client = OkHttpClient.Builder()
    .addInterceptor(OAuthInterceptor())

private class OAuthInterceptor : Interceptor {
    override fun intercept(chain: Chain): Response {
        val request = chain.request()
        com.app.logic.toLog("${chain.proceed(request).header("set-cookie")} ") // it's not that cookie what I looking for
        val headers = chain.proceed(request).headers()
        headers.names().forEach {
            val s = headers.get(it)
            com.app.logic.toLog("$it -> $s")
        }
        return chain + (Session.authConsumer?.let { consumer ->
            consumer.sign(request).unwrap() as Request
        } ?: request)
    }
}
Run Code Online (Sandbox Code Playgroud)

有人知道我还能尝试什么吗?

cookies android kotlin okhttp retrofit2

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