What went wrong:
Execution failed for task ‘:kakao_flutter_sdk_common:compileReleaseKotlin’.
A failure occurred while executing org.jetbrains.kotlin.compilerRunner.GradleCompilerRunnerWithWorkers$GradleKotlinCompilerWorkAction
Compilation error. See log for more details
Try:
Run with --stacktrace option to get the stack trace.
Run with --info or --debug option to get more log output.
Run with --scan to get full insights.
name: orda
description: "A new Flutter project."
# The following line prevents the package from being accidentally published to
# pub.dev using `flutter pub publish`. This is preferred for private packages.
publish_to: 'none' # Remove this line if you wish to publish to pub.dev
# The following defines the version and build number for your application.
# A version number is three numbers separated by dots, like 1.2.43
# followed by an optional build number separated by a +.
# Both the version and the builder number may be overridden in flutter
# build by specifying --build-name and --build-number, respectively.
# In Android, build-name is used as versionName while build-number used as versionCode.
# Read more about Android versioning at https://developer.android.com/studio/publish/versioning
# In iOS, build-name is used as CFBundleShortVersionString while build-number is used as CFBundleVersion.
# Read more about iOS versioning at
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
# In Windows, build-name is used as the major, minor, and patch parts
# of the product and file versions while build-number is used as the build suffix.
version: 1.0.0+1
environment:
sdk: '>=3.3.4 <4.0.0'
# Dependencies specify other packages that your package needs in order to work.
# To automatically upgrade your package dependencies to the latest versions
# consider running `flutter pub upgrade --major-versions`. Alternatively,
# dependencies can be manually updated by changing the version numbers below to
# the latest version available on pub.dev. To see which dependencies have newer
# versions available, run `flutter pub outdated`.
dependencies:
flutter:
sdk: flutter
kakao_flutter_sdk_user: ^1.9.5 # 카카오 로그인 API 패키지
kakao_flutter_sdk_share: ^1.9.5 # 카카오톡 공유 API 패키지
card_swiper: ^3.0.1
path_provider: ^2.1.3 # 최신 버전으로 업데이트할 수 있습니다.
# The following adds the Cupertino Icons font to your application.
# Use with the Cuper tinoIcons class for iOS style icons.
cupertino_icons: ^1.0.6
http: ^1.2.1
provider: ^6.1.2
flutter_svg: ^2.0.10+1
connectivity_plus: ^6.0.3
shared_preferences: ^2.2.3
flutter_secure_storage: ^4.2.1
google_sign_in: ^6.2.1
crypto: ^3.0.3
flutter_pannable_rating_bar: ^2.7.2+1
flutter_naver_map: ^1.2.3+1
geolocator: ^12.0.0
permission_handler: ^11.3.1
dev_dependencies:
flutter_test:
sdk: flutter
# The "flutter_lints" package below contains a set of recommended lints to
# encourage good coding practices. The lint set provided by the package is
# activated in the `analysis_options.yaml` file located at the root of your
# package. See that file for information about deactivating specific lint
# rules and activating additional ones.
flutter_lints: ^3.0.0
# For information on the generic Dart part of this file, see the
# following page: https://dart.dev/tools/pub/pubspec
# The following section is specific to Flutter packages.
flutter:
# The following line ensures that the Material Icons font is
# included with your application, so that you can use the icons in
# the material Icons class.
uses-material-design: true
assets:
- assets/images/
- assets/App_Key.json
# To add assets to your application, add an assets section, like this:
# - images/a_dot_burr.jpeg
# - images/a_dot_ham.jpeg
# An image asset can refer to one or more resolution-specific "variants", see
# https://flutter.dev/assets-and-images/#resolution-aware
# For details regarding adding assets from package dependencies, see
# https://flutter.dev/assets-and-images/#from-packages
# To add custom fonts to your application, add a fonts section here,
# in this "flutter" section. Each entry in this list should have a
# "family" key with the font family name, and a "fonts" key with a
# list giving the asset and other descriptors for the font. For
# example:
# fonts:
# - family: Schyler
# fonts:
# - asset: fonts/Schyler-Regular.ttf
# - asset: fonts/Schyler-Italic.ttf
# style: italic
# - family: Trajan Pro
# fonts:
# - asset: fonts/TrajanPro.ttf
# - asset: fonts/TrajanPro_Bold.ttf
# weight: 700
#
# For details regarding fonts from package dependencies,
# see https://flutter.dev/custom-fonts/#from-packages
fonts:
- family: Pretendard
fonts:
- asset: assets/fonts/Pretendard-Thin.ttf
weight: 100
- asset: assets/fonts/Pretendard-ExtraLight.ttf
weight: 200
- asset: assets/fonts/Pretendard-Light.ttf
weight: 300
- asset: assets/fonts/Pretendard-Regular.ttf
weight: 400
- asset: assets/fonts/Pretendard-Medium.ttf
weight: 500
- asset: assets/fonts/Pretendard-SemiBold.ttf
weight: 600
- asset: assets/fonts/Pretendard-Bold.ttf
weight: 700
- asset: assets/fonts/Pretendard-ExtraBold.ttf
weight: 800
- asset: assets/fonts/Pretendard-Black.ttf
weight: 900
plugins {
id "com.android.application"
id "kotlin-android"
id "dev.flutter.flutter-gradle-plugin"
}
def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
localPropertiesFile.withReader('UTF-8') { reader ->
localProperties.load(reader)
}
}
def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
if (flutterVersionCode == null) {
flutterVersionCode = '1'
}
def flutterVersionName = localProperties.getProperty('flutter.versionName')
if (flutterVersionName == null) {
flutterVersionName = '1.0'
}
android {
namespace "com.sinabro.orda"
compileSdk flutter.compileSdkVersion
ndkVersion flutter.ndkVersion
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = '1.8'
}
sourceSets {
main.java.srcDirs += 'src/main/kotlin'
}
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.sinabro.orda"
// You can update the following values to match your application needs.
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
minSdkVersion 23
targetSdkVersion flutter.targetSdkVersion
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
}
buildTypes {
release {
// TODO: Add your own signing config for the release build.
// Signing with the debug keys for now, so `flutter run --release` works.
signingConfig signingConfigs.debug
}
}
}
flutter {
source '../..'
}
dependencies {
implementation 'com.google.android.gms:play-services-location:19.0.1' // geolocator가 사용하는 의존성 추가
implementation "com.kakao.sdk:v2-user:2.8.6" // 카카오 로그인
implementation "com.kakao.sdk:v2-talk:2.8.6" // 친구, 메시지(카카오톡)
implementation "com.kakao.sdk:v2-story:2.8.6" // 카카오스토리
implementation "com.kakao.sdk:v2-link:2.8.6" // 메시지(카카오링크)
}
pluginManagement {
def flutterSdkPath = {
def properties = new Properties()
file("local.properties").withInputStream { properties.load(it) }
def flutterSdkPath = properties.getProperty("flutter.sdk")
assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
return flutterSdkPath
}
settings.ext.flutterSdkPath = flutterSdkPath()
includeBuild("${settings.ext.flutterSdkPath}/packages/flutter_tools/gradle")
repositories {
google()
mavenCentral()
gradlePluginPortal()
maven { url 'https://devrepo.kakao.com/nexus/content/groups/public/' }
}
}
plugins {
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
id "com.android.application" version "7.3.0" apply false
id "org.jetbrains.kotlin.android" version "1.9.25" apply false
}
include ":app"
java.lang.IllegalArgumentException: this and base files have different roots: C:\Users\user13\AppData\Local\Pub\Cache\hosted\pub.dev\kakao_flutter_sdk_common-1.9.5\android\src\main\kotlin\com\kakao\sdk\flutter\AppsHandlerActivity.kt and D:\project_\ORDA\android.
at kotlin.io.FilesKt__UtilsKt.toRelativeString(Utils.kt:117) 이런 에러가 나네요 ㅎㅎ
첨부해주신 에러 메시지를 확인했을 때는 코틀린 버전이 호환되지 않아서 에러가 발생하는 것으로 보이고 그 원인이 맞다면 모든 개발 환경에서 동일하게 에러가 발생해야할 것 같은데요, 특정 PC 환경에서만 에러가 발생하고 있다고 해서 로컬 캐시의 영항을 받고 있는 것 같아요.
말씀주신 상황과 에러 메시지를 종합해봤을 때 에러 발생하고 있는 개발 환경의 gradle 캐시를 삭제해보는 방법과 kotlin 버전을 낮추는 방법이 있을 것 같아요.