尝试安装设计支持库以使用TabLayout,但是要求成功的gradle同步,它们不会出现在外部库部分中,也不可用。以下是build.gradle的相关部分:
android {
compileSdkVersion 23
buildToolsVersion "23.0.2"
defaultConfig {
applicationId "aetherum.com.spectrumwatchface"
minSdkVersion 18
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
wearApp project(':wear')
testCompile 'junit:junit:4.12'
compile 'com.android.support:support-v4:+'
compile 'com.android.support:appcompat-v7:23.2.1'
compile 'com.google.android.gms:play-services:8.4.0'
compile 'com.google.android.support:wearable:1.3.0'
compile 'com.android.support:support-v13:23.1.0'
compile 'com.google.android.support:wearable:1.4.0'
compile 'com.google.android.gms:play-services-wearable:8.4.0'
compile 'com.android.support:preference-v14:23.2.1'
compile 'com.android.support:appcompat-v7:23.3.0'
compile 'com.android.support:preference-v7:23.3.0'
compile 'com.android.support:preference-v14:23.2.1'
compile 'com.android.support:design:23.2.1'
compile project(':spectrum')
}
正如您所看到的,我已经安装了很多东西来尝试解决这个问题,而且我不再确定什么是必要的。我的SDK已尽可能更新
答案 0 :(得分:0)
尝试将此作为build.gradle
:
android {
compileSdkVersion 23
buildToolsVersion "23.0.2"
defaultConfig {
applicationId "com.example.test"
minSdkVersion 14
targetSdkVersion 23
versionCode 1
versionName "1.0"
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'),
'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile('com.github.afollestad.material-dialogs:core:0.8.5.4@aar') {
transitive = true
}
compile 'com.android.support:appcompat-v7:23.1.1'
compile 'com.android.support:support-v4:23.1.1'
compile 'com.android.support:design:23.1.1'
}