inflearn logo
강의

강의

N
챌린지

챌린지

멘토링

멘토링

N
클립

클립

로드맵

로드맵

지식공유

묻고 답해요

176만명의 커뮤니티!! 함께 토론해봐요.

3강에서 MainActivity.kt에서 activity_main.xml에 있는 nav_host_fragment를 가져오는게 안됩니다

미해결

코틀린 3강으로 끝내기 feat. 안드로이드 개발

분명히 activity_main.xml코드도 똑같고 MainActivity.kt 코드도 똑같은데 nav_host_fragment가 Unresolved Reference라고 뜨네요... 혹시 같은 오류 뜨셔서 해결하신 분 있으실까요? 아니면 제 컴퓨터 환경 문제일까요? ㅠㅠ

  • android
  • kotlin
댓글 1 좋아요 0 조회수 864

예외 처리 리팩토링 질문

해결됨

실전! 코틀린과 스프링 부트로 도서관리 애플리케이션 개발하기 (Java 프로젝트 리팩토링)

안녕하세요. 강의 들으며 재밌고 공부하고 있습니다. 감사합니다. 예외 처리를 util패지키에 모아서 처리하는 것은 이해했습니다. 약간 궁금증 생겨서 문의 남겨봅니다! BookService의 코드 일부분 입니다. 여기서 보면 UserRepository 와 BookRepository 의 findByName 에서 모두 fail()로 예외 처리를 하는데요, 이걸 그냥 리포지토리 계층의 메서드 자체에서 예외를 처리해주면 더 깔끔하지 않을까 하는 궁금증이 생겼습니다. 제가 지금까지 공부하면서는 리포지토리 계층에서 디폴트 메서드를 통해서 처리하는 코드도 봤고, 서비스 계층에서 처리하는 코드도 봐서 어떤 방식을 선호하시는지, 권장 하시는지 궁금합니다! 좋은 강의 감사합니다!

  • java
  • spring
  • kotlin
  • spring-boot
  • 리팩토링
장대영 댓글 1 좋아요 4 조회수 960

와 진짜 대박이네요 디폴트 파라미터 하나로 이렇게 편해질수가 ㅜ

미해결

실전! 코틀린과 스프링 부트로 도서관리 애플리케이션 개발하기 (Java 프로젝트 리팩토링)

- 학습 관련 질문을 남겨주세요. 상세히 작성하면 더 좋아요! - 먼저 유사한 질문이 있었는지 검색해보세요. - 서로 예의를 지키며 존중하는 문화를 만들어가요. - 잠깐! 인프런 서비스 운영 관련 문의는 1:1 문의하기를 이용해주세요. 자바 스프링에서는 테스트용 생성자 메서드가 있어도, 매번 일일히 null을 넣어준다거나 하는 문제점들이 있어서 결국 Builder를 사용했었는데 코틀린에서는 롬복 Builder가 지원되지 않는다고 해서 엄청 고민 중이였습니다 근데 이번 강의 보니까 그냥 온전한 객체 만들어주는 팩터리 메서드 하나 만들어놓고 테스트용으로 필요한 인자 값들만 설정해주면 되는 거였군요 진짜 미쳤다.. 갓틀린.. 잘 배워갑니다..

  • java
  • spring
  • kotlin
  • spring-boot
  • 리팩토링
euni 댓글 1 좋아요 1 조회수 353

코틀린 코드로 변경해서 학습을 진행중이신 모든 분들께 질문이 있습니다.

해결됨

토비의 스프링 부트 - 이해와 원리

package deepboot.deep.config.autoconfig import deepboot.deep.annotation.ConditionalMyOnClass import deepboot.deep.annotation.MyAutoConfiguration import org.springframework.beans.factory.annotation.Value import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean import org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory import org.springframework.boot.web.servlet.server.ServletWebServerFactory import org.springframework.context.annotation.Bean import org.springframework.core.env.Environment @MyAutoConfiguration @ConditionalMyOnClass("org.apache.catalina.startup.Tomcat") class TomcatWebServerConfig() { @Value(value = "\${context.path}") lateinit var contextPath: String @Bean("tomcatWebServerFactory") @ConditionalOnMissingBean fun servletWebServerFactory(env: Environment): ServletWebServerFactory { val factory = TomcatServletWebServerFactory() println("contextPath: $contextPath") factory.contextPath = this.contextPath return factory } } 현재 제 TomcatWebServerConfig() 전체 코드입니다. contextPath 를 출력했을 때 결과가 contextPath: ${context.path} 위 처럼 나오고, IllegalArgumentException 이 발생합니다. ContextPath must start with '/' and not end with '/' 제가 생각했을 때 이 @Value 를 제대로 못 읽어오는 것 같은데, 코틀린 클래스 생성자 파라미터로 contextPath 를 주입해도, lateinit var 로 선언해도 여전히 properties 에서 값을 못 읽어오네요. 이런 동일 증상 겪으신 분 어떻게 해결했는지 궁금합니다. 아래는 전체 코드 깃허브 주소입니다. https://github.com/dailyzett/deep 도와주시면 정말 감사하겠습니다. chatGPT 로도 계속 물어보고 있는데 제자리만 돌고 있는 느낌이네요.

  • spring
  • spring-boot
  • kotlin
