Android Studio, IntelliJ, 맥 터미널에서 Gradle 프로젝트를 빌드할 때 혹은 .gradle 디렉토리에 대한 Permission 문제가 발생하거나 gradlew 명령어를 실행할 때 빌드 과정에서 에러가 발생할 때가 있습니다. 만약, ./gradlew가 실행이 안된다면 프로젝트 디렉토리에서 아래 명령어를 실행해서 실행권한을 주면 됩니다. $ chmod +x ./gradlew 만약, 빌드 과정에서 .gradle 디렉토리에 대한 권한 문제가 발생한다면 이유는 Gradle Build tool이 프로젝트를 빌드하는 과정에서 .gradle 디렉토리를 수정할 때 쓰기 권한이 없기 때문에 빌드하지 못하는 경우입니다. 그래서 아래 명령어로 프로젝트 디렉토리에 대한 권한을 주어서 외부 tool이 프로..
에러 내용 * What went wrong: Execution failed for task ':app:mergeReleaseResources'. > A failure occurred while executing com.android.build.gradle.internal.res.Aapt2CompileRunnable > AAPT2 aapt2-4.2.1-7147631-linux Daemon #0: Compile '/home/circleci/project/app/src/main/res/drawable/app_icon.png' timed out, attempting to stop daemon. This should not happen under normal circumstances, please file an ..
안녕하세요. 오늘은 fold()와 reduce()에 대해 정리하겠습니다. 1. fold() fold() 함수의 구현 public inline fun IntArray.fold(initial: R, operation: (acc: R, Int) -> R): R { var accumulator = initial for (element in this) accumulator = operation(accumulator, element) return accumulator } fold()함수는 내부 요소들을 모두 돌아가며 operation을 수행한 결과를 반환합니다. reduce()와의 차이점은 초기값을 설정할 수 있고, emptyList여도 Exception을 던지지 않습니다. import org.assertj.cor..