8

मैं नई एपीआई 21 का परीक्षण कर रहा हूं, मैं एक रीसाइक्लिंग व्यू बनाने की कोशिश करता हूं लेकिन मैं निर्भरता समस्या से फंस गया हूं।एसडीके 5.0 रीसाइक्लर व्यू को तत्काल नहीं किया जा सका

कि

enter image description here

तरह त्रुटि देखो मेरी लेआउट:

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" 
    android:layout_width="match_parent" 
    android:layout_height="match_parent" 
    android:paddingLeft="@dimen/activity_horizontal_margin" 
    android:paddingRight="@dimen/activity_horizontal_margin" 
    android:paddingTop="@dimen/activity_vertical_margin" 
    android:paddingBottom="@dimen/activity_vertical_margin"> 
    <!-- A RecyclerView with some commonly used attributes --> 
    <android.support.v7.widget.RecyclerView 
     android:id="@+id/mRecyclerView" 
     android:scrollbars="vertical" 
     android:layout_width="match_parent" 
     android:layout_height="match_parent" /> 
</RelativeLayout> 

और मेरे Gradle फ़ाइल

apply plugin: 'com.android.application' 

android { 
    compileSdkVersion 21 
    buildToolsVersion "20.0.0" 

    defaultConfig { 
     applicationId "com.agonist.samplify" 
     minSdkVersion 17 
     targetSdkVersion 21 
     versionCode 1 
     versionName "1.0" 
    } 
    buildTypes { 
     release { 
      runProguard false 
      proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 
     } 
    } 

} 

dependencies { 
    compile fileTree(dir: 'libs', include: ['*.jar']) 
    compile 'com.android.support:cardview-v7:+' 
    compile 'com.android.support:recyclerview-v7:+' 
} 

मैं क्या करना है पता नहीं है। मैंने परियोजना को साफ/निर्माण करने की कोशिश की लेकिन यह यहां रहें। कोई उपाय ?

संपादित करें: फिनली यह केवल एक आईडीई पूर्वावलोकन समस्या है। निष्पादन के दौरान सबकुछ काम करता है

+0

इस त्रुटि आईडीई पूर्वावलोकन में होता है? – ben75

+0

हां। लेकिन निष्पादन पर मुझे अपने mRecyclerView –

+0

पर NullPointer मिलता है यदि आप _buildToolsVersion 21.0.0_ या _21.0.1_ का उपयोग करते हैं तो क्या यह कोई मदद है? – harism

उत्तर

8

नया पुनर्चक्रण दृश्य अभी तक स्टूडियो में काम नहीं करता है। Google एक फिक्स पर काम कर रहा है। (Open Issue 72117)

+3

यह अब काम करता है - आपको google से deepanshu चरणों का पालन करना होगा: "बस अगर लोग अभी भी सोच रहे हैं, तो आपको एसडीके प्रबंधक के माध्यम से एपीआई 22 के लिए नवीनतम एसडीके मंच पर अपडेट करना चाहिए, और अपडेट करना चाहिए नवीनतम संस्करण (22.0.0) का उपयोग करने के लिए एसडीके प्रबंधक के माध्यम से समर्थन भंडार को अद्यतन करके और अपनी build.gradle फ़ाइल में नवीनतम रीसाइक्लिंग दृश्य " – Simon

1

आपका एपीआई और RecyclerView संस्करण की तरह एक ही

सिंक Gradle होना चाहिए:

compileSdkVersion 23 
    buildToolsVersion "23.0.1" 

और

dependencies { 
     compile fileTree(dir: 'libs', include: ['*.jar']) 
     compile 'com.android.support:appcompat-v7:23.0.1' 
     compile 'com.android.support:recyclerview-v7:23.0.1' 
    } 
संबंधित मुद्दे