我正在使用androidannotations
annotationProcessor "org.androidannotations:androidannotations:$AAVersion"
compile "org.androidannotations:androidannotations-api:$AAVersion"
我的项目工作正常,但是当我添加了条纹渐变条目时
compile 'com.stripe:stripe-android:6.1.0'
然后面对这个问题
Activity_ is not abstract and does not override abstract method findViewById(int) in HasViews
根据 Android 26 的文档,findViewById
方法的签名已更改,如下所示:
findViewById() 方法的所有实例现在都返回 T 而不是 View
这在当时破坏了Android注释,但该问题在版本4.3.1中很快得到解决 - 请参阅发行说明。
基本上,如果您针对Android 26或更高版本进行编译,则需要切换到至少4.3.1版本的Android注释。
这个AndroidAnnotations问题正在跟踪问题: https://github.com/androidannotations/androidannotations/issues/2001
Google在Android O中更改了findViewById的签名,并且由于此更改,AndroidAnnotations不支持Android O
。