改变的build.gradle依赖于相关的更改对于奥利奥提供错误
compile 'com.android.support:design:26.1.0'
后提到here,成功生成该项目,但是当我尝试运行它给了这样的错误
error: cannot find symbol variable super
error: cannot find symbol method findViewById(int)
error: cannot find symbol method finish()
error: cannot find symbol method getResources()
error: cannot find symbol method setContentView(int)
build.gradle
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
buildToolsVersion "26.0.2"
defaultConfig {
applicationId "com.example.myApp"
minSdkVersion 16
targetSdkVersion 26
versionCode 1
versionName "1.0"
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
android {
useLibrary 'org.apache.http.legacy'
}
dexOptions {
javaMaxHeapSize "4g"
}
}
dependencies {
compile 'com.android.support:multidex:1.0.1'
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:design:26.1.0'
compile 'com.android.support:support-v4:25.3.1'
compile 'com.android.support:cardview-v7:25.3.1'
}
allprojects {
repositories {
jcenter()
maven {
url 'https://maven.google.com'
}
maven { url "https://jitpack.io" }
}
}
如何更新其他两个支持库'support-v4'和'cardview-v7'到'26.1.0'并执行清理构建? – pleft
也改变这两个库编译'com.android.support:support-v13:26.1.0'并编译'com.android.support:cardview-v7:26.1.0',但错误保持不变。 –
你干净了吗? – pleft