Framework code in Android studio “cannot resolve symbols”

I'm trying to debug through the library code in Android studio. But it shows unresolved symbols, that is, there are red lines in many places

My application build.gradle looks like:

apply plugin: 'com.android.application'

android {
    compileSdkVersion 23
    buildToolsVersion "23.0.2"

    defaultConfig {
        applicationId "com.example.kuldeep.customview"
        minSdkVersion 16
        targetSdkVersion 23
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    testCompile 'junit:junit:4.12'
    compile 'com.android.support:appcompat-v7:23.1.1'
}

My project build.gradle file is:

// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:2.0.0-beta2'

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        jcenter()
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

resolvent:

You are viewing the code of textview, which is an Android platform class and does not belong to your application. The platform class can refer to other "private package" classes that do not belong to the visible API of the application. Android Studio provides you with the function of viewing the source code of such a platform, so you can see its working principle, but you can't change it, You cannot access all the actually compiled classes in the SDK

A short story is normal and expected. If you see this message in your application code (rather than platform classes or additional libraries), you will need to worry about something

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>