ButterKnife findByID 方法在版本 8.8.0 中已弃用
ButterKnife findByID method is deprecated in version 8.8.0
您好,我刚刚将 ButterKnife 库版本 8.7.0 更新到 8.8.0
compile 'com.jakewharton:butterknife:8.8.0'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.0'
并发现:
findById(view, id);
已弃用,为什么?改用什么方法?
但当将版本恢复到 8.7.0(或更早版本)时,弃用警告消失。
compileSdkVersion 25
buildToolsVersion "25.0.3"
defaultConfig {
applicationId "com.some.app"
minSdkVersion 21
targetSdkVersion 25
...
根据 change log:
Deprecate the findById
methods. Compile against API 26 and use the normal findViewById
for the same functionality.
Android 的 findViewById
已更新为在最近变得稳定的 API 26 中具有相同的功能,因此允许 Butter Knife 的版本在即将发布的版本中被弃用和删除v9.0.
您好,我刚刚将 ButterKnife 库版本 8.7.0 更新到 8.8.0
compile 'com.jakewharton:butterknife:8.8.0'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.0'
并发现:
findById(view, id);
已弃用,为什么?改用什么方法? 但当将版本恢复到 8.7.0(或更早版本)时,弃用警告消失。
compileSdkVersion 25
buildToolsVersion "25.0.3"
defaultConfig {
applicationId "com.some.app"
minSdkVersion 21
targetSdkVersion 25
...
根据 change log:
Deprecate the
findById
methods. Compile against API 26 and use the normalfindViewById
for the same functionality.
Android 的 findViewById
已更新为在最近变得稳定的 API 26 中具有相同的功能,因此允许 Butter Knife 的版本在即将发布的版本中被弃用和删除v9.0.