Android 支持库和ViewBackgroundHelper
我对Android Studio 3.0金丝雀有问题。 在所有项目中,我不能在预览工具中使用任何来自支持库的视图。它显示渲染错误。在新项目中也是同样的问题 Samople代码:Android 支持库和ViewBackgroundHelper,android,android-studio,Android,Android Studio,我对Android Studio 3.0金丝雀有问题。 在所有项目中,我不能在预览工具中使用任何来自支持库的视图。它显示渲染错误。在新项目中也是同样的问题 Samople代码: <android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" an
<android.support.constraint.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Hello World!"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</android.support.constraint.ConstraintLayout>
此问题可以通过以下方法解决:通过添加
android.enableBuildCache=false
加载到gradle.properties文件并重新生成项目。你也可以看到关于这个bug的讨论 通过添加
android.enableBuildCache=false
加载到gradle.properties文件并重新生成项目。你也可以看到关于这个bug的讨论 这是android支持库版本“26.0.0-beta2”中的一个bug
使用
与
及
一切正常!这是android支持库版本“26.0.0-beta2”中的一个bug 使用 与 及
一切都应该很好 发布你的应用程序
build.gradle
我仍然遇到与26.0.0稳定版相同的问题,Android Studio 3金丝雀8发布你的应用程序build.gradle
我仍然遇到与26.0.0稳定版相同的问题,Android Studio 3金丝雀8仍然存在相同的问题仍然存在相同的问题仍然存在相同的问题仍然存在相同的问题仍然存在相同的问题
android {
compileSdkVersion 26
buildToolsVersion 25.0.3
defaultConfig {
minSdkVersion 21
targetSdkVersion 26
versionCode getAutoVersionCode()
versionName getAutoVersionName()
applicationId "***"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
multiDexEnabled true
printf("\n--------" + "VERSION DATA--------" + "\n" + "- PACKAGE: " + applicationId + "\n" + "- CODE: " + versionCode + "\n" +
"- NAME: " + versionName + "\n- APK: ${archivesBaseName}" + "\n----------------------------\n")
vectorDrawables.useSupportLibrary = true
}
useLibrary 'org.apache.http.legacy'
configurations.all {
resolutionStrategy.force 'com.google.code.findbugs:jsr305:1.3.9'
}
flavorDimensions "versionOfApp"
productFlavors {
dev {
applicationIdSuffix ".dev"
versionCode getAutoVersionCode()
versionName getAutoVersionName() + "[dev]"
dimension "versionOfApp"
}
prod {
versionCode getAutoVersionCode()
versionName getAutoVersionName()
dimension "versionOfApp"
}
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
dependencies {
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
testCompile 'junit:junit:4.12'
compile fileTree(include: ['*.jar'], dir: 'libs')
compile "com.android.support:appcompat-v7:26.0.0-beta1"
compile project(':core')
compile project(':data')
// various
annotationProcessor 'com.jakewharton:butterknife-compiler:8.4.0'
// widgets
compile 'com.mikepenz:materialdrawer:5.9.4'
compile "com.android.support:cardview-v7:26.0.0-beta1"
compile "com.android.support:customtabs:26.0.0-beta1"
//Multidex
compile 'com.android.support:multidex:1.0.1'
//Timber
compile 'com.jakewharton.timber:timber:4.5.1'
//pager bullet
compile 'com.robohorse.pagerbullet:pagerbullet:1.0.8'
//fb
compile 'com.facebook.stetho:stetho:1.5.0'
compile 'com.facebook.android:facebook-android-sdk:4.24.0'
//glide
compile 'com.github.bumptech.glide:glide:4.0.0-RC1'
annotationProcessor 'com.github.bumptech.glide:compiler:4.0.0-RC1'
//Photo
compile 'com.github.chrisbanes:PhotoView:2.1.2'
//joda
compile 'net.danlew:android.joda:2.9.5'
implementation 'com.google.firebase:firebase-messaging:11.0.2'
}
apply plugin: 'com.google.gms.google-services'
compile 'com.android.support:appcompat-v7:26.0.0-beta1'
buildToolsVersion '26.0.0'
classpath 'com.android.tools.build:gradle:3.0.0-alpha5'