김세준 댓글 1 좋아요 0 조회수 686

안녕하세요. 람다에서 외부변수를 사용하는 Closure관련해 궁금해 질문드려요.

미해결

자바 개발자를 위한 코틀린 입문(Java to Kotlin Starter Guide)

안녕하세요. 먼저 질좋은 강의 만들어주시고 제공해주셔서 감사드려요! 강의중 Closure가 자바와 다르게 final이 아닌 var변수를 람다안에서 값을 변경가능한것까지 이해하였습니다. 다른 궁금증이 하나 생겨서요. Closure가 람다를 진입하기전 변수를 포획해서 진행한다고 하셨는데, 이는 동시성 문제로부터 자유롭나요?

  • java
  • kotlin
  • 객체지향
클래식 댓글 1 좋아요 3 조회수 518

에뮬레이터가 에러가 나는 경우는 어떤 문제인가요

미해결

[왕초보편] 앱 8개를 만들면서 배우는 안드로이드 코틀린(Android Kotlin)

bts 어플 만들기에서 bts_1 파일까지는 잘 됐는데 액티비티 화면 전환을 시도할려고 코드를 짜다보니 다른 이미지를 선택했을때 자꾸 바탕화면으로 튕기고 계속 시도하니 오류가 납니다 나머지 이미지 파일이나 레이아웃 코드는 모두 복붙했고 메인 액티비티도 코드는 강의내용 그대로 옮겨 적었습니다

  • firebase
  • kotlin
  • android
할머니 리어카 부수는김찬호 댓글 2 좋아요 0 조회수 630

isEmpty가 unresolved references 오류

해결됨

[초급편] 안드로이드 커뮤니티 앱 만들기(Android Kotlin)

isEmpty함수를 따라 쓰려 하자 unresolved references 오류가 발생하며 사용할 수 없어서 대체로 length가 0인 것을 하려고 하자 노란줄이 뜨면서 isEmpty를 추천해주는데 여전히 사용이 안되는데 혹시 왜 그런지 아시나요?

  • kotlin
  • android
  • firebase
ᄋᄋ 댓글 1 좋아요 0 조회수 467

메타데이터 에러

미해결

[왕초보편] 앱 8개를 만들면서 배우는 안드로이드 코틀린(Android Kotlin)

안녕하세요. 이미지 세팅하고 시작 누르는데 맨 밑과 같은 에러가 나오는데요. 아래 2가지 방법을 시도해도 작동이 안되는데 혹시 어떻게 해야 하나요? } https://devshin93.tistory.com/116 참조: -> 첫 번재 해결책 : compileSdk 와 targetSdk 가 31이 아닌 경우, implementation 'androidx.appcompat:appcompat:1.3.0' > 두 번째 해결책 : compileSdk 과 targetSdk 가 31인 경우 걍 해결 됨! AAR 메타데이터를 확인하는 동안 6가지 문제가 발견되었습니다:

  • firebase
  • android
  • kotlin
zzzzz 댓글 1 좋아요 0 조회수 534

firebase 관련 import에서 오류가 발생합니다

해결됨

[초급편] 안드로이드 커뮤니티 앱 만들기(Android Kotlin)

auth 부분에서도 import가 되지 않는 오류가 발생했는데 이전에는 방법을 찾아서 무시하고 일단 넘어갔는데 realtime database에서도 여전히 문제가 발생합니다. 다음과 같이 Firebase를 import하려고 하면 Unresolved reference:Firebase라고 뜹니다. import 선택지는 뜨지도 않고요.. 이전에 auth에서도 동일한 문제가 발생했는데 어떻게 고치고 왜 그런지 아시나요? implementation도 추가했습니다

  • firebase
  • android
  • kotlin
