huzit
___을 입력해주세요
huzit
전체 방문자
  • 분류 전체보기 (137)
    • 안드로이드(Compose) (10)
      • UI (4)
      • 개념 (6)
    • 안드로이드 (50)
      • 기본개념 (6)
      • 응용 (4)
      • Debug (18)
      • Binding (3)
      • RecyclerView (5)
      • Firebase (6)
      • Retrofit (1)
      • Activity & Fragment (4)
    • 코틀린 (22)
    • 코딩테스트 (38)
      • 백준 (10)
      • 프로그래머스 (28)
    • 일상 (6)
    • CS 지식 (4)
    • 라즈베리파이 (7)

블로그 메뉴

  • 홈
  • 태그
  • 글쓰기
  • 관리

공지사항

인기 글

태그

  • Retrofit
  • 공돌이파파
  • FCM
  • compose
  • RecyclerView
  • 라즈베리 파이
  • 코틀린
  • 브레빌 밤비노 플러스
  • recyclerView ClickEvent
  • Android
  • firebase
  • Java
  • 공돌카돈
  • IFTTT
  • jetpack
  • gts4mini
  • 프로그래머스
  • Debug
  • Kotlin
  • docker

최근 댓글

최근 글

티스토리

hELLO · Designed By 정상우.
huzit

___을 입력해주세요

Build was configured to prefer settings repositories over project repositories but repository 'flatDir' was added by build file 'app/build.gradle'
안드로이드/Debug

Build was configured to prefer settings repositories over project repositories but repository 'flatDir' was added by build file 'app/build.gradle'

2023. 3. 7. 10:48
728x90

상황

aar 형태의 라이브러리를 등록하는 중 발생했습니다

코드

android{
	...
    repository{
    	flatDir{
        	dirs 'libs'
        }    
   }
}

dependencies {
	...
    implementation(name: '***_sdk', ext:'arr')
}

해결 방법

/*
android{
	...
    repository{
    	flatDir{
        	dirs 'libs'
        }    
   }
}
*/

dependency{
	...
	implementation files("libs/***_sdk.aar")
}

repository 코드를 전부 삭제하고

implementation이 해당 유형의 파일을 찾는 것이 아닌 상대경로로 직접 연결했습니다.

변경 -> 성공

참고

 

Build was configured to prefer settings repositories over project repositories but repository 'flatDir' was added by build file

상황 aar을 import하기 위해 작업도중 발생 원인 모르겠음. api 30과 31의 차이라기도 뭐한게.. taget api 30인 project가 설정한 대로 똑같이 해도 설정되지 않음. 시도한 방법 //app 또는 project gradle에 아래

greensky0026.tistory.com

 

728x90
저작자표시 (새창열림)

'안드로이드 > Debug' 카테고리의 다른 글

RemoteServiceException: Context.startForegroundService() did not then call Service.startForeground(): ServiceRecord{dcc7ca6 u0 com.***.***/.ble.BleService}  (0) 2023.04.13
--- Failed to create image decoder with message 'unimplemented'  (0) 2023.04.10
Caused by: java.lang.IllegalArgumentException: Char / is not a decimal digit  (0) 2023.04.10
SDK location not found  (0) 2023.03.13
Waiting For Debgger 무한 대기  (0) 2023.03.08
    '안드로이드/Debug' 카테고리의 다른 글
    • --- Failed to create image decoder with message 'unimplemented'
    • Caused by: java.lang.IllegalArgumentException: Char / is not a decimal digit
    • SDK location not found
    • Waiting For Debgger 무한 대기
    huzit
    huzit
    simple is best

    티스토리툴바