0

When I try to sync my project I get an error that my manifest merger has failed. Please find the code.

I have installed all the required dependencies but the error wont be fixed.

Kindly advise where the error could be. this is my log

Merging Errors:

Error: Attribute category#${manifestApplicationId}@name at AndroidManifest.xml requires a placeholder substitution but no value for is provided. app main manifest (this file) Error: Attribute permission#${manifestApplicationId}.permission.C2D_MESSAGE@n‌​ame at AndroidManifest.xml:16:19-58 requires a placeholder substitution but no value for is provided. app main manifest (this file), line 15 Error: Attribute uses

and This is my manifest

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

        <uses-permission android:name="android.permission.INTERNET"/>
        <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
        <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
        <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
        <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
        <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
        <uses-permission android:name="android.permission.CAMERA"/>
        <uses-feature android:name="android.hardware.camera2" />
        <uses-feature android:name="android.hardware.camera" />


        <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=".MainActivity">
                <intent-filter>
                    <action android:name="android.intent.action.MAIN" />

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

            <provider
                android:name="android.support.v4.content.FileProvider"
                android:authorities="${applicationId}.provider"
                android:exported="false"
                android:grantUriPermissions="true">
                <meta-data
                    android:name="android.support.FILE_PROVIDER_PATHS"
                    android:resource="@xml/provider_paths"/>
            </provider>
        </application>



    </manifest>

this is my build.gradle i have imported most of the dependencies from the firebase plugin in android studio. .........

 apply plugin: 'com.android.application'

        android {
            compileSdkVersion 26
            buildToolsVersion "25.0.2"
            defaultConfig {
                applicationId "com.example.robertgk.tapchat"
                minSdkVersion 21
                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'
            compile 'com.google.firebase:firebase-database:10.0.1'
            compile 'com.google.firebase:firebase-storage:10.0.1'
            compile 'com.google.firebase:firebase-auth:10.0.1'
            compile 'com.onesignal:OneSignal:1.+@aar'
            compile 'com.google.firebase:firebase-appindexing:10.0.1'
            testCompile 'junit:junit:4.12'
        }
        apply plugin: 'com.google.gms.google-services'
Mushahid Khan
  • 2,816
  • 1
  • 19
  • 32
  • Please post the error log – Raghavendra Aug 22 '17 at 12:27
  • Merging Errors: Error: Attribute category#${manifestApplicationId}@name at AndroidManifest.xml requires a placeholder substitution but no value for is provided. app main manifest (this file) Error: Attribute permission#${manifestApplicationId}.permission.C2D_MESSAGE@name at AndroidManifest.xml:16:19-58 requires a placeholder substitution but no value for is provided. app main manifest (this file), line 15 Error: Attribute uses- – Robert Ashioya Aug 22 '17 at 12:34
  • 2
    Don't post it in comments.. Edit your question with the logs – Raghavendra Aug 22 '17 at 12:36
  • Try this solution [Gradle “manifest requires a placeholder substitution” error but manifestPlaceholders supplies a value](https://stackoverflow.com/questions/37368124/gradle-manifest-requires-a-placeholder-substitution-error-but-manifestplacehol) – Raghavendra Aug 22 '17 at 12:37
  • i have tried the solution but its not working for me – Robert Ashioya Aug 22 '17 at 12:46
  • Post your build.gradle – Raghavendra Aug 22 '17 at 12:47
  • i have posted the build.gradle – Robert Ashioya Aug 22 '17 at 13:02

0 Answers0