2017-10-04 3 views
0

Ich versuche, jc Player in meinem Projekt hinzuzufügen. aber wenn ich versuche, grandle zu synchronisieren, gib den folgenden fehler. was soll ich machen? Fehler: Ausführung fehlgeschlagen für Task ': app: processDebugManifest'.Manifest Merger fehlgeschlagen, während io.github.jeancsanchez.jcplayer hinzugefügt: jcplayer: 0.0.2

Manifest merger failed : Attribute [email protected] value=(@mipmap/ic_launcher_round) from AndroidManifest.xml:14:9-49 is also present at [io.github.jeancsanchez.jcplayer:jcplayer:0.0.2] AndroidManifest.xml:14:9-43 value=(@mipmap/ic_launcher). Suggestion: add 'tools:replace="android:icon"' to element at AndroidManifest.xml:11:5-65:19 to override.

apply plugin: 'com.android.application' 

android { 
    compileSdkVersion 25 
    buildToolsVersion "25" 
    defaultConfig { 
     applicationId "com.inc.musyc.musyc" 
     minSdkVersion 21 
     targetSdkVersion 25 
     versionCode 1 
     versionName "1.0" 
     testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" 
     multiDexEnabled true 
    } 
    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.3.1' 
    compile 'com.android.support:design:25.3.1' 
    compile 'com.android.support.constraint:constraint-layout:1.0.2' 
    compile 'com.google.firebase:firebase-auth:10.0.1' 
    compile 'com.google.firebase:firebase-database:10.0.1' 
    compile 'com.android.support:support-v4:25.3.1' 
    compile 'de.hdodenhof:circleimageview:2.1.0' 
    compile 'com.theartofdev.edmodo:android-image-cropper:2.4.+' 
    compile 'com.google.firebase:firebase-storage:10.0.1' 
    compile 'com.squareup.picasso:picasso:2.5.2' 
    compile 'com.firebaseui:firebase-ui-database:1.1.1' 
    compile 'com.squareup.okhttp:okhttp:2.5.0' 
    compile 'com.google.firebase:firebase-messaging:10.0.1' 
    compile 'io.github.jeancsanchez.jcplayer:jcplayer:0.0.2' 
    testCompile 'junit:junit:4.12' 
} 
apply plugin: 'com.google.gms.google-services' 

Manifest für mein Projekt:

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

    <uses-permission android:name="android.permission.INTERNET" /> 
    <uses-permission 
    android:name="android.permission.ACCESS_NETWORK_STATE" /> 
    <uses-permission android:name="android.permission.CAMERA" /> 
    <uses-permission 
    android:name="android.permission.READ_EXTERNAL_STORAGE" /> 
    <uses-permission 
    android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> 

    <application 
     android:name=".Persistence" 
     android:allowBackup="true" 
     android:icon="@mipmap/ic_launcher_round" 
     android:label="@string/app_name" 
     android:roundIcon="@mipmap/ic_launcher_round" 
     android:supportsRtl="true" 
     android:theme="@style/AppTheme"> 
     <service android:name=".FirebaseMessagingService"> 
      <intent-filter> 
       <action android:name="com.google.firebase.MESSAGING_EVENT" /> 
      </intent-filter> 
     </service> 

     <activity android:name=".AppMainActivity"> 
      <intent-filter> 
       <action android:name="android.intent.action.MAIN" /> 

       <category android:name="android.intent.category.LAUNCHER" /> 
      </intent-filter> 
      <intent-filter> 
       <action android:name="com.inc.musyc.musyc_TARGET_NOTIFICATION" /> 

       <category android:name="android.intent.category.DEFAULT" /> 
      </intent-filter> 
     </activity> 
     <activity 
      android:name=".StartActivity" 
      android:parentActivityName=".AppMainActivity" /> 
     <activity 
      android:name=".SignUpActivity" 
      android:parentActivityName=".StartActivity" /> 
     <activity 
      android:name=".LogInActivity" 
      android:parentActivityName=".StartActivity" /> 
     <activity 
      android:name=".SocialMainActivity" 
      android:parentActivityName=".AppMainActivity" /> 
     <activity 
      android:name=".ForgotpassActivity" 
      android:parentActivityName=".LogInActivity" /> 
     <activity android:name=".VerificationActivity" /> 
     <activity android:name=".AccountSettingActivity" /> 
     <activity android:name=".ChangeIntroActivity" /> 
     <activity android:name=".ChangePassActivity" /> 
     <activity android:name=".ChangeDesActivity" /> 
     <activity 
      android:name="com.theartofdev.edmodo.cropper.CropImageActivity" 
      android:theme="@style/Base.Theme.AppCompat" /> 
     <activity android:name=".DemoActivity" /> 
     <activity android:name=".ProfileActivity" /> 
     <activity android:name=".dumbActivity" /> 
     <activity android:name=".CreatepostActivity" /> 
     <activity android:name=".SinglePostViewActivity"></activity> 
    </application> 

</manifest> 
+0

fügen Sie diese Zeile in

Antwort

1

Diese in AndroidManifest.xml

hinzufügen
<application 
    android:name=".Persistence" 
    android:allowBackup="true" 
    android:icon="@mipmap/ic_launcher_round" 
    android:label="@string/app_name" 
    android:roundIcon="@mipmap/ic_launcher_round" 
    android:supportsRtl="true" 
    android:theme="@style/AppTheme" 
    tools:replace="android:icon"> 
+0

Wow! es funktionierte. Vielen Dank. Kannst du erklären, was das Problem war? – NPN

+0

@NPN io.github.jeancsanchez.jcplayer: jcplayer: 0.0.2 Diese lib und dein Projekt sind beide hinzugefügt android: roundIcon = "@ mipmap/ic_launcher_round" diese Zeile in AndroidManifest.xml aufgrund dieser erhalten Sie diesen Fehler –

+0

Just Ich möchte darauf hinweisen, dass es trotz dieser Lösung besser ist, die Bibliothek zu reparieren, die dumm genug ist, ihre Anwendungsdatei mit Symbolen oder Namen zu belassen. Bibliotheken sollten niemals die Symbole oder den App-Namen angeben. Sie können diese Bibliothek abzweigen und verschieben, um das eigentliche Problem zu beheben, anstatt einen Override-Hack an Ort und Stelle zu setzen – Sam

Verwandte Themen