returned to Android Studio to finish an app after 2 month of not working on it. upgraded to Android Studio 3.0, and now my Gradle doesn't sync and I have errors I can't seem to fix.
the error is :
> Error:Execution failed for task ':app:processDebugManifest'.
> > Manifest merger failed : Attribute meta-data#android.support.VERSION@value value=(25.4.0) from
> [com.android.support:design:25.4.0] AndroidManifest.xml:28:13-35 is
> also present at [com.android.support:support-v4:26.1.0]
> AndroidManifest.xml:28:13-35 value=(26.1.0). Suggestion: add
> 'tools:replace="android:value"' to <meta-data> element at
> AndroidManifest.xml:26:9-28:38 to override.
my app Gradle is this:
apply plugin: 'com.android.application'
android {
packagingOptions {
exclude 'META-INF/DEPENDENCIES.txt'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/NOTICE'
exclude 'META-INF/LICENSE'
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/notice.txt'
exclude 'META-INF/license.txt'
exclude 'META-INF/dependencies.txt'
exclude 'META-INF/LGPL2.1'
}
compileSdkVersion 25
buildToolsVersion '26.0.2'
defaultConfig {
applicationId "shomrim.warpcodes.com.shomrim"
minSdkVersion 19
targetSdkVersion 25
versionCode 1
versionName "1"
manifestPlaceholders = [onesignal_app_id: "(not showing it)",
// Project number pulled from dashboard, local value is ignored.
onesignal_google_project_number: "REMOTE"]
packagingOptions {
exclude 'META-INF/NOTICE'
exclude 'META-INF/LICENSE'
}
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
manifestPlaceholders = [manifestApplicationId: "${applicationId}",
onesignal_app_id: "(not showing it)",
onesignal_google_project_number: "(not showing it)"]
// Enabling multidex support.
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'de.hdodenhof:circleimageview:2.1.0'
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.firebaseui:firebase-ui-storage:2.2.0'
compile 'com.firebaseui:firebase-ui:2.2.0'
//compile 'com.google.android.gms:play-services:11.4.2'
compile 'com.google.android.gms:play-services-location:11.4.2'
compile 'com.google.android.gms:play-services-maps:11.4.2'
// Required for OneSignal, even if you have added FCM.
compile 'com.google.android.gms:play-services-gcm:11.4.2'
// Required for geotagging
compile 'com.google.android.gms:play-services-location:11.4.2'
compile 'com.android.support:design:25.4.0'
compile 'com.android.support:cardview-v7:25.4.0'
compile 'com.android.support:recyclerview-v7:25.4.0'
compile 'com.android.support:support-v13:25.4.0'
compile 'com.android.support:appcompat-v7:25.4.0'
compile 'com.google.firebase:firebase-storage:11.4.2'
compile 'com.google.firebase:firebase-core:11.4.2'
compile 'com.google.firebase:firebase-auth:11.4.2'
compile 'com.google.firebase:firebase-database:11.4.2'
compile 'com.google.firebase:firebase-messaging:11.4.2'
compile 'com.android.support:multidex:1.0.2'
testCompile 'junit:junit:4.12'
compile 'com.firebase:firebase-client-android:2.5.2'
// OneSignal SDK
compile 'com.onesignal:OneSignal:3.6.5'
//compile 'com.google.android.gms:play-services-appindexing:10.0.1'
compile 'com.github.bumptech.glide:glide:3.7.0'
}
apply plugin: 'com.google.gms.google-services'
This is my manifest file:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="shomrim.warpcodes.com.shomrim">
<uses-feature android:name="android.hardware.camera" />
<uses-feature android:name="android.hardware.camera.autofocus" />
<uses-permission android:name="android.permission.CALL_PHONE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.CAPTURE_AUDIO_OUTPUT" />
<uses-permission android:name="android.permission.CAMERA" />
<application
android:name=".MyApplication"
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
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>
<activity android:name=".RegistrationActivity" />
<activity android:name=".WatchmenTowerActivity" />
<activity android:name=".LoginActivity" />
<activity android:name=".UserProfileActivity" />
<!--
android:name="android.support.multidex.MultiDexApplication"
The API key for Google Maps-based APIs is defined as a string resource.
(See the file "res/values/google_maps_api.xml").
Note that the API key is linked to the encryption key used to sign the APK.
You need a different API key for each encryption key, including the release key that is used to
sign the APK for publishing.
You can define the keys for the debug and release targets in src/debug/ and src/release/.
//<service android:name=".GPSTracker$GPSTracker" />
-->
<meta-data
android:name="com.google.android.geo.API_KEY"
android:value="@string/google_maps_key" />
<activity
android:name=".MapsActivity"
android:label="@string/title_activity_maps" />
<activity android:name=".GroupsActivity" />
<activity android:name=".DatabaseActivity" />
<activity android:name=".OperationsActivity" />
<service
android:name=".MyService"
android:enabled="true"
android:exported="true" />
<!--
ATTENTION: This was auto-generated to add Google Play services to your project for
App Indexing. See https://g.co/AppIndexing/AndroidStudio for more information.
-->
<!--
<meta-data
android:name="com.google.android.gms.version"
android:value="@integer/google_play_services_version" />
-->
<provider
android:name="android.support.v4.content.FileProvider"
android:authorities="shomrim.warpcodes.com.shomrim.fileprovider"
android:exported="false"
android:grantUriPermissions="true">
<!--
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/file_paths"></meta-data>
-->
</provider>
</application>
</manifest>
I am missing something simple, please help me understand what it is. tried changing versions many times, didn't work.
thanks.