Monday, 10 November 2014

com.android.support:appcompat-v7:21.+ and aapt.exe has stopped - solution

If you are occurring still error dialogs after you implemented
compile 'com.android.support:appcompat-v7:21.+' 
in your project, it might means you forget set build tools to the latest version. To fix that, you should go to your gradle.build file and change version in buildToolsVersion param i.e. to 21.1.1 (remember to update your sdk!).

Example:

 android {  
   compileSdkVersion 21  
   buildToolsVersion "21.1.1"//<--------------------!!!  
   defaultConfig {  
     applicationId "com.example.project"  
     minSdkVersion 14  
     targetSdkVersion 21  
     versionCode 1  
     versionName "1.0"  
   }  
   buildTypes {  
     release {  
       runProguard false  
       proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'  
     }  
   }  
 }  
 dependencies {  
   compile fileTree(dir: 'libs', include: ['*.jar'])  
   compile 'org.jsoup:jsoup:1.7.2'  
   compile 'com.android.support:appcompat-v7:21.+'  
 }