简体   繁体   中英

package com.facebook does not exist, Facebook Android SDK, IntelliJ Idea

I am trying to write an Android app that uses the Android SDK. I am using IntelliJ Idea 12 CE. I have done this before successfully, but I can't figure out what I did wrong this time. I did the following:

  1. I downloaded the Facebook Android SDK from Facebook's developers website and imported that module into IntelliJ, which added it as a library
  2. I added the imported library module to my project as a dependency

After that I had no problems writing the code, IntelliJ recognized the imports and everything seemed to work fine. When I tried to compile the code, it gave me the following error for every import statement from com.facebook I had:

...package com.facebook does not exist

These are some screenshots I took of the configuration:

Facebook lib

My app's config

右键单击新添加的模块下的java子目录,然后选择Mark Directory As ,然后选择Sources Root ,可能需要重建项目。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM