Android项目无法运行原因

时间:2017-03-30 08:28:16

标签: android

enter image description here

我从https://developer.android.com/training/implementing-navigation/nav-drawer.html下载项目,其名称为NavigationDrawer.zip

3 个答案:

答案 0 :(得分:0)

右键单击 src 目录,然后选择将目录标记为 - >资源根。

答案 1 :(得分:0)

您可以按照此步骤进行操作

1) press CTRL+ALT+SHIFT+S.
2) Under Project Setting go to Facets.
3) click + button and add Android-gradle.
4) select your project name.
5) Apply and ok.
6) Goto File and Invalidate cache / restart 

或者你可以先检查sdk-path是否正确。

Open local.properties file and make sure it same with your path sdk.

示例:

# change the SDK path below to match the folder on your system
sdk.dir=D\:\\Android\\android-sdk

答案 2 :(得分:0)

项目同步          项目' NavigationDrawer'不是基于Gradle的项目

我认为这个答案,该项目不是由Gradle构建的