2017-06-16 35 views
1

Androidスタジオの新機能です。経験豊かな人には馬鹿なことがあります。Android Studioのエラー:タスク ':app:processDebugManifest'の実行に失敗しました

私が述べているのAndroid Studioでエラーが取得しています:

Error:Execution failed for task ':app:processDebugManifest'. 
> Manifest merger failed : Attribute meta-data#[email protected] 
value=(25.3.1) from [com.android.support:design:25.3.1] 
AndroidManifest.xml:27:9-31 
is also present at [com.android.support:appcompat-v7:26.0.0-alpha1] 
AndroidManifest.xml:27:9-38 value=(26.0.0-alpha1). 
Suggestion: add 'tools:replace="android:value"' to <meta-data> element at 
AndroidManifest.xml:25:5-27:34 to override. 

を私はこれをGoogleで検索し、自分でそれを解決するために、それに探して試してみましたが、しかし、私が発見した同様の問題が非常にではありません同じエラー。

私は理解していますが、その一部を理解しているにもかかわらず、その修正を理解して生成するのに十分な経験はありません。

私はこれについてさらに情報を提供する必要がある場合もありますので、もしそうなら私に知らせてください。

EDIT

のAndroidManifest.xml

<?xml version="1.0" encoding="utf-8"?> 
<manifest xmlns:android="http://schemas.android.com/apk/res/android" 
    package="com.g732d.appname" 
    > 

    <application 
     android:allowBackup="true" 
     android:icon="@mipmap/ic_launcher" 
     android:label="@string/app_name" 
     android:roundIcon="@mipmap/ic_launcher_round" 
     android:supportsRtl="true" 
     android:theme="@style/AppTheme"> 

     <activity 
      android:name=".HomeActivity" 
      android:label="@string/app_name"> 
      <intent-filter> 
       <action android:name="android.intent.action.MAIN" /> 

       <category android:name="android.intent.category.LAUNCHER" /> 
      </intent-filter> 
     </activity> 

     <activity android:name=".Patients" /> 

     <activity android:name=".NewPatient" /> 

     <activity android:name=".StartActivity"></activity> 

    </application> 

</manifest> 

build.gradle(プロジェクト:appnameの)

// 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:2.3.3' 

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

allprojects { 
    repositories { 
     jcenter() 
     maven { 
      url "https://maven.google.com" 
     } 
    } 
} 

task clean(type: Delete) { 
    delete rootProject.buildDir 
} 

build.gradle(モジュール: App)

apply plugin: 'com.android.application' 

android { 
    compileSdkVersion 26 
    buildToolsVersion "26.0.0" 
    defaultConfig { 
     applicationId "com.g732d.appname" 
     minSdkVersion 19 
     targetSdkVersion 26 
     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:26.+' 
    compile 'com.android.support.constraint:constraint-layout:1.0.2' 
    testCompile 'junit:junit:4.12' 
    compile 'com.android.support:design:25.3.1' 
    compile 'com.google.android.gms:play-services-ads:11.0.1' 
    compile 'com.google.android.gms:play-services-maps:11.0.1' 
} 

SECOND EDIT:Arefehによって解答とクナルによってコメントに続き

、私はcompile 'com.android.support:design:26.0.0-beta2'compile 'com.android.support:design:25.3.1'を置き換えることによって、バージョンの不一致を変更しました。

maven { url "https://maven.google.com" }build.gradle (Project: appname)ファイルにallprojects{}(これを説明するために更新済み)に追加する必要がありました。

今、私はfailed to instantiate one or more classesというレンダリングエラーを受けています。クラスは、アクティビティで使用した内容に応じてアクティビティごとに異なります。

The following classes could not be instantiated: 
    - android.support.v7.widget.AppCompatImageView 
    ... 
    ... 
+0

あなたの 'manifest'と' build.gradle'を投稿してください。 – dustblue

+0

ダストブルーありがとう、私はちょうど編集によってそれらを追加しました。 – Gazza732

+0

他のグラデーションファイルも追加してください。 'build.gradle(モジュール:app)' –

答えて

0

問題はサポートライブラリのバージョンの違いによると思います。デザインライブラリのバージョンを26以上に変更します。この例で働いているようだ何 コンパイル「com.android.support:design:26.+」

+0

あなたの答えをありがとう。それをどうやって変えようとしたら?それは私が添付したコードで26と書いてありますので、私は間違っているかもしれませんが、それが設定だと仮定していますか? – Gazza732

+0

あなたのbuild.gradleファイルでは、依存関係の部分で、 'com.android.support:design:26.+'を 'com.android.support:design:25.3.1'をコンパイルしてコンパイルしてください。 すべての依存関係とバージョンで同じバージョンのサポートライブラリを使用する必要があります:) –

0

が、それはCompile Sdk Version言うapp > PropertiesBuild Tools Versionで、その後File > Project Structureに起こっている、私はそれぞれAPI 25: Android 7.1.1 (Nougat)25.0.3にそれらを変更しました。その後、私はプロジェクトを同期させ、グラウンドしてから再構築しました。 私はこのプロセスを繰り返し、再びAPI 26: Android 8.0 (O)26.0.0に変更しました。これまでのところ、私はこの変更があれば更新する予定ですが、もう一度作業しています。

関連する問題