ᄋᄋ 댓글 1 좋아요 0 조회수 1244

강의자료와 소스코드는 어디서 받을수 있나요?

미해결

[왕초보편] 앱 8개를 만들면서 배우는 안드로이드 코틀린(Android Kotlin)

강의 제목 옆에 구름 아이콘이나 수업자료 버튼이 보이지 않습니다ㅠ

  • firebase
  • android
  • kotlin
댓글 1 좋아요 0 조회수 390

코틀린 AnnotationConfigWebApplicationContext 관련 이슈

해결됨

토비의 스프링 부트 - 이해와 원리

AnnotationConfigWebApplicationContext 익명함수가 잘 만들어지시나요? 저 같은 경우에 어떤 문제인지 모르겠는데 익명함수를 만들면 setClassLoader() 메소드를 오버라이딩하라는 컴파일 에러를 만나게 됩니다. 찾아본 결과 부모 클래스인 DefaultResourceLoader 에서 해당 메소드를 이미 구현하고 있는데 왜 다시 구현하라는지 모르겠습니다. 심지어 아래와 같이 overriding 해도 에러가 발생합니다. fun main(args: Array<String>) { val applicationContext = object : AnnotationConfigWebApplicationContext() { @Override override fun onRefresh() { super.onRefresh() val tomcatWebServerFactory = TomcatServletWebServerFactory() val webServer = tomcatWebServerFactory.getWebServer({ servletContext -> servletContext.addServlet("dispatcherServlet", object : DispatcherServlet(this) { }).addMapping("/*") }) webServer.start() } @Override override fun setClassLoader(classLoader: ClassLoader) { super.setClassLoader(classLoader) } } applicationContext.apply { refresh() } } 이런 에러가 발생합니다. fun setClassLoader(classLoader: ClassLoader): Unit defined in tobyspring.helloboot.main.<no name provided> fun setClassLoader(classLoader: ClassLoader?): Unit defined in tobyspring.helloboot.main.<no name provided> 해결하신분이 계시다면 꼭 부탁 드리겠습니다..!

  • spring
  • kotlin
  • 코틀린
  • spring-boot
  • spring-jdbc
이민준 댓글 4 좋아요 2 조회수 899

오류가 생성되는데 왜 생기는지 궁금해서 질문드립니다

미해결

[중급편] 코인 가격 모니터링 앱 제작 (Android Kotlin)

E/RecyclerView: No adapter attached; skipping layout E/RecyclerView: No adapter attached; skipping layout coinListFragment 에서 생성되는 오류라고 생해서 관련된 부분을 수정해보았으나 계속해서 오류가 생성되서 왜 생기는걸까? 궁금해서 질문드립니다. 오류와 관계없이 화면에 리사이클러뷰는 잘 나오기때문에 넘어가도 상관없겠다 싶지만서도 왜 저런 오류가 생기는지 궁금해서 질문 합니다. 처음에는 XML 상에서도 layoutManager 를 지정해줘야 하나 싶어서 했으나 나타났고, 다음으로는 context 관련 문제인가 싶어서 해당하는 부분을 수정하다가 오히려 더 오류가 발생하였습니다...ㅋㅋㅋ 기능에는 문제가 없기 때문에 넘어가도 괜찮지만 순수하게 궁금해서 질문합니다. 아니면 혹시, coinListFragment 쪽의 RecyclerView 가 아닌, Intro 에서 좋아하는 코인을 만들때 의 오류메시지 일까요?

  • android
  • kotlin
ancan Eil 댓글 2 좋아요 0 조회수 572

FireBase 익명로그인 실패

미해결

[왕초보편] 앱 8개를 만들면서 배우는 안드로이드 코틀린(Android Kotlin)

강사님 말씀대로 했는데 익명 로그인 부분에서 else(익명로그인 실패)부분이 뜨네요

  • firebase
  • android
  • kotlin
주식회사에어텍 댓글 2 좋아요 1 조회수 780

에러코드

미해결

[왕초보편] 앱 8개를 만들면서 배우는 안드로이드 코틀린(Android Kotlin)

