I know, there are thousands of questions like this,but I tried all solutions and they didn't work for me. So,what is the problem? The problem is error below:
One of the solutions is to use same version specification. I use 26.0.0 version and all libraries too. But error happens anyway. Also, appcompat
error doesn't disappear. It shows that all support libraries must use same version
and there is a red underline. Below is my app level build.gradle file:
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
android {
compileSdkVersion 26
buildToolsVersion "26.0.0"
defaultConfig {
applicationId "com.apps.root.exampleapp"
minSdkVersion 17
targetSdkVersion 26
versionCode 24
versionName "2.1"
multiDexEnabled true
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
// Optional: Specify the language(s) your app supports.
resConfigs "ru", "kz", "en"
}
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 "org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version"
compile 'com.google.firebase:firebase-database:11.0.2'
compile files('libs/aspectjrt-1.7.3.jar')
compile files('libs/isoparser-1.0.6.jar')
compile 'com.google.firebase:firebase-database:11.0.2'
compile 'pub.devrel:easypermissions:1.0.0'
compile 'com.android.support:appcompat-v7:26.0.0-alpha1'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.google.code.gson:gson:2.8.1'
compile 'com.google.firebase:firebase-auth:11.0.2'
compile 'com.google.firebase:firebase-messaging:11.0.2'
compile 'com.google.firebase:firebase-storage:11.0.2'
compile 'com.android.support:design:26.0.+'
compile 'com.squareup.retrofit2:retrofit:2.2.0'
compile 'com.squareup.retrofit2:converter-gson:2.2.0'
compile 'com.firebaseui:firebase-ui-database:2.1.0'
compile 'com.firebaseui:firebase-ui-storage:2.1.0'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.ncapdevi:frag-nav:2.1.0'
compile 'com.roughike:bottom-bar:2.3.1'
compile 'com.google.android.gms:play-services:11.0.2'
//compile 'com.android.support:support-v4:26.+'
compile 'com.android.support:multidex:1.0.0'
compile 'com.github.chrisbanes:PhotoView:1.2.6'
compile 'com.facebook.android:account-kit-sdk:4.+'
compile 'com.krossovochkin.bottomsheetmenu:bottomsheetmenu:1.1'
compile 'com.pixplicity.easyprefs:library:1.9.0'
compile 'com.github.d-max:spots-dialog:0.7@aar'
compile 'com.google.android.exoplayer:exoplayer:r2.5.2'
testCompile 'junit:junit:4.12'
}
repositories {
mavenCentral()
}
apply plugin: 'com.google.gms.google-services'
/*
configurations.all {
resolutionStrategy.eachDependency { DependencyResolveDetails details ->
def requested = details.requested
if (requested.group == 'com.android.support') {
if (!requested.name.startsWith("multidex")) {
details.useVersion '25.3.0'
}
}
}
}
*/
After this trial, I went to manifest file. I tried to add tools:replace="android:value"
to application tag. But it didn't help.I clicked to Merged Manifest
, and it shows following:
Below is my manifest:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.zerotoonelabs.root.qamqor">
<uses-feature android:name="android.hardware.camera" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.RECEIVE_SMS" />
<uses-permission android:name="android.permission.MEDIA_CONTENT_CONTROL"></uses-permission>
<application
android:name=".PrefsApplication"
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/Theme.AppCompat.Light.NoActionBar"
tools:replace="android:value">
<meta-data
android:name="com.facebook.accountkit.ApplicationName"
android:value="@string/app_name" />
<meta-data
android:name="com.facebook.sdk.ApplicationId"
android:value="@string/FACEBOOK_APP_ID" />
<meta-data
android:name="com.facebook.accountkit.ClientToken"
android:value="@string/ACCOUNT_KIT_CLIENT_TOKEN" />
<meta-data
android:name="firebase_crash_collection_enabled"
android:value="false" />
<meta-data
android:name="com.google.firebase.messaging.default_notification_icon"
android:resource="@drawable/ic_kazakhstan" />
<meta-data
android:name="com.google.firebase.messaging.default_notification_color"
android:resource="@color/colorAccent" />
<meta-data
android:name="com.google.android.geo.API_KEY"
android:value="@string/google_maps_key" />
<activity
android:name=".MainActivity"
android:label="@string/app_name"
android:screenOrientation="portrait"
android:theme="@style/AppTheme">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".login.LoginActivity" />
<activity android:name=".LetterDetailActivity" />
<activity android:name=".activities.RulesActivity" />
<activity android:name=".login.EditProfileActivity" />
<activity android:name=".login.SignUpActivity" />
<activity android:name=".login.SignUpActivity2" />
<activity android:name=".ate.UserLocation" />
<activity android:name=".activities.DomainDetailActivity" />
<activity android:name=".activities.ChangePasswordActivity" />
<activity android:name=".activities.SuggestionActivity" />
<activity android:name=".login.RestorePasswordActivity" />
<activity android:name=".activities.ShowPdfActivity" />
<activity android:name=".SeeLetterDetaily" />
<activity android:name=".GuestActivity" />
<activity android:name=".activities.LoginViaFacebookActivity" />
<activity android:name=".activities.PhoneAuthActivity" />
<activity android:name=".ChooseItemActivity" />
<activity android:name=".GuestingActivity" />
<activity android:name=".VideoPlayerActivity"></activity>
</application>
</manifest>
If I remove tools:replace
in manifest , then error will be following:
It also adviced me to add
replace
into meta-data
tags that I have, but it didn't help too. So,the question is how to solve this problem?