vendredi 22 mai 2015

Android Studio - Rendering Problems for XML files using support libraries

I get rendering problems for XML files that uses support libraries, while I don't have the same for normal XML files. These are the errors I get for separate XML files

*The following classes cannot be found:
android.support.v7.widget.RecyclerView
android.support.v4.widget.DrawerLayout
android.support.v7.widget.Toolbar*

a) Android Studio version: 1.2.1.1

b) Build.gradle

apply plugin: 'com.android.application'

android {
compileSdkVersion 22
buildToolsVersion '22.0.1'

defaultConfig {
    applicationId "com.piserve.geejo.mskv4"
    minSdkVersion 15
    targetSdkVersion 22
    versionCode 1
    versionName "1.0"
}
buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
}
}

dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'org.lucasr.dspec:dspec:0.1.1'
compile 'com.mcxiaoke.volley:library:1.0.+'
compile 'com.android.support:appcompat-v7:22.1.1'
compile 'com.android.support:recyclerview-v7:22.1.1'
}

c) Layout XML file (one of them)

<?xml version="1.0" encoding="utf-8"?>
<android.support.v7.widget.Toolbar 
xmlns:android="http://ift.tt/nIICcg"
xmlns:app="http://ift.tt/GEGVYd"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/color_primary"
app:popupTheme="@style/ThemeOverlay.AppCompat.Dark"
app:theme="@style/MyCustomToolbarTheme"

>

d) SDK Manager Screenshot

1

Here's what I tried:

a) Changing the theme in the editor window to Material and Holo themes

b) Switching between Android v21 and v22

c) Tried different emulators from Nexus 4-10

Aucun commentaire:

Enregistrer un commentaire