在制作Activity或Fragment时,文件头中没有出现想要的注解格式。我在设置中更改了格式。
Settings -> File and Code Templates -> Includes -> File Header
但它没有得到我想要的。创建普通类文件时应用了该格式。现在不是创建活动或片段的时候。问题是什么?
我正在使用Realm。我安装了Stetho-Realm来查看领域数据。
这就是我所做的。
buildscript {
...
repositories {
google()
jcenter()
...
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.3'
...
classpath "io.realm:realm-gradle-plugin:5.1.0"
}
}
allprojects {
repositories {
google()
jcenter()
maven {
url 'https://maven.google.com/'
}
maven {
url 'https://github.com/uPhyca/stetho-realm/raw/master/maven-repo'
}
}
}
Run Code Online (Sandbox Code Playgroud)
应用程式gradle
这是gradle代码。
apply plugin: 'com.android.application'
apply plugin: 'realm-android'
android {
compileSdkVersion 27
defaultConfig {
...
minSdkVersion 23
targetSdkVersion 27
versionCode 1
versionName "1.0"
multiDexEnabled true
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
...
}
dependencies {
...
// Stetho
implementation 'com.facebook.stetho:stetho:1.5.0'
implementation …Run Code Online (Sandbox Code Playgroud)