Nick Yelito Nick Yelito - 1 year ago 132
Android Question

Compiler errors in Android API 24 source code

After downloading and installing the API 24 source code, I am seeing a large number of compiler errors in classes that have changes in API 24.

For example, the AccessibilityService class has hundreds of "Cannot resolve symbol" errors on variables, methods, imports etc.

I have tried deleting and redownloading sources multiple times to no avail. Is this a common occurrence with a new set of sources or did I do something wrong?


Here is my app Gradle file, and I am using ''
apply plugin: ''

android {
compileSdkVersion 24
buildToolsVersion "23.0.2"

defaultConfig {
applicationId "com.nyelito.dactyl"
minSdkVersion 23
targetSdkVersion 24
versionCode 10
versionName "1.2.2"
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), ''

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
[group: 'com.fasterxml.jackson.core', name: 'jackson-annotations', version: '2.4.1'],
provided 'org.glassfish:javax.annotation:10.0-b28'
compile('com.mikepenz:aboutlibraries:5.6.7@aar') {
transitive = true

compile ''
compile ''
compile 'com.github.medyo:android-about-page:1.0.5'
compile 'com.github.thepacific:adapter:1.0.5'
compile ''
compile ''
compile ''
compile 'com.github.paolorotolo:appintro:4.0.0'

apply plugin: ''

Here is a screenshot of what it looks like

Answer Source

When you change compileSdkVersion, you also need to change buildToolsVersion to something compatible. In this case

buildToolsVersion 24.0.2
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download