Programing

Android 스튜디오 오류“지원되지 않는 모듈이 감지되었습니다 : 다음 모듈에 대해 컴파일이 지원되지 않습니다”

lottogame 2020. 7. 9. 08:21
반응형

Android 스튜디오 오류“지원되지 않는 모듈이 감지되었습니다 : 다음 모듈에 대해 컴파일이 지원되지 않습니다”


Android Studio 1.0.1을 사용하고 있습니다. 내 프로젝트에 다른 모듈이 참조하는 Java 모듈이 있습니다. SVN에서 확인했지만 이제는 모든

지원되지 않는 모듈 감지 : 다음 모듈에 대해서는 컴파일이 지원되지 않습니다. 불행히도 하나의 프로젝트에 비 Gradle Java 모듈과 Android-Gradle 모듈을 가질 수 없습니다.

이 오류가 발생하면이 모듈의 컴파일을 중지하여 더 이상 프로젝트를 컴파일 / 실행할 수 없습니다.


우선 Android Studio 1.2 소스로 업데이트해야합니다. https://code.google.com/p/android/issues/detail?id=77983

그런 다음 File-> Invalidate Caches / Restart-> Invalidate Caches & Restart로 이동해야합니다.

그런 다음 응용 프로그램을 다시 빌드하십시오.


1- 프로젝트를 닫습니다

2- 닫기 Android StudioIDE

3- .idea디렉토리를 삭제

4- 모든 .iml파일 삭제

5- Android StudioIDE 열기 및 프로젝트 가져 오기


캐시 무효화 및 재시작이 작동하지 않았습니다. 또한 모든 Android Studio 파일을 업데이트하지 않고 업데이트했습니다.

내가 찾은 해결책은 "기존 Android Studio 프로젝트 열기"를 클릭하거나 폴더를 앱 아이콘으로 드래그하는 대신 "프로젝트 가져 오기 (Eclipse ADT, Gradle 등)"를 클릭하여 android 폴더를 가져 오는 것입니다.

분명히 프로젝트의 모듈에 external.system.id = "GRADLE"을 포함하지 않는 * .iml 파일이 있기 때문에 문제가 발생합니다.

프로젝트를 열 때와 반대로 프로젝트를 가져 오면 iml 파일이 완전히 다시 작성되므로 오류가 제거됩니다.

https://issuetracker.google.com/issues/37008041 에서 정보를 찾았습니다.


File-> Invalidate Caches / Restart에 도움이된다면 이것을 시도하십시오.

그래도 이미지에서 버튼을 클릭해도 도움이되지 않으면 '그라들 파일과 프로젝트 동기화'

여기에 이미지 설명을 입력하십시오


나는 그것이 오래된 질문이라는 것을 안다. 하지만로 업데이트 한 후이 문제에 직면했습니다 Android Studio 3.0. deleting app.iml내 앱 모듈 내부의 파일로 해결 한 다음Invalidate Caches / Restart.


고토 .idea/modules.xml&는 유효 /없는 기존 경로를 삭제합니다 <module />. 그때File => Invalidate Caches / Restart.


위의 방법으로 문제가 해결되지 않으면 모듈 .iml 파일을 확인하고 오류가 있는지 확인하십시오. (앱 모듈의 경우 app.iml이됩니다).


프로젝트를 닫은 다음 프로젝트를 다시 가져 와서 비슷한 문제를 해결했습니다 (열지 않고 이클립스 또는 다른 프로젝트로 다시 가져 오기).


Android Studio를 닫고 ".idea"폴더를 이동하고 프로젝트 루트 폴더 외부에 붙여 넣습니다 (필요한 경우 백업용).

Android 스튜디오를 엽니 다. 프로젝트를 열면 프로젝트에 모듈 (앱)을 추가하라는 메시지가 표시됩니다. 동일한 것을 무시해도됩니다.

기본 빌드 변형을 "디버그"로 설정했습니다. 왼쪽 코너에 빌드 변형 탭이 있거나 왼쪽 하단의 "모니터"기호에 마우스를 올려 놓을 수 있습니다.

참고 : build variant 옵션을 얻기 위해 project.tom의 .iml 파일을 변경할 필요가 없으며 "Invalidate Cache and Restart"도 작동하지 않으므로 기록 파일도 지워집니다!.


프로젝트를 가져와야합니다

https://issuetracker.google.com/issues/37008041

이 오류는 프로젝트에 .iml 파일에 포함되지 않은 모듈이있는 경우 나타납니다. external.system.id = "GRADLE".iml 파일을 확인할 수 있습니까? 또한 프로젝트를 여는 대신 가져 와서 .iml 파일을 완전히 다시 작성하면 해당 오류가 다시 표시되지 않습니다.


Windows 사용자의 경우 파일 시스템 손상으로 인해 발생할 수도 있습니다.

위의 모든 단계를 수행해도 오류가 해결되지 않으면 :

  • Android Studio 닫기
  • 관리자 권한으로 명령 프롬프트 열기
  • chkdsk /f앱이 저장된 드라이브에서를 실행하십시오.
  • .idea폴더 삭제
  • Android Studio를 다시 시작하십시오.

새 버전의 Android Studio를 업데이트 한 다음 캐치 / 재시작을 무효화 할 수 있습니다. 동기화 버튼 빌드 애플리케이션을 클릭하십시오.


나는 같은 문제가 있었고 androidStudio 3.2프로젝트를 복제하는 것이 나를 위해 일했다.


1 단계 : .iml 파일 삭제

Step 2 : Check if your Project Directory Contain any white spaces if so then Rename your project directory leaving space

ex:

Before : My Project

After rename : MyProject

and open Android Studio...


In my case I cloned a git-project where both Java and Kotlin included. Then checked another branch and pressed "Sync Project with Gradle Files". Android Studio 3.0.1.


Check in build.gradle in app you have good compile link .I have mistake with this line compile 'com.android.support:support-annotations:x.x.x' delete and work.


In my case it is because the root project name have a space. So instead of naming it as sample project, it should be sample-project or sample_project.


rename project directory fix error for me, android studio 3.4.2


Invalidating caches/Restart didn't worked for me. But simply deleting the caches folder in \Users\user.AndroidStudio(version)\system worked like a charm


I have encountered this problem.

I'm using buildSrc in my project.

I think the problem is with buildSrc. To solve the problem;

1- Kotlin and Android Stuido version updated (Kotlin version is 1.3.21, Android Studio version is 3.4)

2- Clean cache and restart android studio

But the problem is not solved.

As a last resort, I deleted the project file and clone it over git and the problem is solved


  1. Close project
  2. Close Android Studio
  3. Copy Project to another directory
  4. Open Android Studio
  5. Import Project from that new directory.

This is a ultimate solution. Try and upvote.

참고 URL : https://stackoverflow.com/questions/28668252/android-studio-error-unsupported-modules-detected-compilation-is-not-supported

반응형