标签: stetho

仅在调试版本变体中包含Stetho

我知道,我可以使用debugCompile只在拉dependencydebug build.是否有一个好的,简化的方法来做到这code initialization一点也是必需的?如果没有依赖关系,其他变体将无法编译.

android android-studio stetho

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

Chrome DevTools 损坏 - Stetho 无法使用

Stetho 和 Google Chrome DevTools 在 macOS 更新后变得无法使用(我怀疑 macOS 更新是此错误的根源,但我更愿意提及它)。

这是在设备上打开“检查模式”后 DevTools 的外观(由 Facebook Stetho 库提供,适用于 Android 和 OKHttp)。

开发者工具窗口

页面上不再有“CSS”样式表,字体也发生了变化。许多标签页没有显示(即网络请求),我只能访问一些错误消息:

There were 84 bytes that were not consumed while processing request 4
There were 84 bytes that were not consumed while processing request 5
There were 84 bytes that were not consumed while processing request 6
Failed to clear temp storage: undefined
Run Code Online (Sandbox Code Playgroud)

我按照有关此问题的说明进行操作:无法清除临时存储和此问题:无法清除临时存储:Chrome 中的安全错误但我无法解决该问题。

这是我尝试过的:

  • 使用 AppCleaner 卸载并重新安装 Chrome
  • 从磁盘中删除 chrome 缓存
  • 从中删除 chrome 配置文件 ~/Library/Application\ …

android google-chrome google-chrome-devtools okhttp stetho

48
推荐指数
2
解决办法
5427
查看次数

从Android Studio浏览SQLite数据库

我想知道Android Studio有哪些SQLite插件允许用户浏览创建的数据库?

sqlite android ddms android-studio stetho

32
推荐指数
4
解决办法
4万
查看次数

如何使用Stetho与Volley?

为我的请求创建了一个凌空单例类.这是我的单例类

public class VolleySingleton {

    private static VolleySingleton instance;
    private RequestQueue reQueue;

    private VolleySingleton(Context context) {
        reQueue = Volley.newRequestQueue(context,new OkHttpStack(new OkHttpClient()));
    }

    public static VolleySingleton getInstance(Context context) {
        if(instance == null)
            instance = new VolleySingleton(context);
        return instance;
    }

    public RequestQueue getRequestQueue() {
        return reQueue;
    }

    public <T> void addToRequestQueue(Request<T> request) {
        request.setTag("app");
        request.setShouldCache(false);
        request.setRetryPolicy(new DefaultRetryPolicy(10000, DefaultRetryPolicy.DEFAULT_MAX_RETRIES,
                DefaultRetryPolicy.DEFAULT_BACKOFF_MULT));
        getRequestQueue().add(request);
    }
}
Run Code Online (Sandbox Code Playgroud)

并且使用OKHTTP堆栈和我的Volley实现.这是我的 OKHttp.class

public class OkHttpStack implements HttpStack {

    private final OkHttpClient mClient;

    public OkHttpStack(OkHttpClient client) {
        this.mClient = client;
    } …
Run Code Online (Sandbox Code Playgroud)

android facebook okhttp stetho

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

Stetho显示两个具有相同名称的列

您好我正在为我的应用程序使用Stetho调试平台.我已经在我的gradle中添加了Stetho,如下所示

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.1.1'
compile 'com.android.support:design:23.1.1'
compile 'com.facebook.stetho:stetho:1.2.0'
Run Code Online (Sandbox Code Playgroud)

}

并将其初始化为onCreate方法,如下所示

 @Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);
    Stetho.initializeWithDefaults(this);
    findElementsByIds();
    addDataIntoDBs();
    initData();
}
Run Code Online (Sandbox Code Playgroud)

我已经为demo创建了Category表(作为cat_id和cat_name列)并在其中添加了一些条目,请参阅 截图.

任何人都可以告诉它为什么显示两个与图像中名称相同的列

我为表创建所做的代码

