我从android studio开始新的android项目。以下是我看到的登录界面。我不知道我在这里错过了什么。
我不知道为什么accentColor会显示这样的东西?
build.gradle(模块级别)
apply plugin: 'com.android.application'
android {
compileSdkVersion rootProject.ext.compileSdkVersion
buildToolsVersion rootProject.ext.buildToolsVersion
defaultConfig {
applicationId "com.example.myapplication"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:' + rootProject.ext.junitVersion
compile 'com.loopj.android:android-async-http:' + rootProject.ext.loopjHttpAsyncTask
compile 'com.roughike:bottom-bar:' + rootProject.ext.bottomBar
compile 'com.android.support:appcompat-v7:' + rootProject.ext.supportLibraryVersion
compile 'com.android.support:design:' + rootProject.ext.supportLibraryVersion
}
build.gradle(项目级别)
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.0-alpha3'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
ext {
//app related
compileSdkVersion = 23
buildToolsVersion = "23.0.3"
minSdkVersion = 16
targetSdkVersion = 23
//android related library
constraintLayout = "1.0.0-alpha3"
junitVersion = "4.12"
supportLibraryVersion = "23.3.0"
//custom libraries
bottomBar = "1.3.9"
loopjHttpAsyncTask = "1.4.9"
}
答案 0 :(得分:0)
gradle build-tool版本引起的问题。将构建工具版本更改为稳定版本将解决它
<强>替换强>
classpath 'com.android.tools.build:gradle:2.2.0-alpha3'
<强>与强>
classpath 'com.android.tools.build:gradle:2.1.0'