Android60 Cannot use @TaskAction annotation on method AbstractKotlinCompile.execute() because interface 오류 A build operation failed. Could not create task ':app:compileDebugKotlin'. Could not create task ':app:compileDebugKotlin'. Cannot use @TaskAction annotation on method AbstractKotlinCompile.execute() because interface org.gradle.api.tasks.incremental.IncrementalTaskInputs is not a valid parameter to an action method. 해결방법이 없어서 앱을 새로 만들어서 빌드해봤더니 . . 프로젝트 단 build.gradle.kts 파일에는 이런 어노테이션이 앱 build... 2023. 5. 8. Android 강의 또는 유용한 사이트 Android 개발을 빨리 배우려면 다음 리소스를 추천합니다: 1. 유튜브 채널: a. Android 개발자: 이 채널은 Android 개발을 위한 공식 채널로 튜토리얼, 강연 및 모범 사례를 제공합니다. (https://www.youtube.com/user/androiddevelopers) b. Mitch를 사용한 코딩: 이 채널은 Kotlin, Jetpack Compose 등과 같은 주제를 다루는 Android 개발을 위한 쉬운 튜토리얼을 제공합니다. (https://www.youtube.com/c/CodingWithMitch) 2. 책: a. "안드로이드 프로그래밍: 빌 필립스, 크리스 스튜어트, 크리스틴 마르시카노의 "큰 너드 목장 안내서": 본 가이드는 초보자를 위한 포괄적인 가이드로, Andr.. 2023. 5. 6. local.properties에 api key 안전하게 보관하기 - gradle.kts 발급받은 api key를 하드코딩 하거나 git에 업로드 하면 위험하기 때문에 local.properties에 보관하기로 했다. local.properties는 .gitignore 대상이여서 git에 업로드 하지 않는다.. 그럼 시작~! 1. local.properties에 api key 넣기 local.properties파일 sdk.dir 아래에 api.key를 추가한다. String 타입이다. api.key="~~~~~~~~~~~~~~~~~~~" 2. build.gradle(app) 파일에 android { ~~ } 가 끝난 지점에 다음 코드를 추가한다. fun getApiKey(propertyKey:String):String{ return gradleLocalProperties(rootDir).ge.. 2023. 4. 26. Kotlin 대소문자 변환하기 Kotlin에서 문자열의 대소문자를 변환하려면 toUpperCase() 및 toLowerCase() 함수를 사용할 수 있습니다. 이 함수들은 문자열의 모든 문자를 대문자 또는 소문자로 변환합니다. 예제 코드는 다음과 같습니다: fun main(args: Array) { val s1 = readLine()!! val array = s1.toList() var result:String="" for(chars in array){ result += if(chars.isUpperCase()){ chars.lowercaseChar() }else{ chars.uppercaseChar() } } print(result) } 참고로 toUpperCase() 및 toLowerCase() 함수는 기본적으로 JVM의 기본 로.. 2023. 4. 24. Kotlin 한글자씩 String 분리하기 Kotlin에서 문자열을 한 글자씩 분리하려면, `toCharArray()` 또는 `toList()` 함수를 사용하여 문자열을 CharArray 또는 List로 변환하고 이를 처리할 수 있습니다. 다음은 두 가지 방법의 예시입니다: 1. `toCharArray()`를 사용하는 방법: ```kotlin fun main() { val inputString = "안녕하세요" val splitChars = inputString.toCharArray() for (char in splitChars) { println(char) } } ``` 2. `toList()`를 사용하는 방법: ```kotlin fun main() { val inputString = "안녕하세요" val splitChars = inputStr.. 2023. 4. 24. Kotlin 에서 getColor 사용하기 Deprecated in API level 23 getColor Added in API level 1 Deprecated in API level 23 public int getColor (int id) This method was deprecated in API level 23. Use getColor(int, android.content.res.Resources.Theme) instead. Returns a color integer associated with a particular resource ID. If the resource holds a complex ColorStateList, then the default color from the set is returned. Parameters id int: The desired resource i.. 2023. 4. 19. 이전 1 ··· 3 4 5 6 7 8 9 10 다음