2016-03-02 79 views
2

我的compiledSdk版本是23,targetsdkversion是23,我得到这个错误找不到符号类AdapterViewCompat任何人都可以帮忙吗? 我的compiledSdk版本是23,targetsdkversion是23,我得到这个错误无法找到符号类AdapterViewCompat任何人都可以帮忙吗?错误:(8,42)错误:无法找到符号类AdapterViewCompat

apply plugin: 'com.android.application' 
apply plugin: 'android-apt' 
def AAVersion = '3.3.1' 

buildscript { 
    repositories { 
     maven { url "http://dl.bintray.com/populov/maven" } 
     mavenCentral() 

    } 
    dependencies { 
     // replace with the current version of the android-apt plugin 
     classpath 'com.neenbedankt.gradle.plugins:android-apt:1.4' 
     classpath 'com.android.tools.build:gradle:1.3.0' 
    } 
} 

repositories { 
    mavenCentral() 
    mavenLocal() 

} 
dependencies { 
    apt "org.androidannotations:androidannotations:$AAVersion" 
    compile "org.androidannotations:androidannotations-api:$AAVersion" 
    compile 'com.squareup.okhttp:okhttp-android-support:2.5.0' 
    compile 'com.squareup.okio:okio:1.6.0' 
    compile files('libs/CleverTapSDKValidator-20151217.jar') 
} 

apt { 
    arguments { 
     androidManifestFile variant.outputs[0].processResources.manifestFile 
     // if you have multiple outputs (when using splits), you may want to have other index than 0 

     // You can set optional annotation processing options here, like these commented options: 
     // logLevel 'INFO' 
     // logFile '/var/log/aa.log' 
    } 
} 

android { 
    compileSdkVersion 23 
    buildToolsVersion '22.0.1' 

    defaultConfig { 
     applicationId "com.vedicrishiastro.kundli" 
     minSdkVersion 15 
     targetSdkVersion 23 
     versionCode 6 
     versionName "Beta 1.4" 
    } 
    buildTypes { 
     release { 
      minifyEnabled false 
      proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 
     } 
    } 
} 

/*apt { 
    arguments { 
     //androidManifestFile variant.outputs[0].processResources.manifestFile 
     // if you have multiple outputs (when using splits), you may want to have other index than 0 

     // If you're using flavors you should use the following line instead of hard-coded packageName 
     resourcePackageName android.defaultConfig.applicationId 

     // You can set optional annotation processing options here, like these commented options: 
     // logLevel 'INFO' 
     // logFile '/var/log/aa.log' 
    } 
}*/ 

dependencies { 
    compile fileTree(dir: 'libs', include: ['*.jar']) 
    compile 'com.clevertap.android:clevertap-android-sdk:2.0.5' 
    compile 'com.google.android.gms:play-services' 
    compile 'com.android.support:support-v4' 

    compile project(':multilevelexpindlistview') 
    compile 'com.android.support:appcompat-v7:22.2.0' 
    compile 'com.android.support:appcompat-v7:22.1.0' 
    compile 'com.android.support:support-annotations:22.2.0' 
    compile 'com.android.support:support-v4:23.1.0' 
    apt "org.androidannotations:androidannotations:$AAVersion" 
    compile "org.androidannotations:androidannotations-api:$AAVersion" 
    compile 'com.android.support:cardview-v7:21.0.+' 
    compile 'com.github.traex.rippleeffect:library:1.3' 
    compile 'com.android.support:recyclerview-v7:21.0.+' 
    compile 'com.rengwuxian.materialedittext:library:2.1.4' 
    compile 'com.android.support:design:22.2.0' 
    compile 'com.squareup.okhttp:okhttp:2.4.0' 
    compile 'de.hdodenhof:circleimageview:1.3.0' 
    compile 'com.squareup.picasso:picasso:2.5.2' 
    compile project(':library') 
    compile 'com.github.medyo:fancybuttons:[email protected]' 
    compile 'com.jpardogo.materialtabstrip:library:1.1.0' 
    compile 'com.melnykov:floatingactionbutton:1.3.0' 
    compile 'com.google.android.gms:play-services-analytics:8.3.0' 
    compile 'uk.co.chrisjenx:calligraphy:2.1.0' 
    compile 'com.github.lzyzsd:circleprogress:[email protected]' 


} 
android { 
    lintOptions { 
     abortOnError false 
     checkReleaseBuilds false 
    } 
} 


apply plugin: 'android-apt' 
apply plugin: 'com.google.gms.google-services' 
+1

http://stackoverflow.com/questions/33609120/android-studio-error-cannot-find -symbol-class-adapterviewcompat -with-compilesdk – sasikumar

+0

android.support.v7.internal.widget.AdapterViewCompat;在appcompat v23中不存在 (虽然它存在于v22中)。 你可以在 – sasikumar

+0

@sasikumar检查它,我看到了,但我不明白什么是解决方案 – bipin

回答

0
cannot find symbol class AdapterViewCompat 

android.support.v7.internal.widget.AdapterViewCompat;

AdapterViewCompat程序兼容性23等级不存在。您应该使用22

buildToolsVersion "22.0.1" 
0
  1. 如果您有现有的代码,然后改变AdapterViewCompat向 适配器视图和进口android.widget.AdapterView;
  2. 如果你是 然后编写新的代码使用适配器视图,而不是作为AdapterViewcompact AdapterViewCompact在API V23废弃或更高