2013-06-23 2 views
6

Я использую intellij-idea для разработки приложения для Android. Я создал проект с андроида модулем, но ни один из них:не может решить символ андроида - приложение для Android - intelliJ

import android.app.Activity; 
import android.os.Bundle; 

признаются, я получаю cannot resolve android symbol. Я гугл этого вопроса, но ни один из замечаний я не нашел там, кажется, debugg моей проблемы

+0

Щелкните правой кнопкой мыши по модулю -> Открыть настройки модуля -> Проверить, что у модуля есть зависимость Android SDK. – rciovati

+2

Вам необходимо настроить IntelliJ для Android, как описано [здесь] (http://stackoverflow.com/questions/5271182/how-do-i-set-up-intellij-idea-for-android-applications#answer-5271194) – BackSlash

+0

@rciovati извините, но где я могу щелкнуть правой кнопкой мыши по модулю? – user1611830

ответ

7

Что вы должны сделать,

 
1. Select your android project 
2. press ctrl +alt + shift + S 
3. Select SDK from the project settings 
4. Check the files under the class path tab 
5. There must be android.jar ,res ,annotations.jar 
Probably there should be missed one or several files in step 5. 
Then, 
6. Go to Android SDK home path field and add your SDK folder again 
files even though you have all the jars and still you are getting the error ,then remove all the jars from the class path and add them again (like in step 6). 
7. Build menu -Rebuild your project. 

Теперь ваши ошибки должны исчезнуть.

+0

Спасибо, это сработало для меня. Да, android.jar не хватало. – WebComer

0

У меня есть ответ ребята
1 Нажмите Ctrl + Alt + Shift + S
2-в модулях бар щелкните по имени проекта
3-изменить версию компиляции SDk до новейших
4 -click apply and ok then sync your project
5-done, я надеюсь, что лучше для вас