错误:方法调用不明确.AppCompactActivity 和 Activity 中的 findViewById (int) [英] Error : Ambiguous method call. Both findViewById (int) in AppCompactActivity and Activity
本文介绍了错误:方法调用不明确.AppCompactActivity 和 Activity 中的 findViewById (int)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在使用 Android Studio 3.0 RC1 初始化工具栏时收到错误:不明确的方法调用".我使用 AppCompatActivity 扩展了我的 Activity 并使用compileSdkVersion 26"编译我的应用程序.附上错误截图.
I am getting the error: "Ambiguous method call" on initializing Toolbar using Android Studio 3.0 RC1. I have extended my Activity with AppCompatActivity and compiling my application using 'compileSdkVersion 26'. Attaching a screenshot of the error.
推荐答案
如果您最近将项目更新为 API,请尝试这样做
If you recently updated your project to API, Try doing
文件 -> 使缓存无效/重新启动
File -> Invalidate Caches / Restart
然后
文件 -> 将项目与 Gradle 文件同步
File -> Sync Project with Gradle Files
我的决心.
这篇关于错误:方法调用不明确.AppCompactActivity 和 Activity 中的 findViewById (int)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文