java - 仅从 Android N (--min-api 24) 开始支持静态接口方法: void butterknife.Unbinder.lambda$static$0()
问题描述
遇到此错误时,我正在尝试调试应用程序
仅从 Android N (--min-api 24) 开始支持静态接口方法: void butterknife.Unbinder.lambda$static$0()
这是我的毕业典礼
apply plugin: 'com.android.application'
android {
compileSdkVersion 29
buildToolsVersion "29.0.3"
defaultConfig {
applicationId "com.github.webrtc"
minSdkVersion 19
targetSdkVersion 29
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('androidx.test.espresso:espresso-core:3.1.0', {
exclude group: 'com.android.support', module: 'support-annotations'
})
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'fi.vtt.nubomedia:kurento-room-client-android:1.1.2'
implementation 'org.whispersystems:webrtc-android:M59'
implementation 'com.jakewharton:butterknife:10.0.0'
annotationProcessor 'com.jakewharton:butterknife-compiler:10.0.0'
implementation "org.java-websocket:Java-WebSocket:1.3.0"
implementation 'com.squareup.okhttp3:okhttp:3.9.0'
implementation 'androidx.appcompat:appcompat:1.1.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
}
解决方案
阅读 Butterknife 的 github 页面的“下载”部分。
https://github.com/JakeWharton/butterknife
android {
...
// Butterknife requires Java 8.
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
dependencies {
implementation 'com.jakewharton:butterknife:10.2.1'
annotationProcessor 'com.jakewharton:butterknife-compiler:10.2.1'
}
您需要添加 compileOptions 部分。
推荐阅读
- ios - 如何在 Swift IOS 中将图像 CMY 转换为半色调?
- puppet - 用于 AD 用户帐户创建的 Puppet
- java - 如何点击下一个班级名称?
- css - 由于 div 包含引导 css,Angular 6 ngb-bootstrap 模式未显示
- jquery - 无法在 jquery 中设置复选框属性的值
- c++ - 将 std::future 和 std::promise 与非 std::thread 一起使用是否安全?
- powershell - 如何在 Powershell 模块文件中使用类型加速器?
- php - 如何在 Laravel 中分离控制器方法?
- python - Python,将 x = 0 放入 '' 括号中
- angular - 为什么 materializecss 和 *ngFor 的轮播不能动态协同工作以获取图像和内容项