2014-11-27 9 views
0

멍청한 질문이지만 유감스럽게도 Eclipse에서 Android Studio로 옮겨서 이전에 Gradle을 사용 해본 적이 없으므로 유감입니다. 나는 3 개의 라이브러리 (UIL, androidBootStrap, androidLockpattern)에 의존하는 이클립스에서 하나의 프로젝트를 가져왔다. 라이브러리는 안드로이드 스튜디오 프로젝트의 루트 디렉토리 아래에서 볼 수 있지만 빌드를 클릭하면 다음 오류가 계속 발생한다.Android Studio에서 기호 오류를 찾을 수 없습니다.

G:\AndroidstudioProjects\P3 Authentication\p3Authentication\src\main\java\com\p3authentication\Captcha_Verfication.java 
Error:(11, 45) error: cannot find symbol class Settings 
Error:(25, 18) error: cannot find symbol variable MATRIX_WIDTH 
Error:(27, 11) error: package Settings does not exist 
Error:(28, 49) error: cannot find symbol variable ACTION_VERIFY_CAPTCHA 
Error:(47, 28) error: cannot find symbol variable RESULT_FAILED 
Error:(58, 25) error: cannot find symbol variable EXTRA_RETRY_COUNT 
G:\AndroidstudioProjects\P3 Authentication\p3Authentication\src\main\java\com\p3authentication\Compare_Pattern.java 
Error:(35, 18) error: cannot find symbol variable MATRIX_WIDTH 
Error:(37, 49) error: cannot find symbol variable ACTION_COMPARE_PATTERN 
Error:(39, 38) error: cannot find symbol variable EXTRA_PATTERN 
Error:(70, 28) error: cannot find symbol variable RESULT_FAILED 
Error:(75, 28) error: cannot find symbol variable RESULT_FORGOT_PATTERN 
Error:(86, 25) error: cannot find symbol variable EXTRA_RETRY_COUNT 
G:\AndroidstudioProjects\P3 Authentication\p3Authentication\src\main\java\com\p3authentication\Create_Pattern.java 
Error:(26, 18) error: cannot find symbol variable MATRIX_WIDTH 
Error:(28, 49) error: cannot find symbol variable ACTION_CREATE_PATTERN 
Error:(41, 45) error: cannot find symbol variable EXTRA_PATTERN 
G:\AndroidstudioProjects\P3 Authentication\p3Authentication\src\main\java\com\p3authentication\Pattern_Captcha.java 
Error:(12, 45) error: cannot find symbol class Settings 
Error:(23, 11) error: package Settings does not exist 
Error:(24, 49) error: cannot find symbol variable ACTION_VERIFY_CAPTCHA 
Error:(57, 28) error: cannot find symbol variable RESULT_FAILED 
Error:(68, 25) error: cannot find symbol variable EXTRA_RETRY_COUNT 
Note: G:\AndroidstudioProjects\P3 Authentication\p3Authentication\src\main\java\com\p3authentication\LockerService.java uses or overrides a deprecated API. 
Note: Recompile with -Xlint:deprecation for details. 
Error:Execution failed for task ':p3Authentication:compileDebugJava'. 
> Compilation failed; see the compiler error output for details. 

이 클래스와 변수는 모두 알고 있습니다. 이클립스에서 응용 프로그램을 실행할 때 문제없이 완벽하게 실행되기 때문입니다. 이 문제를 극복하는 방법에 대한 생각은 감사합니다.

+0

귀하의 프로젝트 폴더 구조의 build.gradle 파일과 스크린 샷을 게시하십시오 – drew

답변

1

이 문제의 한 가지 원인은 라이브러리 모듈을 사용하는 경우 패키지 및 응용 프로그램에서 사용할 수 있도록 "android-library"플러그인을 사용해야한다는 것입니다. . IF 당신의 라이브러리를 빌드 할 때 gradle을 사용하고 compile project(":UIL")을 사용하여 라이브러리에 의존성이 있으면 문제가 될 수 있습니다.

라이브러리와

Mutliproject 설정 :

apply plugin: "android-library" 

:

, 당신은 아마 라인이 있어야합니다 이 문제를 바로 잡으라고 요청할 수도 있습니다. android-library에서 com.android.library

관련 문제