Cannot resolve findViewByID in AppCompatActivity
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm following this tutorial: Android Material Design Using Tabs Infos: Android API Level 21 Dependecies are added to graddle file compile 'com.android.support:appcompat-v7:23.0.1' and compile 'com.android.support:design:23.0.1' } The method "findViewById" cannot be resolved. I tried to follow this answer Cannot resolve method 'findViewById(int)' in Fragment , but this AppCompatActivity use OnCreateBundle instead OnCreateView, then i can't get the View object... What is wrong with this code ? I'm missing some import? package info.androidhive