인프런 커뮤니티 질문&답변
build.gradle 문의
작성
·
3.5K
0
오류만 발생하는데 설정에 문제가 있는 것인가요?
java.util.concurrent.ExecutionException: org.gradle.api.GradleException: Failed to create Jar file C:\Users\dckim\.gradle\caches\jars-9\f63efd716e824b816dbd0b68fbcfe113\gradle-api-impldep-6.8.jar.
> org.gradle.api.GradleException: Failed to create Jar file C:\Users\dckim\.gradle\caches\jars-9\f63efd716e824b816dbd0b68fbcfe113\gradle-api-impldep-6.8.jar.
java11로 변경해도 증상은 바뀌지 않네요.
plugins {
id 'com.android.application'
id 'org.jetbrains.kotlin.android'
}
android {
compileSdk 31
defaultConfig {
applicationId "kr.co.nicednr.examcomposeui"
minSdk 21
targetSdk 31
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables {
useSupportLibrary true
}
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = '1.8'
}
buildFeatures {
compose true
}
composeOptions {
kotlinCompilerExtensionVersion compose_version
kotlinCompilerVersion '1.5.21'
}
packagingOptions {
resources {
excludes += '/META-INF/{AL2.0,LGPL2.1}'
}
}
}
dependencies {
implementation 'androidx.core:core-ktx:1.7.0'
implementation "androidx.compose.ui:ui:$compose_version"
implementation "androidx.compose.material:material:$compose_version"
implementation "androidx.compose.ui:ui-tooling-preview:$compose_version"
implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.3.1'
implementation 'androidx.activity:activity-compose:1.3.1'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
androidTestImplementation "androidx.compose.ui:ui-test-junit4:$compose_version"
debugImplementation "androidx.compose.ui:ui-tooling:$compose_version"
// ViewModel
implementation 'androidx.lifecycle:lifecycle-viewmodel-compose:2.4.0-rc01'
}
퀴즈
Jetpack Compose의 주요 특징은 무엇으로 설명되었나요?
XML 레이아웃 파일만을 사용하여 UI를 구성
기존과 근본적으로 다른 UI 코드 작성 방식
주로 백엔드 로직 개발에 집중
전통적인 View 시스템 컴포넌트의 단순 확장
답변 3
0
최신 베타(Dolphin (2021.3.1) Canary 5)버전을 설치해도 동일하게 문제가 발생해서 타 PC에서 시도해 보니 아무 문제가 없는것을 확인했습니다.
혹시나 해서, 사내 보안 툴을 종료하고 사용해보니 잘 되더군요. 이런~
답변 감사했습니다.
0
검색을 해 보았습니다.
https://stackoverflow.com/questions/56426116/not-able-to-create-jar-file-for-gradle-project
다음 위치의 파일을 삭제해 보라고 하네요
C:\Users\{current user}\.gradle\caches\jars-9\jars-9.lock file







보안 툴하니 생각나는것이 Android Studio 내에 proxy 설정을 건드려서 하는 방법도 있는 것 같더라고요.
잘 해결되었다니 다행입니다.