가져 오기 android.support.v7을 확인할 수 없습니다.
저는 Android를 처음 사용합니다. 현재 adt-bundle-windows-x86-20131030.zip(Windows 32 비트)가 설치되어 있으며 Android SDK 및 Eclipse를 성공적으로 설치했습니다. 또한 Android SDK 관리자의 모든 것을 업데이트했습니다. 이제 Android v-4.4.2에서 작업 중입니다.
내 프로젝트는 성공적으로 실행,하지만 난 가져올 때 android.support.v7.app.ActionBarActivity;와 import android.support.v7.app.ActionBar;프로젝트 디버그하지 않습니다. 오류가 발생합니다The Import android.support.v7 cannot be resolved
Google에서 검색하여 설치 Android Support Library한 다음 v7프로젝트에 추가 했습니다.
- 파일-> 가져 오기 (android-sdk \ extras \ android \ support \ v7). "appcompat"선택
- 프로젝트-> 속성-> Android. 섹션 라이브러리 "추가"에서 "appCompat"를 선택합니다.
스크린 샷

성공적으로 추가 appCompat되었지만 여전히 오류가 발생합니다.
네비게이터에서 프로젝트로 이동하여 속성을 마우스 오른쪽 버튼으로 클릭하십시오.
왼쪽의 Java Build Path 탭으로 이동합니다.
상단의 라이브러리 탭으로 이동합니다.
외부 항아리 추가를 클릭하십시오.
ADT 번들 폴더로 이동하고 sdk / extras / android / support / v7 / appcompat / libs로 이동합니다.
android-support-v7-appcompat.jar 파일을 선택하십시오.
주문 및 내보내기로 이동하여 새 병 옆의 상자를 선택하십시오.
확인을 클릭하십시오.
여기에 설명 된 답변을 시도했지만 저에게는 효과가 없었습니다. 마지막 Android SDK 도구 버전이 있습니다. 23.0.2 및 Android SDK 플랫폼 도구 버전 20
지원 라이브러리 android-support-v4.jar가이 충돌을 일으키고 /libs있습니다. 프로젝트 폴더 아래의 라이브러리를 삭제하고 두려워하지 마십시오. 라이브러리가 이미 라이브러리에 포함되어 appcompat_v7있습니다. 프로젝트를 정리하고 빌드하면 프로젝트가 매력처럼 작동합니다!

In my case, the auto-generated project appcompat_v7 was closed. So just open up that project in Package Explorer.
Hope this help.
I had the same issue every time I tried to create a new project, but based on the console output, it was because of two versions of android-support-v4 that were different:
[2014-10-29 16:31:57 - HeadphoneSplitter] Found 2 versions of android-support-v4.jar in the dependency list,
[2014-10-29 16:31:57 - HeadphoneSplitter] but not all the versions are identical (check is based on SHA-1 only at this time).
[2014-10-29 16:31:57 - HeadphoneSplitter] All versions of the libraries must be the same at this time.
[2014-10-29 16:31:57 - HeadphoneSplitter] Versions found are:
[2014-10-29 16:31:57 - HeadphoneSplitter] Path: C:\Users\jbaurer\workspace\appcompat_v7\libs\android-support-v4.jar
[2014-10-29 16:31:57 - HeadphoneSplitter] Length: 627582
[2014-10-29 16:31:57 - HeadphoneSplitter] SHA-1: cb6883d96005bc85b3e868f204507ea5b4fa9bbf
[2014-10-29 16:31:57 - HeadphoneSplitter] Path: C:\Users\jbaurer\workspace\HeadphoneSplitter\libs\android-support-v4.jar
[2014-10-29 16:31:57 - HeadphoneSplitter] Length: 758727
[2014-10-29 16:31:57 - HeadphoneSplitter] SHA-1: efec67655f6db90757faa37201efcee2a9ec3507
[2014-10-29 16:31:57 - HeadphoneSplitter] Jar mismatch! Fix your dependencies
I don't know a lot about Eclipse. but I simply deleted the copy of the jar file from my project's libs folder so that it would use the appcompat_v7 jar file instead. This fixed my issue.
I fixed it adding these lines in the build.grandle (App Module)
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar']) //it was there
compile "com.android.support:support-v4:21.0.+" //Added
compile "com.android.support:appcompat-v7:21.0.+" //Added
}
Recent sdk-manager's download does not contain android-support-v7-appcompat.jar But the following dir contains aar file C:\Users\madan\android-sdks\extras\android\m2repository\com\ android\support\appcompat-v7\24.2.1\appcompat-v7-24.2.1.aar This file can be imported by right-click project, import, select general, select archieve and finally select aar file. Even this does not solve the problem. Later remove 'import android.R' and add 'import android.support.v7.appcompat.*;' Follow this tutorial for other details: http://www.srccodes.com/p/article/22/android-hello-world-example-using-eclipse-ide-and-android-development-tools-adt-plugin
completing the answer @Jorgesys, in my case it was exactly the same way but the export configuration was missing in the library:
- right click on appcompat-v7 project;
- properties;
- 왼쪽 탭, Java 빌드 경로;
- 오른쪽 탭, 주문 및 내보내기;
- appcompat-v7로 classes.jar을 확인하십시오.
참고 URL : https://stackoverflow.com/questions/24998368/the-import-android-support-v7-cannot-be-resolved
'Program Club' 카테고리의 다른 글
| PHP-FPM 및 Nginx : 502 불량 게이트웨이 (0) | 2020.10.15 |
|---|---|
| "strlen (s1)-strlen (s2)"는 0보다 작지 않습니다. (0) | 2020.10.15 |
| 기본 관련 프로그램으로 파일을 여는 방법 (0) | 2020.10.14 |
| Java가 지원하지 않는 주요 부 버전 52.0 (0) | 2020.10.14 |
| Django : 데이터베이스 항목의 동시 수정으로부터 어떻게 보호 할 수 있습니까? (0) | 2020.10.14 |