Run 돌리면 자꾸 에러가 떠서 그냥 아무 코드 입력없이 새 프로젝트를 만들어 돌려도 다음과 같은 에러코드가 뜹니다. 원인이 무엇일까요?? 6 issues were found when checking AAR metadata: 1. Dependency 'androidx.appcompat:appcompat-resources:1.6.1' requires libraries and applications that depend on it to compile against version 33 or later of the Android APIs. :app is currently compiled against android-32. Recommended action: Update this project to use a newer compileSdkVersion of at least 33, for example 33. Note that updating a library or application's compileSdkVersion (which allows newer APIs to be used) can be done separately from updating targetSdkVersion (which opts the app in to new runtime behavior) and minSdkVersion (which determines which devices the app can be installed on). 2. Dependency 'androidx.appcompat:appcompat:1.6.1' requires libraries and applications that depend on it to compile against version 33 or later of the Android APIs. :app is currently compiled against android-32. Recommended action: Update this project to use a newer compileSdkVersion of at least 33, for example 33. Note that updating a library or application's compileSdkVersion (which allows newer APIs to be used) can be done separately from updating targetSdkVersion (which opts the app in to new runtime behavior) and minSdkVersion (which determines which devices the app can be installed on). 3. Dependency 'androidx.activity:activity:1.6.0' requires libraries and applications that depend on it to compile against version 33 or later of the Android APIs. :app is currently compiled against android-32. Recommended action: Update this project to use a newer compileSdkVersion of at least 33, for example 33. Note that updating a library or application's compileSdkVersion (which allows newer APIs to be used) can be done separately from updating targetSdkVersion (which opts the app in to new runtime behavior) and minSdkVersion (which determines which devices the app can be installed on). 4. Dependency 'androidx.core:core:1.9.0' requires libraries and applications that depend on it to compile against version 33 or later of the Android APIs. :app is currently compiled against android-32. Recommended action: Update this project to use a newer compileSdkVersion of at least 33, for example 33. Note that updating a library or application's compileSdkVersion (which allows newer APIs to be used) can be done separately from updating targetSdkVersion (which opts the app in to new runtime behavior) and minSdkVersion (which determines which devices the app can be installed on). 5. Dependency 'androidx.core:core-ktx:1.9.0' requires libraries and applications that depend on it to compile against version 33 or later of the Android APIs. :app is currently compiled against android-32. Recommended action: Update this project to use a newer compileSdkVersion of at least 33, for example 33. Note that updating a library or application's compileSdkVersion (which allows newer APIs to be used) can be done separately from updating targetSdkVersion (which opts the app in to new runtime behavior) and minSdkVersion (which determines which devices the app can be installed on). 6. Dependency 'androidx.annotation:annotation-experimental:1.3.0' requires libraries and applications that depend on it to compile against version 33 or later of the Android APIs. :app is currently compiled against android-32. Recommended action: Update this project to use a newer compileSdkVersion of at least 33, for example 33. Note that updating a library or application's compileSdkVersion (which allows newer APIs to be used) can be done separately from updating targetSdkVersion (which opts the app in to new runtime behavior) and minSdkVersion (which determines which devices the app can be installed on).

  • android
  • kotlin
  • firebase
D.H.LEE 댓글 2 좋아요 0 조회수 5737

안녕하세요. 용어에 대해 질문이 있어 글 남깁니다.

미해결

냉동코더의 알기 쉬운 Modern Android Development 입문

안녕하세요. 강의 잘듣고 있습니다. 다만, 제가 이 강의부터 시작해서 그런지 용어에 대한 개념이 헷갈립니다. util 디렉토리와 source.kt 파일의 역할은 정확히 무엇인가요? util 디렉토리에 들어가는 파일들의 내용은 무엇이고, DataSource의 역할이 무엇인지 궁금합니다 ! 감사합니다..

  • android
  • architecture
  • 아키텍처
  • kotlin
  • jetpack
댓글 2 좋아요 0 조회수 457

Button을 사용하는 경우와 TextView를 사용하는 경우에 대해 차이가 궁금합니다.

해결됨

[중급편] 코인 가격 모니터링 앱 제작 (Android Kotlin)

안녕하세요 강의 막바지를 향해 달려가고 있던 중 궁금한 점이 있습니다. SelectActivity에서 다음 MainActivity로 넘어가기 위해 onClick 이벤트를 TextView를 통해 처리하는 것을 보았습니다. 그런데 SettingActivity에서는 Button을 생성하는 것을 보고 TextView를 통해 클릭 이벤트를 처리하는 것과 Button을 통해 이벤트를 처리하는 것에 대한 차이가 있는지 궁금합니다. 혹은 개발자님만의 상황에 따른 사용 기준이 따로 있나요?? 유익한 강의 너무 잘 듣고 있습니다. 감사합니다

  • kotlin
  • android
  • button
후후후 댓글 1 좋아요 0 조회수 675

