Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Android

Kibet Kech
Kibet Kech
5,526 Points

Android Studio design view error

Hi,

I am getting this error when i switch to design view.

Rendering failed with a known bug. Please try a rebuild. The following classes could not be instantiated: -Β android.support.constraint.ConstraintLayout (Open Class, Show Exception, Clear Cache) Tip: Use View.isInEditMode() in your custom views to skip code or show sample data when shown in the IDE. If this is an unexpected error you can also try to build the project, then manually refresh the layout.

Here is my gradle file, am i doing anything wrong?

apply plugin: 'com.android.application'

android { compileSdkVersion 26 buildToolsVersion "26.0.0" defaultConfig { applicationId "com.ol_digital.campusbiometricsystem" minSdkVersion 15 targetSdkVersion 26 versionCode 1 versionName "1.0" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } }

dependencies {

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:26.0.0'
compile 'com.android.support.constraint:constraint-layout:1.0.2'

compile('com.mikepenz:materialdrawer:5.9.5@aar') {
    transitive = true
}
compile 'com.mikepenz:google-material-typeface:3.0.1.1.original@aar'
compile 'com.mikepenz:fontawesome-typeface:4.7.0.1@aar'

compile 'com.github.alamkanak:android-week-view:1.2.6'

testCompile 'junit:junit:4.12'

}

Abubakar Abdulrahman
Abubakar Abdulrahman
3,284 Points

Send the code you have in the text view.