public class DBHelper extends SQLiteOpenHelper{

private static String DATABASE_NAME = "citizan.db";
private static int DATABASE_VERSION = 1;
private static DBHelper dbHelperInstance = null;
private static SQLiteDatabase dbInstance= null;

public static String CATEGORY_TABLE = "category";
public static String CAT_ID = "cat_id";
public static String CAT_NAME …
Run Code Online (Sandbox Code Playgroud)

sqlite android stetho

7
推荐指数
0
解决办法
404
查看次数

Stetho:在控制台中看不到网络呼叫

使用Stetho的一切都在我的示例应用程序中运行得很好,我在浏览了这个YouTube教程(SQLite,SharedPreferences show)之后进行了测试,除了看到我喜欢的网络调用.

我在加载应用程序时进行了大量的API调用.例如,在我的Service.java类中,如下面的链接所示.也许它没有出现在Stetho中,因为API调用在应用程序加载之前发生,然后才能打开Stetho.任何想法都将得到赞赏,以使此功能正常工作.

我在MainActivity.java中初始化Stetho.在onCreate()我有

    // Initialize Stetho
    Stetho.initialize(
            Stetho.newInitializerBuilder(this)
                    .enableDumpapp(new SampleDumperPluginsProvider(this))
                    .enableWebKitInspector(Stetho.defaultInspectorModulesProvider(this))
                    .build());
Run Code Online (Sandbox Code Playgroud)

然后我还在底部加入了一个Stetho Class.

// Create class for Stetho
private static class SampleDumperPluginsProvider implements DumperPluginsProvider {
    private final Context mContext;

    public SampleDumperPluginsProvider(Context context){mContext = context;}

    @Override
    public Iterable<DumperPlugin> get() {
        ArrayList<DumperPlugin> plugins = new ArrayList<>();
        for (DumperPlugin defaultPlugin : Stetho.defaultDumperPluginsProvider(mContext).get()) {
            plugins.add(defaultPlugin);
        }
        //plugins.add(new SyncAdapterFragment());
        return plugins;
    }
}
Run Code Online (Sandbox Code Playgroud)

当然,我也有适当的依赖

compile 'com.facebook.stetho:stetho:1.3.0'
Run Code Online (Sandbox Code Playgroud)

谢谢!

java android stetho

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

无法在chrome dev工具资源中调整列的大小

所以我有一个android项目,我正在使用领域.问题是我的设计在一个特定的表中列出了很多列.可悲的是,我似乎无法看到所有这些,我无法调整它是否有一个水平滚动我可以使用我不知道如何处理这个?

我的王国的形象

android realm google-chrome-devtools stetho

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

我在使用Stetho时在Chrome DevTools中看到Web SQL中的"截断"

我正在使用Stheto在我的Android应用程序中检查数据库,但是当表中有很多对象时,我在所有列中看到"截断".我怎么能看到他们呢?

android stetho

6
推荐指数
1
解决办法
703
查看次数

Android stetho Google Developer工具资源被截断

使用Stetho和Stetho领域.

Stetho.initialize(
                Stetho.newInitializerBuilder(this)
                        .enableDumpapp(Stetho.defaultDumperPluginsProvider(this))
                        .enableWebKitInspector(RealmInspectorModulesProvider.builder(this).build())
                        .build());
Run Code Online (Sandbox Code Playgroud)

我能够通过Google Developer Console查看Realm DB内容,但最大索引是249,之后的所有值都被截断 -

在此输入图像描述

如何强制它显示所有值?

android stetho google-developer-tools google-developers-console

6
推荐指数
1
解决办法
1208
查看次数

按Enter键时,无法在Stetho中查询

我一直在使用android调试模式,并尝试通过“资源”部分中的Stetho查询数据。当我键入查询并按Enter键时,它不会显示我想要的结果,而会在我键入的查询下添加另一个空行。

Select * From employees
Run Code Online (Sandbox Code Playgroud)

然后按回车键

结果

Select * From employees
<new line starts here> 
Run Code Online (Sandbox Code Playgroud)

我想知道它是如何发生的,并希望找到解决方案。

android stetho

6
推荐指数
1
解决办法
946
查看次数