repository 를 거쳐서 Api 를 가져오는 이유

해결됨

[중급편] 코인 가격 모니터링 앱 제작 (Android Kotlin)

SelectViewModel 에서 Api를 바로 호출하지 않고 repository 거쳐서 가는게 관리하기 편해서라고 하셨는데 이해가 잘 가지 않아서요.. 바로 호출하면 어떤 불편한 점이 있나요?

  • kotlin
  • android
뿌지징 댓글 1 좋아요 0 조회수 459

24강에서 setIcon과 MessagingStyle질문드립니다.

미해결

윤재성의 Kotlin 기반 안드로이드 앱 개발 Part2 - 메뉴와 4대 구성요소

강사님 24강 자료 그대로 복사해서 가져온 것입니다! button.setOnClickListener { if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.P){ val builder1 = getNotificationBuilder("message", "message style") builder1.setContentTitle("Message Style") builder1.setContentText("Message Style Notification") builder1.setSmallIcon(android.R.drawable.ic_input_delete) val personBuilder1 = Person.Builder() val icon1 = IconCompat.createWithResource(this, android.R.drawable.ic_media_next) personBuilder1.setIcon(icon1) personBuilder1.setName("홍길동") val person1 = personBuilder1.build() val personBuilder2 = Person.Builder() val icon2 = IconCompat.createWithResource(this, R.mipmap.ic_launcher) personBuilder2.setIcon(icon2) personBuilder2.setName("최길동") val person2 = personBuilder2.build() val messageStyle = NotificationCompat.MessagingStyle(person1) messageStyle.addMessage("첫 번째 메시지", System.currentTimeMillis(), person1) messageStyle.addMessage("두 번째 메시지", System.currentTimeMillis(), person2) messageStyle.addMessage("셋 번째 메시지", System.currentTimeMillis(), person1) messageStyle.addMessage("네 번째 메시지", System.currentTimeMillis(), person2) builder1.setStyle(messageStyle) val notification = builder1.build() val manager = getSystemService(Context.NOTIFICATION_SERVICE) as NotificationManager manager.notify(10, notification) } } 에서 personBuilder1.setIcon(icon1) personBuilder2.setIcon(icon2) 부분에서 icon1,icon2 부분에서 Type mismatch: inferred type is IconCompat! but Icon? was expected 오류가 나오고 val messageStyle = NotificationCompat.MessagingStyle(person1) 부분에서는 None of the following functions can be called with the arguments supplied가 나옵니다 ㅠㅠ 어떤 부분이 문제인지 알 수 있을까요 ㅠㅠ

  • android
  • kotlin
hacksamo 댓글 1 좋아요 0 조회수 451

DB 값 질문

해결됨

실전! 코틀린과 스프링 부트로 도서관리 애플리케이션 개발하기 (Java 프로젝트 리팩토링)

안녕하세요 코틀린강의부터 코프링까지 잘 듣고 있습니다. 바로 질문 드리자면,! 1.saveUserTest2라는 테스트케이스를 한 개 더 만들어서 모든 테스트를 진행 시킨다면, saveUserTest는 통과하지만 saveUserTest2는 DB데이터가 2개 가 있어서 통과되지 못 합니다. 이럴 때는 어떻게 해야 독립적으로 DB값을 가지게 할 수 있나요? @Transactional 쓰는 rollback된다고 얼핏 들은 거 같은데 잘 모르겠네요.. 2.실제 h2 DB에는 유저가 2명이 저장이 되어 있는데 테스트환경에서는 0명인 이유는 @SpringBootTest 어노테이션이 실제 실행환경과 완전히 독립된 환경을 만들어 주어서 그런 건가요? 감사드립니다.

  • refactoring
  • spring
  • spring-boot
  • kotlin
  • 리팩토링
  • java
차가운물 댓글 1 좋아요 1 조회수 505

맥에서 intelij 사용 단축키에 대해 알고싶습니다

미해결

자바 개발자를 위한 코틀린 입문(Java to Kotlin Starter Guide)

안녕하세요, 주제와는 좀 다른 질문인데요. 강의하시는거 보면 맥에서 intelij 를 상당히 잘 활용하신다고 느꼈습니다. 특히, 9강에서 ide 화면을 4분할로 빠르게 구성하는게 인상적이었는데, 혹시 그 방법과 단축키 알려주실수 있나요?

  • java
  • kotlin
  • oop
밗성배 댓글 1 좋아요 1 조회수 667

인기 태그

인프런 TOP Writers

주간 인기글