我尝试使用Stetho时遇到问题,我尝试搜索并按照其他人提供的步骤操作,但似乎没有人强调我的问题。以下是我需要的Stetho使用文件。Stetho - Android Studio初始化
我的问题是它不能识别方法“初始化”我试图通过执行其他用户的建议方法的其他方式,但我仍然满足同样的错误
的build.gradle(模块:应用)
dependencies {
compile 'com.facebook.stetho:stetho:1.5.0'
compile 'com.facebook.stetho:stetho-okhttp3:1.5.0'
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:24.2.1'
compile 'com.android.support:support-v4:24.2.1'
testCompile 'junit:junit:4.12'
}
我Stetho应用类
import android.app.Application;
public class Stetho extends Application {
@Override
public void onCreate() {
super.onCreate();
Stetho.initializeWithDefaults(this);
}
}
在我的清单
012宣布<application
android:name=".Stetho"
android:allowBackup="true"
我认为问题是,我实际上没有正确实施库,但我不确定。
命名confict。为你的班级选择一个不同的名字。 – SAM