12

paketinde bulunamadı. Android SDK 2.2.3 kullanıyorum. Android'i programlama ile ilgili bir kitabı takip ediyorum."layout_constraintLeft_toLeftOf 'özniteliği"

kodudur:

<android.support.constraint.ConstraintLayout 
    xmlns:android="http://schemas.android.com/apk/res/android" 
    xmlns:app="http://schemas.android.com/apk/res-auto" 
    xmlns:tools="http://schemas.android.com/tools" 
    android:id="@+id/activity_main" 
    android:layout_width="match_parent" 
    android:layout_height="match_parent" 
    tools:context="eu.a123sandberg.webview.MainActivity" 
    tools:layout_editor_absoluteX="0dp" 
    tools:layout_editor_absoluteY="81dp"> 

    <WebView 
     android:layout_width="384dp" 
     android:layout_height="511dp" 
     tools:layout_editor_absoluteX="0dp" 
     tools:layout_editor_absoluteY="0dp" 
     app:layout_constraintLeft_toLeftOf="@+id/activity_main" 
     tools:layout_constraintLeft_creator="0" 
     app:layout_constraintTop_toTopOf="@+id/activity_main" 
     tools:layout_constraintTop_creator="0" 
     app:layout_constraintRight_toRightOf="@+id/activity_main" 
     tools:layout_constraintRight_creator="0" 
     app:layout_constraintBottom_toBottomOf="@+id/activity_main" 
     tools:layout_constraintBottom_creator="0" 
     /> 

</android.support.constraint.ConstraintLayout> 

Ben android.support.constraint.ConstraintLayout ile üç farklı örnekler denedim ve tüm vakalar yapmak içinde aynı hata mesajı alıyorum:

Error:(13) No resource identifier found for attribute 'layout_constraintLeft_toLeftOf' in package 'eu.a123sandberg.webview' 

build.gradle dosyası aşağıdakileri içerir:

apply plugin: 'com.android.application' 

android { 
    compileSdkVersion 25 
    buildToolsVersion "25.0.2" 
    defaultConfig { 
     applicationId "eu.a123sandberg.webview" 
     minSdkVersion 21 
     targetSdkVersion 25 
     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:25.1.1' 
    testCompile 'junit:junit:4.12' 
} 

Hatayı gidermek için ne yapmalıyım?

Hatayı giderdim ve hatayı gideren bir öneri bulamadık.

Lütfen

Yardım edin.

cevap

27

ConstraintLayout, AppCompat. Bu bağımsız bir kütüphane. senin build.gradle dosyası

compile 'com.android.support.constraint:constraint-layout:1.0.2' 

ve Sync now tıklayın içinde

Ekle bağımlılığı.