Reputation: 5538
I got the following crash when integrating the new design library and didn't found a workaround yet:
Error inflating class android.support.design.CoordinatorLayout
Here is my gradle file:
android {
compileSdkVersion 23
buildToolsVersion "23.0.0"
defaultConfig {
applicationId "xxxxxxxx"
minSdkVersion 14
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile project(':volley')
compile 'com.android.support:design:23.0.0'
compile 'com.android.support:appcompat-v7:23.0.0'
compile 'com.android.support:support-v4:23.0.0'
compile 'com.android.support:recyclerview-v7:23.0.0'
compile 'com.android.support:cardview-v7:23.0.0'
}
...and the app style:
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
<!-- Customize your theme here. -->
<item name="android:colorPrimary">@color/primary</item>
<item name="android:colorPrimaryDark">@color/primary_dark</item>
<item name="android:colorAccent">@color/accent</item>
<item name="android:colorBackground">@android:color/white</item>
<item name="android:windowBackground">@android:color/white</item>
<item name="android:colorControlNormal">#cccccc</item>
</style>
public class TabbedScreenActivity extends AppCompatActivity
Upvotes: 3
Views: 7707
Reputation: 471
The above answer is right also ensure that you have the dependencies matching your buildtoolsversion
compile 'com.android.support:appcompat-v7:25.2.0'
compile 'com.android.support:design:25.2.0'
I did this and it worked for me..
Upvotes: -1
Reputation: 284
It is in the android.support.design.widget
package. Inflate the android.support.design.widget.CoordinatorLayout
Upvotes: 7