我启动了 Android 模拟器 (Genymotion) 应用程序。问题是我无法检查 Chrome 开发工具中的任何内容(请参见下面的屏幕截图)。有小费吗 ?
(地址栏)中的 Google Chrome 开发工具
这是我在 Chrome chrome://inspect/ 中输入此 URL 后看到的内容
TrainerWorkoutApplication.java
import android.app.Application;
import android.content.Context;
import com.facebook.stetho.Stetho;
public class TrainerWorkoutApplication extends Application {
@Override
public void onCreate() {
super.onCreate();
Stetho.initialize(Stetho.newInitializerBuilder(this)
.enableWebKitInspector(Stetho.defaultInspectorModulesProvider(this))
.build());
} // onCreate()
} // TrainerWorkoutApplication
登录活动.java
package com.trainerworkout.trainerworkout.activity;
//...
/** As a personal trainer I need to log in so that I can have access to the app. */
public class LogInActivity extends AppCompatActivity {
public static OkHttpClient client;
private OkHttpClient.Builder builder = new OkHttpClient.Builder();
@Override
protected void onCreate(Bundle savedInstanceState) {
// ...
builder.addInterceptor(new AddCookiesInterceptor(context));
builder.addInterceptor(new ReceivedCookiesInterceptor(context));
builder.addNetworkInterceptor(new StethoInterceptor());
client = builder.build();
} // onCreate()
//...
} // LogInActivity
build.gradle(应用程序)
apply plugin: 'com.android.application'
android {
//...
} // android
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.3.0'
compile 'com.jakewharton:butterknife:7.0.1'
compile 'com.squareup.okhttp3:okhttp:3.0.1'
compile 'com.google.code.gson:gson:2.5'
compile 'com.android.support:design:23.3.0'
compile 'com.android.support:support-v4:23.3.0'
compile 'de.hdodenhof:circleimageview:2.0.0'
compile 'com.facebook.stetho:stetho:1.3.1'
compile 'com.facebook.stetho:stetho-okhttp3:1.3.1'
} // dependencies