2016-05-18 9 views
0

新しいAndroid Studioプロジェクトを実行すると受信しました:バイナリXMLファイル行#36:inflating class android.support.v7.widget .ToolbarエラーバイナリXMLファイルの行#36:クラスを膨張させる際のエラー。android.support.v7.widget.Toolbar

buildscript { 
repositories { 
    jcenter() 
} 
dependencies { 
    classpath 'com.android.tools.build:gradle:1.2.3' 

    // NOTE: Do not place your application dependencies here; they belong 
    // in the individual module build.gradle files 
} 

}

// Top-level build file where you can add configuration options common to all sub-projects/modules. 
 

 
buildscript { 
 
    repositories { 
 
     jcenter() 
 
    } 
 
    dependencies { 
 
     classpath 'com.android.tools.build:gradle:1.2.3' 
 

 
     // NOTE: Do not place your application dependencies here; they belong 
 
     // in the individual module build.gradle files 
 
    } 
 
} 
 

 
allprojects { 
 
    repositories { 
 
     jcenter() 
 
    } 
 
} 
 

 
task clean(type: Delete) { 
 
    delete rootProject.buildDir 
 
} 
 
apply plugin: 'com.android.application' 
 

 
android { 
 
    compileSdkVersion 23 
 
    buildToolsVersion "23.0.2" 
 

 
    defaultConfig { 
 
     applicationId "com.example.davidontalba.app2" 
 
     minSdkVersion 15 
 
     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']) 
 
    testCompile 'junit:junit:4.12' 
 
    compile 'com.android.support:appcompat-v7:23.1.1' 
 
    compile 'com.android.support:design:23.1.1' 
 
    compile 'com.android.support:recyclerview-v7:23.1.1' 
 
    compile 'com.android.support:support-annotations:23.1.1' 
 
}

ヘルプ!私はAndroidスタジオの誰かのproyectをやっていません。理由はわかりません。

+0

現在サポートされているバージョンのlibは23.4.0ですが、問題の原因となったレイアウトファイルを表示する必要があります。エラースタックトレース –

答えて

0

プロジェクトのbuild.gradleのクラスパスをclasspath 'com.android.tools.build:gradle:1.5.0'に変更してください。 グラデル1.5以上、好ましくはcom.android.tools.build:gradle:2.0.0を使用してください。その固定鉱山

+0

1.5完璧ですが、それ以上のことを教えてください。警告:Gradleバージョン2.10が必要です。現在のバージョンは2.4です。 gradleラッパーを使用している場合は、\\ gradle \ wrapper \ gradle-wrapper.properties内のdistributionUrlをgradle-2.10-all.zip –

+0

に編集してみてください。しかし、このURLは自分のPCの –

+0

に存在し、 File> project structure> project(あるいはctrl + alt + shift + Sを押してプロジェクトを選択することができます)に進み、gradleバージョンを2.10に変更します。また、ファイル>設定>ビルド、実行、デプロイメント>ビルドツール> gradleに移動し、デフォルトのgradleラッパーを使用するように選択します。 – NezSpencer

関連する問題