Solved: error: package android.support.v7.app does not exist / appcompatactivity not resolved

If you have ever seen an error like below, we have fixed this and got it resolved. The error and solution is like as below.

Compilation Error

error: package android.support.v7.app does not exist

Or an error like

appcompatactivity not resolved

Solution

Modify top level build.gradle file to add following lines:

NOTE: Make sure you are using same version for “appcompact” as that of “compileSdkVersion” . e.g. here we had compileSdkVersion as 27, hence appcompact version is 27.0.2

apply plugin: 'com.android.application'

android {
    compileSdkVersion 27
}
dependencies {
    implementation 'com.android.support:appcompat-v7:27.0.2'
}

lynxbee_ezoic

Subscribe with Valid Email Id to receive updates in Inbox. ( Secured by Google FeedBurner )

   


Leave a Comment

Android Android Applications Android Build system Android Commands Application Libraries Application Stack / User Interface Bash / Shell Scripts Bluetooth driver Cloud Technologies Commands and Packages Compilation Content Management System Core Kernel C Programs Development & Build Development, Debugging and Performance Tools Development Environment Setup Django & REST Api Errors & Failures Git Hardware Platforms HTML JAVA Programs Linux, OS Concepts and Networking Linux Device Drivers Linux Host, Ubuntu, SysAdmin Linux Kernel Linux Networking Middleware Libraries, HAL Multimedia Audio, Video, Images NDK / Middleware / HAL OS Concepts PHP Programming Languages Scripting and Automation Search Engine Optimisation ( SEO ) Social Media Source Code Management ( SCM ) System Administration, Security Testing and Debugging Uncategorized Web design and development Website Hosting Wordpress Yocto / Bitbake / Openembedded