problems with 'com.android.support:appcompat-v7.27.1.1' in the gradle file

This is my dependencies file and there is an underlined red colored text on the compile 'com.android.support:appcompat-v7.27.1.1'

apply plugin: 'com.android.application' android { compileSdkVersion 27 defaultConfig { applicationId "com.abc.mcaproject" minSdkVersion 21 targetSdkVersion 27 versionCode 1 versionName "1.0" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } } dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) compile 'com.android.support:appcompat-v7.27.1.1' implementation 'com.android.support.constraint:constraint-layout:1.1.0' implementation 'com.google.firebase:firebase-database:11.6.0' implementation 'com.google.firebase:firebase-messaging:11.6.0' implementation 'com.google.firebase:firebase-auth:11.6.0' implementation 'com.google.firebase:firebase-storage:11.6.0' testImplementation 'junit:junit:4.12' androidTestImplementation 'com.android.support.test:runner:1.0.2' androidTestImplementation 'com.android.support.test.espresso:espresso- core:3.0.2' } apply plugin: 'com.google.gms.google-services'

This because of this I am having problems changing themes in the styles.xml


when you hover over the red line it may show you the image like this which I have attached below.<img src=https://www.e-learn.cn/content/wangluowenzhang/"https://i.stack.imgur.com/iEY4s.png" alt="Click to see the image">

What it tells you is there is a conflict of the version in some libraries so it suggests us to add those. For my case first, it showed for CardView and then for Design. So I added to it. Below is the code for it.

dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) implementation 'com.android.support:appcompat-v7:27.1.1' implementation 'com.android.support.constraint:constraint-layout:1.1.0' implementation 'com.payumoney.sdkui:plug-n-play:1.2.0' implementation 'com.android.support:cardview-v7:27.1.1' implementation 'com.android.support:design:27.1.1' testImplementation 'junit:junit:4.12' androidTestImplementation 'com.android.support.test:runner:1.0.2' androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2' }

so kindly add those it may be 2 or more than that. Hope that helps.


In Android Studio 3.0 ,the <strong>compile</strong> configuration is now deprecated and should be replaced by implementation or api.

Just replace:

implementation 'com.android.support:appcompat-v7.27.1.1'

    <li><strong>compile</strong> with <strong>implementation</strong></li> <li><strong>testCompile</strong> with <strong>testImplementation</strong>.</li> <li><strong>debugCompile</strong> with <strong>debugImplementation</strong>.</li> <li><strong>androidTestCompile</strong> with <strong>androidTestImplementation</strong>.</li> <li><strong>compileOnly</strong> is still valid. It was added in 3.0 to replace provided and not compile.</li> </ul>

    for more information read this gradel doc


  • How to add module In Android studio
  • Error: more than one library with package name 'com.google.android.gms.license'
  • What do I need enable or install to get the annotation @RunWith
  • Android organizing layout resourse?
  • error while inflating class android.support.v7.widget.CardView
  • java.util.zip.ZipException: duplicate entry: AbstractHttpContent.class
  • problems with 'com.android.support:appcompat-v7.27.1.1' in the gradle file
  • A larger heap for the Gradle daemon is recommended for running jack
  • Android Proguard problems(duplicate) when adding Facebook sdk & Google Firebase sdk
  • Error ':app:packageAllDebugClassesForMultiDex'. > java.util.zip.ZipException: duplicate
  • custom_command ECHO with special character
  • Proguard doesnt obfuscate Class name, only methods are obfuscated
  • What does the exclamation mark before class path do in ProGuard?
  • Found com.google.android.gms:play-services-places:9.2.1, but version 9.0.2 is needed for the google-
  • Proguard Exception java.io.IOException: Duplicate zip entry
  • Is there an HTML code that can make my background picture transparent and my text non-transparent?
  • ASP.NET MVC2 Error: No parameterless constructor defined for this object
  • integrate POCO library in android ndk
  • How to save dynamically created textboxes and their values
  • How to validate a year I enter in textbox using jquery rule?
  • Laravel at least one field is required
  • C# Excel interop - how to test if interop object is still working and performing a task?
  • Changing Jupyter Notebook start up folder by modifying “start in” not working any more
  • Why does java tzupdater add leap seconds?
  • abstracting over a collection
  • pip in virtualenv gets ConnectTimeoutError
  • Can't remove headers after they are sent
  • Is there some graphical way to create my own configuration file on SonarLint?
  • Compiling dlib on OS X
  • List images(01.png) and descriptions(01.txt) from directory
  • C++ pointer value changes with static_cast
  • Run multiple queries from 1 SQL file showing result in multiple tables
  • Copy to all folders batch file?
  • WPF ICommand CanExecute(): RaiseCanExecuteChanged() or automatic handling via DispatchTimer?
  • htaccess add www if not subdomain, if subdomain remove www
  • Installed module is empty
  • How to test if a URL from an Eclipse bundle is a directory?
  • Sending data from AppleScript to FileMaker records
  • Trying to switch camera back to front but getting exception
  • -fvisibility=hidden not passed by compiler for Debug builds