<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by BattleShip Park on Medium]]></title>
        <description><![CDATA[Stories by BattleShip Park on Medium]]></description>
        <link>https://medium.com/@battleship-park?source=rss-34945aba7a15------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*m3JWqkCRPQ4PJIW80OhMsA.jpeg</url>
            <title>Stories by BattleShip Park on Medium</title>
            <link>https://medium.com/@battleship-park?source=rss-34945aba7a15------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 03 Dec 2026 13:53:36 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@battleship-park/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Milvus IVF_SQ8 Memory Usage Check]]></title>
            <link>https://battleship-park.medium.com/milvus-ivf-sq8-memory-usage-check-4a3944f3619b?source=rss-34945aba7a15------2</link>
            <guid isPermaLink="false">https://medium.com/p/4a3944f3619b</guid>
            <category><![CDATA[milvus]]></category>
            <category><![CDATA[vector-database]]></category>
            <category><![CDATA[recommendation-system]]></category>
            <category><![CDATA[recommendations]]></category>
            <dc:creator><![CDATA[BattleShip Park]]></dc:creator>
            <pubDate>Tue, 23 Jan 2024 04:54:34 GMT</pubDate>
            <atom:updated>2024-01-23T04:54:34.065Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*_dQqJkSgKmnX816_" /><figcaption>Photo by <a href="https://unsplash.com/@jjying?utm_source=medium&amp;utm_medium=referral">JJ Ying</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Recently, Sticker.ly started providing sticker recommendation service. For sticker recommendation, there are two major steps:</p><ul><li>Extract vectors from image</li><li>Compare similarity between vectors</li></ul><p>For the second step, we are using vector search engine Milvus. Milvus supports various indexing methods, and for the first release, we used the basic IVF_FLAT.</p><p>Currently, Milvus is running in standalone mode, and even though we have only added initial data, the memory usage is over 80%, so we need to expand it. However, due to internal circumstances, we could not upgrade to Helm Chart immediately.</p><p>In order to find another way, I carefully examined the document and found out that if the index type is IVF_SQ8 instead of IVF_FLAT, the memory usage can be reduced by 70–75% because 1 byte UINT is used instead of 4 byte FLOAT (<a href="https://milvus.io/docs/index.md#IVF_SQ8">document</a>). I actually compared the memory usage of IVF_FLAT and IVF_SQ8. Additionally, I also checked IVF_PQ.</p><p>The experimental environment is as follows:</p><ul><li>Memory of cluster: 16GB</li><li>Number of vectors: 200,000</li><li>Vector dimension: 1280</li></ul><p>The memory usage is as follows. However, Milvus does not provide a way to measure by collection, so I measured it with all collections down and only one collection up.</p><ul><li>IVF_FLAT: 10.30%</li><li>IVF_SQ8: 6.34%</li><li>IVF_PQ: 4.38%</li></ul><p>The compression ratio of IVF_SQ8 vs IVF_FLAT is 38.44%, which is quite good, but it is much different from the document’s 70–75%. As I was thinking that it was a pity, I realized that I did not exclude the basic memory except for all collections. When I measured the basic memory only, it was 4.3%. The size of the pure index excluding the basic memory from the above values is:</p><ul><li>IVF_FLAT: 6.00%</li><li>IVF_SQ8: 2.04%</li><li>IVF_PQ: 0.08%</li></ul><p>This makes the compression ratio 66%, which is similar to the document.</p><p>The above values are percentages, so I calculated in more detail how much size it uses based on 16GB:</p><ul><li>IVF_FLAT: 983.04MB</li><li>IVF_SQ8: 334.23MB</li><li>IVF_PQ: 13.10MB</li></ul><p>Since they are 200,000 vectors of 1280 dimensions, the usage per dimension is:</p><ul><li>IVF_FLAT: 4.0265B</li><li>IVF_SQ8: 1.369B</li><li>IVF_PQ: 0.06B</li></ul><p>I was surprised that IVF_FLAT almost matches the theoretical size, 4 bytes. SQ8 was a little larger than the theoretical size, 1 byte, but I did not look into it further.</p><p>In the operating environment, we use 2.5 million vectors, and if you calculate with the above values, IVF_FLAT uses 12GB. This is almost the same as the actual usage.</p><p>The compression ratio of IVF_SQ8 is good, but if the recommendation results are not good, it is useless. When I actually compared the results, there was almost no difference between IVF_FLAT and IVF_SQ8, so I decided to use IVF_SQ8.</p><p>I did not mention IVF_PQ, but it showed an amazing result that uses only 0.06B per dimension. However, when I actually compared the results, it was very different from IVF_FLAT. The difference in results does not mean that it is bad. It need a more detailed evaluation for that, but I decided not to proceed any further in this investigation.</p><p>Conclusion</p><ul><li>IVF_FLAT uses about 4 bytes per dimension</li><li>The compression ratio of IVF_SQ8 is 66%. The recommendation results are also almost the same as IVF_FLAT. I decided to use IVF_SQ8</li><li>IVF_PQ has a ridiculous compression ratio, but it needs to be evaluated whether there is a problem with the recommendation results</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4a3944f3619b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[밀버스(Milvus)의 IVF_SQ8 메모리 사용량 확인]]></title>
            <link>https://battleship-park.medium.com/%EB%B0%80%EB%B2%84%EC%8A%A4-milvus-%EC%9D%98-ivf-sq8-%EB%A9%94%EB%AA%A8%EB%A6%AC-%EC%82%AC%EC%9A%A9%EB%9F%89-%ED%99%95%EC%9D%B8-949892f172d1?source=rss-34945aba7a15------2</link>
            <guid isPermaLink="false">https://medium.com/p/949892f172d1</guid>
            <category><![CDATA[recommendations]]></category>
            <category><![CDATA[vector-database]]></category>
            <category><![CDATA[milvus]]></category>
            <category><![CDATA[recommendation-system]]></category>
            <dc:creator><![CDATA[BattleShip Park]]></dc:creator>
            <pubDate>Mon, 22 Jan 2024 11:30:15 GMT</pubDate>
            <atom:updated>2024-01-22T11:30:15.927Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*_dQqJkSgKmnX816_" /><figcaption>Photo by <a href="https://unsplash.com/@jjying?utm_source=medium&amp;utm_medium=referral">JJ Ying</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>최근에 스티컬리(Sticker.ly)에서 스티커 추천을 서비스 하기 시작했습니다. 스티커 추천을 위해서는 크게 두 가지 과정이 필요한데,</p><ol><li>이미지에서 벡터 추출</li><li>벡터간 유사도 비교</li></ol><p>이 때 2번을 위해 벡터 검색 엔진 밀버스(Milvus)를 사용하고 있습니다. Milvus는 다양한 인덱싱 방식을 지원하는데, 일단 첫 출시에서는 기본적인 IVF_FLAT을 사용했습니다.</p><p>현재 밀버스는 스탠드얼론으로 실행해 놨는데, 1차 데이터만 넣고 추가는 없는 상황인데도 메모리 사용량이 80% 넘어가서 확장이 필요한 상황입니다. 그렇지만 내부 사정상 Helm Chart로 당장 업그레이드 하기 어려웠습니다.</p><p>다른 방법을 찾기 위해 문서를 자세히 살펴보니, 인덱스 타입을 IVF_FLAT 대신 IVF_SQ8로 사용할 경우 4바이트 FLOAT 대신 1바이트 UINT을 사용하기 때문에 메모리 사용량을 70~75% 줄일 수 있다는 것을 알게 되었습니다(<a href="https://milvus.io/docs/index.md#IVF_SQ8">문서</a>). 실제로 IVF_FLAT, IVF_SQ8의 메모리 사용량을 비교해 봤습니다. 추가로 IVF_PQ도 같이 확인하였습니다.</p><p>실험 환경은 다음과 같습니다</p><ul><li>실험용 클러스터의 메모리: 16GB</li><li>벡터 수: 20만개</li><li>벡터 차원: 1280</li></ul><p>메모리 사용량을 확인하니 다음과 같았습니다. 다만, 컬렉션별로 측정할 수 있는 방법을 밀버스에서 제공하지 않아, 모든 컬렉션을 내리고 각각 하나씩만 올린 상태에서 측정했습니다.</p><ul><li>IVF_FLAT: 10.30%</li><li>IVF_SQ8: 6.34%</li><li>IVF_PQ: 4.38%</li></ul><p>IVF_FLAT 대비 IVF_SQ8의 압축률은 38.44%로 꽤 훌륭하지만, 문서상의 수치인 70~75%와는 차이가 컸습니다. 아쉽다고 생각하던 찰나에, 모든 컬렉션을 뺀 기본 메모리를 제외하지 않았다는 생각이 들었습니다. 기본 메모리만을 측정해보니 4.3%였고, 위의 수치에서 기본 메모리를 뺀 순수 인덱스만의 크기는:</p><ul><li>IVF_FLAT: 6.00%</li><li>IVF_SQ8: 2.04%</li><li>IVF_PQ: 0.08%</li></ul><p>이렇게 하면 압축률이 66%가 되어 문서의 압축률과 비슷해집니다.</p><p>위의 수치는 비율이여서, 구체적으로 어느 정도의 크기를 사용하는건지 좀 더 자세히 계산해 보기로 했습니다. 16기가를 기준으로 계산하면,</p><ul><li>IVF_FLAT: 983.04MB</li><li>IVF_SQ8: 334.23MB</li><li>IVF_PQ: 13.10MB</li></ul><p>1280 차원의 벡터 20만개이므로, 차원 하나당 사용량은</p><ul><li>IVF_FLAT: 4.0265B</li><li>IVF_SQ8: 1.369B</li><li>IVF_PQ: 0.06B</li></ul><p>IVF_FLAT의 경우 이론적 크기인 4바이트와 거의 일치해서 깜짝 놀랐습니다. SQ8은 이론적 크기인 1바이트 보다 조금 컸는데, 더 이상 자세히 알아보지는 않았습니다.</p><p>운영 환경에서 250만개의 벡터를 사용하고 있는데, 위의 수치로 계산하면 IVF_FLAT은 12GB를 사용합니다. 이는 현재 실제 사용량과 거의 비슷합니다.</p><p>IVF_SQ8의 압축률은 좋지만, 추천 결과가 안 좋다면 아무 소용이 없습니다. 결과를 실제로 비교해 보니 IVF_FLAT와 IVF_SQ8의 차이가 거의 없어서 IVF_SQ8을 사용하기로 했습니다.</p><p>IVF_PQ를 언급하지 않았는데, 한 차원에 고작 0.06B만 사용하는 놀라운 결과를 보여줍니다. 다만, 결과를 실제로 비교해 봤을 때 IVF_FLAT과 많이 달랐습니다. 결과가 다르다는게 나빴다는 의미는 아닙니다. 더 자세히 평가를 해봐야 알 수 있는 부분인데, 이번 조사에서는 더 이상 진행하지 않기로 했습니다.</p><p>결론</p><ul><li>IVF_FLAT은 차원당 4바이트 정도 사용한다</li><li>IVF_SQ8의 압축률은 66%. 추천 결과도 IVF_FLAT와 거의 같다. IVF_SQ8을 사용하는 것으로 결정</li><li>IVF_PQ의 압축률은 무시무시하지만, 추천 결과에 문제가 없는지 평가가 필요하다</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=949892f172d1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Upgrade to Kotlin 1.9.22 (half success)]]></title>
            <link>https://battleship-park.medium.com/upgrade-to-kotlin-1-9-22-half-success-a4f73978f70c?source=rss-34945aba7a15------2</link>
            <guid isPermaLink="false">https://medium.com/p/a4f73978f70c</guid>
            <category><![CDATA[android]]></category>
            <category><![CDATA[kotlin]]></category>
            <category><![CDATA[android-app-development]]></category>
            <dc:creator><![CDATA[BattleShip Park]]></dc:creator>
            <pubDate>Mon, 08 Jan 2024 03:25:41 GMT</pubDate>
            <atom:updated>2024-01-08T03:25:41.326Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*-CvvXk8260-3QFcp" /><figcaption>Photo by <a href="https://unsplash.com/@brett_jordan?utm_source=medium&amp;utm_medium=referral">Brett Jordan</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>I’m currently on Kotlin version 1.8.0 and I’m getting a message in Android Studio that 1.9.22 is out. I didn’t care about the fortress because I didn’t have to follow the Kotlin version sensitively, but let’s upgrade it after a long time</p><h4>Summarization</h4><ul><li>Compose does not support Kotlin 1.9.22. Use 1.9.21</li><li>Compose Compiler Upgraded to 1.5.7</li><li>Moshi 1.5.0 Upgrade</li><li>Hilt 2.46.1 Upgrade</li></ul><h3>1st attempt</h3><p>[Hilt] Processing did not complete. See error above for details.<br>error: [Hilt]<br> Unsupported metadata version. Check that your Kotlin version is &gt;= 1.0: java.lang.IllegalStateException: Unsupported metadata version. Check that your Kotlin version is &gt;= 1.0</p><p>The error message says Hilt, and it&#39;s like the error I see every time I upgrade Kotlin. Find it quickly and upgrade Hilt from 2.44 to 2.46.</p><p><a href="https://github.com/google/dagger/issues/4035">Hilt incompatible with Kotlin to 1.9 · Issue #4035 · google/dagger</a></p><h3>2st attempt</h3><p>Caused by: com.sun.tools.javac.processing.AnnotationProcessingError: java.lang.IllegalStateException: Could not parse metadata! Try bumping kotlinpoet and/or kotlinx-metadata version.<br>Caused by: com.sun.tools.javac.processing.AnnotationProcessingError: java.lang.IllegalStateException: Could not parse metadata! Try bumping kotlinpoet and/or kotlinx-metadata version.</p><p>Caused by: com.sun.tools.javac.processing.AnnotationProcessingError: java.lang.IllegalStateException: Could not parse metadata! Try bumping kotlinpoet and/or kotlinx-metadata version.</p><p>at jdk.compiler/com.sun.tools.javac.processing.JavacProcessingEnvironment.callProcessor(Unknown Source)<br> at jdk.compiler/com.sun.tools.javac.processing.JavacProcessingEnvironment.discoverAndRunProcs(Unknown Source)<br> at jdk.compiler/com.sun.tools.javac.processing.JavacProcessingEnvironment$Round.run(Unknown Source)<br> at jdk.compiler/com.sun.tools.javac.processing.JavacProcessingEnvironment.doProcessing(Unknown Source)<br> at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.processAnnotations(Unknown Source)<br> … 47 more<br>Caused by: java.lang.IllegalStateException: Could not parse metadata! Try bumping kotlinpoet and/or kotlinx-metadata version.<br> at com.squareup.moshi.kotlinpoet.metadata.KotlinPoetMetadata.readKotlinClassMetadata(KotlinPoetMetadata.kt:90)<br>Caused by: java.lang.IllegalStateException: Could not parse metadata! Try bumping kotlinpoet and/or kotlinx-metadata version.</p><p>at com.squareup.moshi.kotlinpoet.metadata.KotlinPoetMetadata.toKmClass(KotlinPoetMetadata.kt:119)<br> at com.squareup.moshi.kotlin.codegen.apt.MoshiCachedClassInspector.toKmClass(MoshiCachedClassInspector.kt:41)<br> at com.squareup.moshi.kotlin.codegen.apt.MetadataKt.targetType(metadata.kt:136)<br> at com.squareup.moshi.kotlin.codegen.apt.JsonClassCodegenProcessor.adapterGenerator(JsonClassCodegenProcessor.kt:141)</p><p>이것도 봤던 에러인데 잘 기억이 안 나서 찾아 봅니다. moshi 쪽 문제라서, moshi 버전을 올려보라고 하네요. 1.14.0을 1.15.0으로 올려봅니다.</p><p>그리고나서 로그를 다시 보니 com.squareup.moshi 에서 에러가 났군요…</p><h3>3차 시도</h3><p>e: This version (1.4.0) of the Compose Compiler requires Kotlin version 1.8.0 but you appear to be using Kotlin version 1.9.22 which is not known to be compatible. Please consult the Compose-Kotlin compatibility map located at <a href="https://developer.android.com/jetpack/androidx/releases/compose-kotlin">https://developer.android.com/jetpack/androidx/releases/compose-kotlin</a> to choose a compatible version pair (or `suppressKotlinVersionCompatibilityCheck` but don’t say I didn’t warn you!).</p><p>낯선 에러인데, 에러에 있는 페이지에 가보니 코틀린 버전과 컴포즈 컴파일러 버전을 맞춰야 하는군요. 아직 코틀린 1.9.21용 1.5.7이 최신이고 1.9.22용은 없는데.. 일단 바꿔 봅니다</p><p>composeOptions <strong>{<br> </strong>kotlinCompilerExtensionVersion = “1.5.7”<br><strong>}</strong></p><h3>4차 시도</h3><p>This version (1.5.7) of the Compose Compiler requires Kotlin version 1.9.21 but you appear to be using Kotlin version 1.9.22 which is not known to be compatible. Please consult the Compose-Kotlin compatibility map located at <a href="https://developer.android.com/jetpack/androidx/releases/compose-kotlin">https://developer.android.com/jetpack/androidx/releases/compose-kotlin</a> to choose a compatible version pair (or `suppressKotlinVersionCompatibilityCheck` but don’t say I didn’t warn you!).</p><p>안되네요.. 그럼 코틀린을 1.9.22가 아니라 1.9.21로 해봅니다</p><h3>5차 시도</h3><p>Caused by: com.sun.tools.javac.processing.AnnotationProcessingError: java.lang.NoSuchMethodError: ‘kotlinx.metadata.jvm.KotlinClassMetadata kotlinx.metadata.jvm.KotlinClassMetadata$Companion.read(kotlinx.metadata.jvm.KotlinClassHeader)’<br> at jdk.compiler/com.sun.tools.javac.processing.JavacProcessingEnvironment.callProcessor(Unknown Source)<br> at jdk.compiler/com.sun.tools.javac.processing.JavacProcessingEnvironment.discoverAndRunProcs(Unknown Source)<br> at jdk.compiler/com.sun.tools.javac.processing.JavacProcessingEnvironment$Round.run(Unknown Source)<br> at jdk.compiler/com.sun.tools.javac.processing.JavacProcessingEnvironment.doProcessing(Unknown Source)<br> at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.processAnnotations(Unknown Source)<br> … 39 more<br>Caused by: java.lang.NoSuchMethodError: ‘kotlinx.metadata.jvm.KotlinClassMetadata kotlinx.metadata.jvm.KotlinClassMetadata$Companion.read(kotlinx.metadata.jvm.KotlinClassHeader)’<br> at androidx.room.compiler.processing.javac.kotlin.KotlinMetadataElement$Companion.createFor(KotlinMetadataElement.kt:125)</p><p>로그에는 room에서 발생했지만 검색해보니 <a href="https://github.com/google/dagger/issues/3701">https://github.com/google/dagger/issues/3701</a> Hilt를 2.46.1로 업그레이드 하라고 합니다.</p><p>이렇게 하면 빌드 성공합니다</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a4f73978f70c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[코틀린 1.9.22로 업그레이드 (절반의 성공)]]></title>
            <link>https://battleship-park.medium.com/%EC%BD%94%ED%8B%80%EB%A6%B0-1-9-22%EB%A1%9C-%EC%97%85%EA%B7%B8%EB%A0%88%EC%9D%B4%EB%93%9C-%EC%A0%88%EB%B0%98%EC%9D%98-%EC%84%B1%EA%B3%B5-5876975fad08?source=rss-34945aba7a15------2</link>
            <guid isPermaLink="false">https://medium.com/p/5876975fad08</guid>
            <category><![CDATA[android-app-development]]></category>
            <category><![CDATA[kotlin]]></category>
            <category><![CDATA[android]]></category>
            <dc:creator><![CDATA[BattleShip Park]]></dc:creator>
            <pubDate>Mon, 08 Jan 2024 03:15:25 GMT</pubDate>
            <atom:updated>2024-01-08T03:15:25.938Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*-CvvXk8260-3QFcp" /><figcaption>Photo by <a href="https://unsplash.com/@brett_jordan?utm_source=medium&amp;utm_medium=referral">Brett Jordan</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>현재 코틀린 버전 1.8.0인데 1.9.22가 나왔다는 메시지가 안드로이드 스튜디오에 나옵니다. 요새는 코틀린 버전에 민감하게 따라갈 필요가 없어서 신경 안 쓰고 있었는데, 오랫만에 업그레이드를 해봅시다</p><h4>요약</h4><ul><li>컴포즈가 코틀린 1.9.22를 대응하지 않는다. 1.9.21로 사용</li><li>컴포즈 컴파일러는 1.5.7 업그레이드</li><li>모시(Moshi) 1.5.0 업그레이드</li><li>힐트(Hilt) 2.46.1 업그레이드</li></ul><h3>1차 시도</h3><p>[Hilt] Processing did not complete. See error above for details.<br>error: [Hilt]<br> Unsupported metadata version. Check that your Kotlin version is &gt;= 1.0: java.lang.IllegalStateException: Unsupported metadata version. Check that your Kotlin version is &gt;= 1.0</p><p>에러 메시지에 Hilt라고 써 있기도 하고, 코틀린 업그레이드할 때마다 보던 에러 같습니다. 빠르게 찾아서 Hilt를 2.44에서 2.46으로 업그레이드 합니다.</p><p><a href="https://github.com/google/dagger/issues/4035">Hilt incompatible with Kotlin to 1.9 · Issue #4035 · google/dagger</a></p><h3>2차 시도</h3><p>Caused by: com.sun.tools.javac.processing.AnnotationProcessingError: java.lang.IllegalStateException: Could not parse metadata! Try bumping kotlinpoet and/or kotlinx-metadata version.<br>Caused by: com.sun.tools.javac.processing.AnnotationProcessingError: java.lang.IllegalStateException: Could not parse metadata! Try bumping kotlinpoet and/or kotlinx-metadata version.</p><p>at jdk.compiler/com.sun.tools.javac.processing.JavacProcessingEnvironment.callProcessor(Unknown Source)<br> at jdk.compiler/com.sun.tools.javac.processing.JavacProcessingEnvironment.discoverAndRunProcs(Unknown Source)<br> at jdk.compiler/com.sun.tools.javac.processing.JavacProcessingEnvironment$Round.run(Unknown Source)<br> at jdk.compiler/com.sun.tools.javac.processing.JavacProcessingEnvironment.doProcessing(Unknown Source)<br> at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.processAnnotations(Unknown Source)<br> … 47 more<br>Caused by: java.lang.IllegalStateException: Could not parse metadata! Try bumping kotlinpoet and/or kotlinx-metadata version.<br> at com.squareup.moshi.kotlinpoet.metadata.KotlinPoetMetadata.readKotlinClassMetadata(KotlinPoetMetadata.kt:90)<br>Caused by: java.lang.IllegalStateException: Could not parse metadata! Try bumping kotlinpoet and/or kotlinx-metadata version.</p><p>at com.squareup.moshi.kotlinpoet.metadata.KotlinPoetMetadata.toKmClass(KotlinPoetMetadata.kt:119)<br> at com.squareup.moshi.kotlin.codegen.apt.MoshiCachedClassInspector.toKmClass(MoshiCachedClassInspector.kt:41)<br> at com.squareup.moshi.kotlin.codegen.apt.MetadataKt.targetType(metadata.kt:136)<br> at com.squareup.moshi.kotlin.codegen.apt.JsonClassCodegenProcessor.adapterGenerator(JsonClassCodegenProcessor.kt:141)</p><p>이것도 봤던 에러인데 잘 기억이 안 나서 찾아 봅니다. moshi 쪽 문제라서, moshi 버전을 올려보라고 하네요. 1.14.0을 1.15.0으로 올려봅니다.</p><p>그리고나서 로그를 다시 보니 com.squareup.moshi 에서 에러가 났군요…</p><h3>3차 시도</h3><p>e: This version (1.4.0) of the Compose Compiler requires Kotlin version 1.8.0 but you appear to be using Kotlin version 1.9.22 which is not known to be compatible. Please consult the Compose-Kotlin compatibility map located at <a href="https://developer.android.com/jetpack/androidx/releases/compose-kotlin">https://developer.android.com/jetpack/androidx/releases/compose-kotlin</a> to choose a compatible version pair (or `suppressKotlinVersionCompatibilityCheck` but don’t say I didn’t warn you!).</p><p>낯선 에러인데, 에러에 있는 페이지에 가보니 코틀린 버전과 컴포즈 컴파일러 버전을 맞춰야 하는군요. 아직 코틀린 1.9.21용 1.5.7이 최신이고 1.9.22용은 없는데.. 일단 바꿔 봅니다</p><p>composeOptions <strong>{<br> </strong>kotlinCompilerExtensionVersion = “1.5.7”<br><strong>}</strong></p><h3>4차 시도</h3><p>This version (1.5.7) of the Compose Compiler requires Kotlin version 1.9.21 but you appear to be using Kotlin version 1.9.22 which is not known to be compatible. Please consult the Compose-Kotlin compatibility map located at <a href="https://developer.android.com/jetpack/androidx/releases/compose-kotlin">https://developer.android.com/jetpack/androidx/releases/compose-kotlin</a> to choose a compatible version pair (or `suppressKotlinVersionCompatibilityCheck` but don’t say I didn’t warn you!).</p><p>안되네요.. 그럼 코틀린을 1.9.22가 아니라 1.9.21로 해봅니다</p><h3>5차 시도</h3><p>Caused by: com.sun.tools.javac.processing.AnnotationProcessingError: java.lang.NoSuchMethodError: ‘kotlinx.metadata.jvm.KotlinClassMetadata kotlinx.metadata.jvm.KotlinClassMetadata$Companion.read(kotlinx.metadata.jvm.KotlinClassHeader)’<br> at jdk.compiler/com.sun.tools.javac.processing.JavacProcessingEnvironment.callProcessor(Unknown Source)<br> at jdk.compiler/com.sun.tools.javac.processing.JavacProcessingEnvironment.discoverAndRunProcs(Unknown Source)<br> at jdk.compiler/com.sun.tools.javac.processing.JavacProcessingEnvironment$Round.run(Unknown Source)<br> at jdk.compiler/com.sun.tools.javac.processing.JavacProcessingEnvironment.doProcessing(Unknown Source)<br> at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.processAnnotations(Unknown Source)<br> … 39 more<br>Caused by: java.lang.NoSuchMethodError: ‘kotlinx.metadata.jvm.KotlinClassMetadata kotlinx.metadata.jvm.KotlinClassMetadata$Companion.read(kotlinx.metadata.jvm.KotlinClassHeader)’<br> at androidx.room.compiler.processing.javac.kotlin.KotlinMetadataElement$Companion.createFor(KotlinMetadataElement.kt:125)</p><p>로그에는 room에서 발생했지만 검색해보니 <a href="https://github.com/google/dagger/issues/3701">https://github.com/google/dagger/issues/3701</a> Hilt를 2.46.1로 업그레이드 하라고 합니다.</p><p>이렇게 하면 빌드 성공합니다</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5876975fad08" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Resolving R8 Errors in AGP 8.0]]></title>
            <link>https://battleship-park.medium.com/resolving-r8-errors-in-agp-8-0-c5db1488ad4a?source=rss-34945aba7a15------2</link>
            <guid isPermaLink="false">https://medium.com/p/c5db1488ad4a</guid>
            <category><![CDATA[r8]]></category>
            <category><![CDATA[retrofit]]></category>
            <category><![CDATA[agp]]></category>
            <category><![CDATA[android]]></category>
            <category><![CDATA[songs]]></category>
            <dc:creator><![CDATA[BattleShip Park]]></dc:creator>
            <pubDate>Sat, 10 Jun 2023 02:36:56 GMT</pubDate>
            <atom:updated>2023-06-10T02:36:56.166Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*VCQKGv0tkfRVpgty" /><figcaption>Photo by <a href="https://unsplash.com/es/@roseannasmith?utm_source=medium&amp;utm_medium=referral">Roseanna Smith</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Summary: add the R8 rule</p><p>I updated Android Studio and thought everything was fine, but then it crashed.</p><blockquote>Caused by: java.lang.IllegalArgumentException: Call return type must be parameterized as Call&lt;Foo&gt; or Call&lt;? extends Foo&gt;<br> at retrofit2.DefaultCallAdapterFactory.get(SourceFile:42)<br> at retrofit2.Retrofit.nextCallAdapter(SourceFile:253)<br> at retrofit2.Retrofit.callAdapter(SourceFile:237)<br> at retrofit2.HttpServiceMethod.createCallAdapter(SourceFile:114)</blockquote><p>With some exceptions, I can get a pretty good idea of what’s going on just by looking at them, but this one is so unfamiliar and awkward that I can’t quite put my finger on it. However, it happened during execution, and it happened in a binary that was fine up until that point, and then R8 was applied, so R8 is the prime suspect.</p><p>But I didn’t touch Retrofit this time, so why did it suddenly happen? I do some searching, but I don’t have an exact solution. I found a question with the same error message, but it’s not the answer I’m looking for. I decided to dig a little deeper.</p><p>I went into Retrofit repository and saw that there hasn’t been a release since May 20th, which means I don’t need to update something, so I went to the Issues page and saw this.</p><p><a href="https://github.com/square/retrofit/issues/3880">Missing proguard rules for R8/AGP8, please make a 2.9.1 release including the retrofit.pro R8 full mode rules · Issue #3880 · square/retrofit</a></p><p>At first I thought this was completely unrelated, but then I scrolled down a bit further and it said to apply the <a href="https://github.com/square/retrofit/blob/master/retrofit/src/main/resources/META-INF/proguard/retrofit2.pro">R8 rules from here</a>. I haven’t even updated Retrofit, so why do I have to do this all of a sudden?<br>I can’t understand, but it said to try it, so I added this file,</p><p>It doesn’t give me an error 😱</p><p>Before I even have a moment to wonder what the heck is going on, I get another exception. This time, GSON is the problem.</p><blockquote>java.lang.IllegalStateException: TypeToken must be created with a type argument: new TypeToken&lt;…&gt;() {}; When using code shrinkers (ProGuard, R8, …) make sure that generic signatures are preserved.<br> at com.google.gson.reflect.TypeToken.getTypeTokenTypeArgument(SourceFile:100)<br> at com.google.gson.reflect.TypeToken.&lt;init&gt;(SourceFile:70)</blockquote><p>The exception message is kind enough to tell me to check R8. So let’s go straight to GSON repository this time. There’s something on the Troubleshooting page, and it isolated the rule as shown below.</p><p><a href="https://github.com/google/gson/blob/main/gson/src/main/resources/META-INF/proguard/gson.pro">gson/gson.pro at main · google/gson</a></p><p>I didn’t have gson in my R8 rules before, but they added something this time. Anyway, when I add this, the problem went away and it ran fine.</p><h3>Why?</h3><p>I suspected R8 from the beginning, but I wondered why the problem was happening when I hadn’t updated anything, whether Retrofit or gson. It was after updating Android Studio and AGP, so I went over there and found this: <a href="https://developer.android.com/build/releases/gradle-plugin#default-changes">https://developer.android.com/build/releases/gradle-plugin#default-changes</a></p><p>There is a behavior change from AGP 8.0, and the description of android.enableR8.fullMode is as follows:</p><blockquote>AGP 8.0 enables R8 full mode by default. for more details, see <a href="https://r8.googlesource.com/r8/+/refs/heads/master/compatibility-faq.md#r8-full-mode">R8 full mode</a>.</blockquote><p>Full mode… something smells. let’s dive into it</p><p><a href="https://r8.googlesource.com/r8/+/refs/heads/master/compatibility-faq.md#r8-full-mode">R8 FAQ</a></p><p>R8 was running in compatibility mode with ProGuard. I think I read about that when R8 first came out, but I forgot it. As of AGP 8.0, it’s not compatibility mode by default, it’s full mode, and it’s optimizing more aggressively. So suddenly you have to write more detailed R8 rules.</p><p>I already found the rule above and solved all the problems, but when I looked at the R8 FAQ document, it summarized the problems with Retrofits and gson. I feel like I lost something 😭</p><p>Thanks for reading</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c5db1488ad4a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[AGP 8.0의 R8 오류 해결]]></title>
            <link>https://battleship-park.medium.com/agp-8-0%EC%9D%98-r8-%EC%98%A4%EB%A5%98-%ED%95%B4%EA%B2%B0-ebb66aa15243?source=rss-34945aba7a15------2</link>
            <guid isPermaLink="false">https://medium.com/p/ebb66aa15243</guid>
            <category><![CDATA[songs]]></category>
            <category><![CDATA[r8]]></category>
            <category><![CDATA[agp]]></category>
            <category><![CDATA[retrofit]]></category>
            <category><![CDATA[android]]></category>
            <dc:creator><![CDATA[BattleShip Park]]></dc:creator>
            <pubDate>Sat, 10 Jun 2023 02:14:21 GMT</pubDate>
            <atom:updated>2023-06-10T02:14:21.781Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*VCQKGv0tkfRVpgty" /><figcaption>Photo by <a href="https://unsplash.com/es/@roseannasmith?utm_source=medium&amp;utm_medium=referral">Roseanna Smith</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>요약: R8 규칙을 추가하자</p><p>안드로이드 스튜디오를 업데이트 하면서 왠일로 아무 문제가 없나.. 싶었으나, 실행중에 크래시가 발생합니다.</p><blockquote>Caused by: java.lang.IllegalArgumentException: Call return type must be parameterized as Call&lt;Foo&gt; or Call&lt;? extends Foo&gt;<br> at retrofit2.DefaultCallAdapterFactory.get(SourceFile:42)<br> at retrofit2.Retrofit.nextCallAdapter(SourceFile:253)<br> at retrofit2.Retrofit.callAdapter(SourceFile:237)<br> at retrofit2.HttpServiceMethod.createCallAdapter(SourceFile:114)</blockquote><p>왠만한 예외는 보기만 해도 어느 정도 원인을 알 수 있었는데, 이번 예외는 너무나 생소하고 어색해서 도저히 감을 잡을 수가 없습니다. 다만, 실행 중에 발생했고, 그 전까지는 괜찮다가 R8을 적용한 바이너리에서 발생했으므로, R8이 유력한 용의자가 되겠습니다.</p><p>그런데 이번에 레트로핏은 전혀 건드린 부분이 없는데, 왜 갑자기 문제가 발생했을까.. 라는 궁금증을 품은 채 검색을 해보는데, 정확한 해결책이 없네요. 동일한 에러 메시지의 질문은 있는데 원하는 답변이 아닙니다. 차근차근 찾아 보기로 합니다.</p><p>레트로핏 저장소에 들어가 보니 20년 5월 이후로 출시가 없습니다. 뭔가 업데이트를 해야 하는데 놓친게 있지는 않다는건데, 혹시나 하고 Issue 쪽을 살펴보니 이런게 있습니다.</p><p><a href="https://github.com/square/retrofit/issues/3880">Missing proguard rules for R8/AGP8, please make a 2.9.1 release including the retrofit.pro R8 full mode rules · Issue #3880 · square/retrofit</a></p><p>처음에는 전혀 상관없는 얘기인가 보다 했는데, 좀 더 내려보니 <a href="https://github.com/square/retrofit/blob/master/retrofit/src/main/resources/META-INF/proguard/retrofit2.pro">여기</a>에 있는 R8 규칙을 가하라고 합니다. 아니 나는 레트로핏을 업데이트한 것도 아닌데 왜 이걸 갑자기 해야하지?</p><p>이해는 안 가지만, 해보라고 하니 이 파일을 추가해 봤는데,</p><p>에러가 안 난다? <a href="https://emojipedia.org/face-screaming-in-fear/">😱</a></p><p>이게 대체 무슨 일인가 하는 당황스럽고 황당한 마음을 가질새도 없이, 바로 다른 예외가 발생합니다. 이번에는 gson이 문제입니다.</p><blockquote>java.lang.IllegalStateException: TypeToken must be created with a type argument: new TypeToken&lt;…&gt;() {}; When using code shrinkers (ProGuard, R8, …) make sure that generic signatures are preserved.<br> at com.google.gson.reflect.TypeToken.getTypeTokenTypeArgument(SourceFile:100)<br> at com.google.gson.reflect.TypeToken.&lt;init&gt;(SourceFile:70)</blockquote><p>친절하게도 예외 메시지가 R8을 확인해 보라고 안내까지 해주고 있네요.</p><p>그럼 이번에는 바로 gson 저장소로 들어가 봅니다. Troubleshooting 쪽에 관련 내용이 있는데 따라가 보니 아래와 같이 규칙을 분리해 놨습니다.</p><p><a href="https://github.com/google/gson/blob/main/gson/src/main/resources/META-INF/proguard/gson.pro">gson/gson.pro at main · google/gson</a></p><p>이전에 R8 규칙에는 gson이 없었는데, 이번에 뭔가 내용이 많이 늘었네요. 여하튼 이 내용을 추가해주니 문제가 사라지고 잘 실행됩니다.</p><h3>대체 왜?</h3><p>처음부터 R8이 의심되기는 했지만, 레트로핏이든 gson이든 업데이트한게 없는데 대체 왜 문제가 발생하는지 궁금했습니다. 역시나 안드로이드 스튜디오와 AGP를 업데이트하고 나서 생긴 문제이므로, 바로 그 쪽으로 확인해 보니 이런 내용이 있습니다. <a href="https://developer.android.com/build/releases/gradle-plugin#default-changes">https://developer.android.com/build/releases/gradle-plugin#default-changes</a></p><p>AGP 8.0부터 동작이 바뀌는게 있는데 그 중에 android.enableR8.fullMode 의 설명은 다음과 같습니다: AGP 8.0 enables R8 full mode by default. For more details, see <a href="https://r8.googlesource.com/r8/+/refs/heads/master/compatibility-faq.md#r8-full-mode">R8 full mode</a>. full mode라.. 뭔가 냄새가 나는군요. 자세히 들어가 보겠습니다</p><p><a href="https://r8.googlesource.com/r8/+/refs/heads/master/compatibility-faq.md#r8-full-mode">R8 FAQ</a></p><p>R8이 프로가드와 호환모드로 동작하고 있었던 것입니다. 처음에 R8이 나올 때 그런 얘기 봤던 것 같은데 잊고 있었네요. 그러나 AGP 8.0부터는 기본적으로 호환모드가 아니고 full mode로 동작하는 것이고, 더욱 공격적으로 최적화를 하게 됩니다. 그래서 갑자기 R8 규칙을 더 자세하게 작성해 줘야 했던거군요.</p><p>이미 위에서 규칙을 찾아 놔서 문제는 다 해결했지만, R8 FAQ 문서를 보니 레트로핏, gson에서 발생하는 문제를 정리해 놨네요.. 왠지 손해본 것 같은 느낌 😭</p><p>읽어 주셔서 감사합니다</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ebb66aa15243" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Firebase의 Flutter SDK에 관한 새로운 소식 (GoogleIO 2023 요약)]]></title>
            <link>https://battleship-park.medium.com/firebase%EC%9D%98-flutter-sdk%EC%97%90-%EA%B4%80%ED%95%9C-%EC%83%88%EB%A1%9C%EC%9A%B4-%EC%86%8C%EC%8B%9D-googleio-2013-%EC%9A%94%EC%95%BD-da7703a55c11?source=rss-34945aba7a15------2</link>
            <guid isPermaLink="false">https://medium.com/p/da7703a55c11</guid>
            <category><![CDATA[flutter]]></category>
            <category><![CDATA[firebase]]></category>
            <category><![CDATA[googleio]]></category>
            <category><![CDATA[google-io-2023]]></category>
            <dc:creator><![CDATA[BattleShip Park]]></dc:creator>
            <pubDate>Mon, 22 May 2023 11:54:54 GMT</pubDate>
            <atom:updated>2023-05-22T12:00:51.487Z</atom:updated>
            <content:encoded><![CDATA[<iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FPsV-wSZ2BCo&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DPsV-wSZ2BCo&amp;image=http%3A%2F%2Fi.ytimg.com%2Fvi%2FPsV-wSZ2BCo%2Fhqdefault.jpg&amp;key=d04bfffea46d4aeda930ec88cc64b87c&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/57ae6bba0e9d623b9417f4f4379a77e8/href">https://medium.com/media/57ae6bba0e9d623b9417f4f4379a77e8/href</a></iframe><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fTAz0pT9XZ6D1emchmFUFg.png" /></figure><p>파이어베이스 관련해서 어떤 새로운 소식이 있는지 알아 봅시다</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uFLwG7qwqDZ9WjGhPINdBQ.png" /></figure><p>앱 개발을 하다 보면 각 단계별로 고민해야 할게 많습니다. 백엔드는 어찌할지, 데이터를 어디에 저장할지, 사용자 인증은 어찌할지, 크래시 모니터링은 어찌할지 등등에 대한 선택지가 많습니다.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UWXqouhro3LVsEPwnAFBsg.png" /></figure><p>그래서 파이어베이스가 있는거죠! 빌드, 출시, 운영에 있어 다양한 제품을 제공해 줍니다.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ef4iY2kIIgbCl1HTOHVGtw.png" /></figure><p>파이어베이스용 플러터SDK의 새로운 기능을 보기 전에, 작년 구글IO 이후 개선한 것들 중에 몇 가지 중요한 것을 보겠습니다.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xtl0xatxvWDStJAJmJOb9A.png" /></figure><p>공식 문서를 추가했습니다. 코드 예제도 많고, 파이어베이스 콘솔에서의 설명도 많아서 플러터 앱에 파이어베이스를 쉽게 추가할 수 있습니다.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8psh6E5TGkb_p8-eaC77Kg.png" /></figure><p>크래시리틱스에 큰 개선이 있었습니다.</p><p>설치 단계를 간소화해서, 크래시리틱스 플러그인을 추가하고, 다트에서 초기화하기만 하면 됩니다.</p><p>플러터 크래시를 더욱 직관적으로 그룹화해서 크래시에 대한 이해가 쉬워졌습니다.</p><p>온디멘드로 심각한 에러를 지정할 수 있다는데, 이건 무슨 말인지 잘 모르겠습니다.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mMFoXJ56PhKMPFuGUJOW4w.png" /></figure><p>릴리스용 빌드 옵션을 추가했고, 앱크기를 획기적으로 줄일 수 있습니다.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Kv3gHvh7T0rBAmDNRXib-g.png" /></figure><p>스택트레이스에서의 심볼 표시가 개선되어서, 어떤 문제인지 쉽게 알 수 있게 되었습니다.이전 상태는 뭔가 기능을 제공한다는게 의미없을 정도로 알아 볼 수 없네요 -0-;;;</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*R6tYveIzWnCm2Se6Z501hQ.png" /></figure><p>다중 인증도 지원합니다.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*z2EqnuZ2dKCK46EUIKb5pA.png" /></figure><p>파이어스토어 데이터의 로컬 캐시에서도 쿼리할 때 인덱스를 사용할 수 있습니다. 오프라인 상태일때도 쿼리가 빠르게 동작합니다. 파이어베이스CLI에서 인덱스 정의를 내보내기하고, 그걸 앱 시작할 때 플러터SDK에 가져오기 하면 바로 동작을 확인할 수 있습니다.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VTwtbX3TjhgzAcYQ5Cu2ww.png" /></figure><p>마지막으로, flutterfire update 명령어 하나로 모든 파이어베이스 의존성을 최신 버전으로 갱신할 수 있습니다.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yWIecFjQqkDREvuv180avQ.png" /></figure><p>이제 지금까지 작업했던 내용에 대한 소개는 끝내고, 그 이후로 작업한 내용에 대해 소개드리겠습니다.</p><p>파이어베이스 플러터 SDK가 안드로이드, iOS, web SDK에 대해 feature parity를 가지게 되었습니다.</p><p>이 영상에서는 추가로 설명하지 않아서 따로 찾아 봤는데, feature parity란 제품의 여러 플랫폼 또는 시스템에 걸친 기능의 일관성이라고 합니다. 즉 그 동안은 각 플랫폼 별로 지원하는 기능이 달랐는데, 이제는 동일하게 지원한다는 의미인 것 같습니다. (parity를 동위, 동등이라고 해석하면 너무 딱딱해서 그냥 기능 패리티로 하겠습니다)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5ufVOMhbrohB_C5xn-OQPg.png" /></figure><p>위 그림에 있는 루프처럼, 코드 작성, 컴파일, 빌드, 테스트, 배포를 빠르게 반복할 수록 더 빠르게 프로덕션 환경에 진입할 수 있습니다. 그리고 핫 리로드와 핫 리스타트를 사용하는 플러터 개발자만큼 이런 내용을 잘 아는 사람은 없겠죠? 이런 루프는 에뮬레이터나 웹 브라우져가 필요없는 데스크탑 환경에서 더 빠릅니다. 다만 윈도우즈에서는 파이어베이스를 사용하면 이런 장점을 누릴 수 없었습니다. 그러나,</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TP6zttruMbL-ooc8k1TLfw.png" /></figure><p>윈도우즈에서도 파이어베이스 지원을 시작했습니다. 아직 프로덕션 용으로는 준비되지 않아서, 개발용으로만 사용하기를 추천합니다.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Cc65lDjm-HVJcgplVUMwbw.png" /></figure><p>파이어베이스는 C++과 유니티용 SDK가 있는데, 데스크탑에 대해서도 일부 기능을 지원합니다. C++ SDK의 기능을 더 확장해서 데스크탑의 지원을 강화하려고 합니다. 그리고 나서 그걸 플러터 플러그인으로 감쌀 예정입니다.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YmKgbpI4r-eIrCotWajleg.png" /></figure><p>열정적인 플러터 개발자들이 얼마나 많은지 잘 알고 있습니다. 이런 환상적인 플러터 커뮤니티 덕분에, 파이어베이스 SDK의 순수 다트 구현체를 초기 실험 버전으로 가지고 있는 FirebaseExtended 라는 저장소가 있습니다. 어떤 사람의 기여든 환영합니다.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nfhLv5_kFSCN7cV4Cglo2g.png" /></figure><p>작년 한 해 동안 우리는 여러분이 개선된 크래시리틱스와 플러터 통합으로 크래시와 이슈에 빠르게 대응할 수 있도록 개선했습니다. 또한 다중 인증 등으로 사용자를 보호하게 했습니다.</p><p>올해는, 최근에 기능 패리티를 달성했고, 더 많은 문서와 예제를 제공했으며, 윈도우즈 데스크탑 지원을 시작했습니다.</p><p>지금까지 읽어 주셔서 감사합니다</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=da7703a55c11" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What’s New with Dart and Flutter (GoogleIO 2023 Recap)]]></title>
            <link>https://battleship-park.medium.com/whats-new-with-dart-and-flutter-googleio-2023-recap-2cd21b8a98ab?source=rss-34945aba7a15------2</link>
            <guid isPermaLink="false">https://medium.com/p/2cd21b8a98ab</guid>
            <category><![CDATA[googleio]]></category>
            <category><![CDATA[flutter]]></category>
            <category><![CDATA[google-io-2023]]></category>
            <category><![CDATA[dart]]></category>
            <dc:creator><![CDATA[BattleShip Park]]></dc:creator>
            <pubDate>Mon, 15 May 2023 08:56:17 GMT</pubDate>
            <atom:updated>2023-05-15T08:56:17.493Z</atom:updated>
            <content:encoded><![CDATA[<iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FyRlwOdCK7Ho%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DyRlwOdCK7Ho&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FyRlwOdCK7Ho%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/e10338cb93fe430d0d48c353470d5f26/href">https://medium.com/media/e10338cb93fe430d0d48c353470d5f26/href</a></iframe><h3>Flutter 3.10</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pW6GyUa_Iqo1EsPU4lSeNQ.png" /></figure><p>Flutter 3.10 has been released. The big changes are:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hVoq2KrNQ_ZnMAJDDXOgig.png" /></figure><p>1. support for Material 3</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CDa0vs8E4d1Eq5tW9UwRuQ.png" /></figure><p>2. improved iOS/macOS support</p><h3>Dart 3</h3><p>A stable version of Dart 3 has been released.</p><ol><li>Sound null safety<br>All code in Dart3 is said to be null safe. And 99% of the top 1000 packages on pub.dev already support Dart3.</li><li>Pattern<br>Pattern matching has been introduced. I thought so, but it’s very interesting to see the details:</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4zTEPRgZYaEiF7-UifxOZA.png" /></figure><p>(1) structuring/destructuring: I thought they were bragging about above, but,</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ocaJhWGxkQ9essKaWmrg-Q.png" /></figure><p>(2) Pattern matching</p><p>Look at the pattern matching inside calculateArea()…</p><ul><li>You can separate instances by class name for Square, Circle</li><li>You can use constructor parameters to pass in values.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tJ693PhU9fjdQcIU6DfA-w.png" /></figure><p>Similarly, here’s an example to print the difference from the current date. In my work, I often need to output like today, yesterday, a few days ago, and so on. Pattern matching makes it look pretty.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aO1yNZZTOAtZLOwSEaJxwQ.png" /></figure><p>3. Add class modifiers</p><p>I’m also surprised that interface and final didn’t exist until now. Additionally, sealed was added, although it’s not in this shot.</p><h3>DevTools</h3><p>The memory usage has gotten better. The trace viewer does too because it switched to a completely open source one called Perfetto.<br>Screenshots have been added to search results to make it easier to see what’s available in pub.dev, and hashtags have been added to package descriptions.<br>I personally don’t find this part fun, so I’m skipping it.</p><h3>Painting the orb</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YWQZSELLUZetk162s9XCkQ.png" /></figure><p>In the screenshot above, it doesn’t move, but the dust in the center is rotating and getting bigger and smaller, which is made by shaders directly on the web.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1TDG55Zt1-sb_a3WGMUU2g.png" /></figure><p>Basically, they all use the Flutter Widget and allow you to plug in shaders. You can plug in a shader from Painter, like in the snippet above.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EMs4zDxzenvKLhJg8qNpKw.png" /></figure><p>You can put in the shader code from GLSL like this. I’ve left out the code to read the shaders from the asset, etc.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8dxpsaqMn68tslw-3NBfWg.png" /></figure><p>If you go to GitHub, you can see the fragment shader code that is used in the Material design. I’m sure there are tons of shader craftsmen around the world, and I can’t wait to see what amazing graphics they come up with.</p><h3>Gamut images</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zfj-8YnUoJh6WZK52l67fw.png" /></figure><p>The Display P3 color space is now available on iOS.</p><h3>Impeller</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6t4G-xSWew5YRAt1mpLlow.png" /></figure><p>Rendering is located in the Engine layer of the Flutter flamework. Up until now, they’ve been using Skia here, but they’ve developed something called Impeller to replace it. It’s out of the box on iOS and a preview is coming soon on Android. They say they’ve fixed animation stuttering and stuff like that, but I don’t really understand it, so I’ll have to watch another video to learn more.</p><h3>Web</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9dsrDrtUa0ohtMj3Oq72JQ.png" /></figure><ol><li>Canvaskit Sizing<br>Canvaskit is the largest component of the Flutter web app, and in Flutter 3.10, it has been reduced by 1/3 compared to 3.7.</li><li>Reduced font size<br>Reduce font file size by removing unused icons from large font files through static analysis during compilation.</li><li>Embedding<br>Flutter components can be embedded into existing web apps.</li></ol><p>I have another video for the web stuff, so I’ll cover it there.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zmyYfr3GmmHeS-bONsKVYA.png" /></figure><p>The type was not correct when using JavaScript objects, now you can use them as static types.</p><h3>Mobile &amp; Desktop</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yX3RIjdPc1xJPDP4Bk0gWQ.png" /></figure><p>Until now, if you wanted to use Google Native Ads, you had to write the platform code as well as the dart, but we improved the plugin so that you can use the dart code</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ApbERw7--jQV3VIgoEvsBw.png" /></figure><p>If you want to use push, payment, etc. in your mobile app, you had to use platform code. To develop a plugin that provides these features, you need a lot of platform-specific code as well as dart code. They introduced JNIGen, which generates dart binding code for Android APIs in Java or Kotlin.</p><p>WASM, WebAssembly, can be thought of as a similar concept to flutter in the sense that one piece of code can run in multiple web browsers. WASM didn’t support GC, but GC has recently entered the standard specification. It’s still experimental, but if you change the flags in Chrome (chrome://flags), you are able to run web apps with WASM support.</p><p>Thanks for reading.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2cd21b8a98ab" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Dart 및 Flutter에 관한 새로운 소식 (GoogleIO 2023 요약)]]></title>
            <link>https://battleship-park.medium.com/dart-%EB%B0%8F-flutter%EC%97%90-%EA%B4%80%ED%95%9C-%EC%83%88%EB%A1%9C%EC%9A%B4-%EC%86%8C%EC%8B%9D-googleio-2023-%EC%9A%94%EC%95%BD-702856c5b931?source=rss-34945aba7a15------2</link>
            <guid isPermaLink="false">https://medium.com/p/702856c5b931</guid>
            <category><![CDATA[google-io-2023]]></category>
            <category><![CDATA[flutter]]></category>
            <category><![CDATA[googleio]]></category>
            <category><![CDATA[dart]]></category>
            <dc:creator><![CDATA[BattleShip Park]]></dc:creator>
            <pubDate>Thu, 11 May 2023 09:57:05 GMT</pubDate>
            <atom:updated>2023-05-11T10:00:50.921Z</atom:updated>
            <content:encoded><![CDATA[<iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FyRlwOdCK7Ho%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DyRlwOdCK7Ho&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FyRlwOdCK7Ho%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/e10338cb93fe430d0d48c353470d5f26/href">https://medium.com/media/e10338cb93fe430d0d48c353470d5f26/href</a></iframe><h3>플러터 3.10</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pW6GyUa_Iqo1EsPU4lSeNQ.png" /></figure><p>플러터 3.10이 출시됐습니다. 큰 변경 사항으로는</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hVoq2KrNQ_ZnMAJDDXOgig.png" /></figure><p>1. 매트리얼3를 지원합니다.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CDa0vs8E4d1Eq5tW9UwRuQ.png" /></figure><p>2. iOS/macOS 지원이 강화됐습니다</p><h3>Dart 3</h3><p>다트3의 안정 버전이 출시되었습니다.</p><p>1. sound null safety</p><p>(타당한/유효한 널 안정성, 이라고 해석할 수 있겠지만 조금 의역한다면 널 안정성 보장, 이라고 해도 되지 않을까요) 다트3의 모든 코드가 널 안정성을 보장한다고 합니다. 게다가 pub.dev의 상위 1000개 패키지중 99%가 이미 다트3를 지원하고 있다고 하네요</p><p>2. pattern</p><p>패턴 매칭이 도입됐네요. 그런가보다 했는데 자세히 내용을 보니 아주 재미있습니다.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4zTEPRgZYaEiF7-UifxOZA.png" /></figure><p>(1) structuring/destructuring: 이 정도의 조립/분해 기능으로 자랑을 하는건가 싶었는데</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ocaJhWGxkQ9essKaWmrg-Q.png" /></figure><p>calculateArea() 안에서 패턴 매칭하는거 보세요…</p><p>1) Square, Circle의 클래스명으로 인스턴스 구분하고</p><p>2) 생성자 파라미터를 사용해서 값을 전달받을 수 있음</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tJ693PhU9fjdQcIU6DfA-w.png" /></figure><p>비슷하게 현재 날짜와의 차이를 출력하는 예제입니다. 일하다 보면 오늘, 어제, 몇 일 전, 이렇게 출력해야 하는 경우 많죠. 패턴 매칭으로 이렇게 예쁘게 만들 수 있었네요</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aO1yNZZTOAtZLOwSEaJxwQ.png" /></figure><p>3. 클래스 수식어(modifier) 추가</p><p>base는 생소하지만 interface, final은 이제 생겼다는 것도 놀랍네요. 추가로 이 스샷에는 없지만 sealed도 추가되었습니다.</p><h3>DevTools</h3><p>메모리 사용량도 잘 볼 수 있게 좋아졌고, Trace Viewer도 Perfetto라는 오픈소스로 완전히 갈아치워서 좋아졌습니다.</p><p>pub.dev에서 무슨 기능인지 쉽게 알 수 있게 검색 결과에 스크린샷을 함께 노출했고, 패키지 설명에 해시태그가 추가됐습니다.</p><p>이 부분은 개인적으로는 재미가 없어서 생략합니다.</p><h3>Painting the orb</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YWQZSELLUZetk162s9XCkQ.png" /></figure><p>위에 스샷에서는 움직이지 않지만 가운데 먼지 같은게 회전하면서 커졌다 작아졌다 하는데요, 이게 웹에서 쉐이더를 직접 사용한거라고 합니다.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1TDG55Zt1-sb_a3WGMUU2g.png" /></figure><p>기본적으로는 모두 플러터 위젯을 사용하고, 쉐이더를 연결할 수 있는 방식입니다. 위에 스샷처럼 페인터에서 쉐이더를 연결하고</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EMs4zDxzenvKLhJg8qNpKw.png" /></figure><p>이런 GLSL의 쉐이더 코드를 넣어 놓으면 됩니다. 쉐이더를 어셋에서 읽는 코드 등은 생략했습니다.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8dxpsaqMn68tslw-3NBfWg.png" /></figure><p>깃헙에 가보면 매트리얼 디자인에서 사용한 프래그먼트 쉐이더 코드를 볼 수 있습니다. 전 세계에 쉐이더 장인이 엄청 많을텐데, 앞으로 어떤 기가 막힌 그래픽이 나올지 기대가 되네요.</p><h3>Gamut images</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zfj-8YnUoJh6WZK52l67fw.png" /></figure><p>iOS에서 Display P3 색공간을 사용할 수 있게 됐습니다.</p><h3>Impeller</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6t4G-xSWew5YRAt1mpLlow.png" /></figure><p>플러터 플레임워크의 Engine 레이어에 Rendering이 있습니다. 지금까지는 여기서 Skia를 사용하고 있었는데, 이걸 대체하기 위해 Impeller라는 것을 개발했나 봅니다. iOS에서는 바로 사용할 수 있고 안드로이드에서는 곧 프리뷰가 나옵니다. 애니메이션 버벅임 문제 등을 해결했다고 하는데, 잘 이해는 안 가서.. 자세한 내용은 다른 영상이 있다고 하니 그것으로 공부해야 할 것 같습니다.</p><h3>Web</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9dsrDrtUa0ohtMj3Oq72JQ.png" /></figure><ol><li>Canvaskit 크기</li></ol><p>플러터 웹앱의 컴포넌트 중에 가장 큰게 Canvaskit인데, 플러터 3.10에서는 3.7대비 1/3로 줄였습니다.</p><p>2. 폰트 크기 축소</p><p>컴파일 중에 정적 분석을 통해 큰 폰트 파일에서 사용하지 않는 아이콘을 제거해서 폰트 파일 크기를 줄입니다.</p><p>3. 임베딩</p><p>기존 웹앱에 플러터 컴포넌트를 끼워 넣을 수 있습니다.</p><p>웹 관련 내용들은 다른 영상이 있다고 하니 거기서 다시 자세히보겠습니다.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zmyYfr3GmmHeS-bONsKVYA.png" /></figure><p>자바스크립트 객체를 사용할 때 타입이 정확하지 않았는데, 이제 정적 타입으로 사용할 수 있습니다.</p><h3>Mobile &amp; Desktop</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yX3RIjdPc1xJPDP4Bk0gWQ.png" /></figure><p>1. 지금까지 Google Native Ads를 사용하려면 다트 뿐만 아니라 플랫폼 코드도 따로 작성했어야 하는데, 플러그인을 개선해서 플랫폼 코드 없이 다트 코드로만 사용할 수 있게 됐습니다.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ApbERw7--jQV3VIgoEvsBw.png" /></figure><p>2. 모바일 앱에서 푸시, 결제 등을 사용하려면 플랫폼 코드를 사용할 수 밖에 없습니다. 이런 기능을 제공해 주는 플러그인을 개발하려면 다트 코드 뿐만 아니라 많은 플랫폼 전용 코드가 필요합니다. 새롭게 JNIGen이라는 것을 도입해서 자바나 코틀린으로 된 안드로이드 API를 위한 다트 바인딩 코드를 생성해 줍니다.</p><p>3. WASM(와이즘 이라고 읽네요), WebAssembly는 하나의 코드로 여러 웹브라우저에서 실행할 수 있다는 의미에서 플러터와 유사한 개념으로 생각할 수 있습니다. WASM은 GC를 지원하지 않았는데, 최근에 GC가 표준 스펙으로 들어갔다고 합니다. 아직 실험 버전이지만, 크롬에서 플래그를 변경해 주면(chrome://flags) WASM을 지원하는 웹앱을 실행해 볼 수 있습니다.</p><p>읽어 주셔서 감사합니다.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=702856c5b931" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[epoxy에서 R2 사용을 제거하다]]></title>
            <link>https://battleship-park.medium.com/epoxy%EC%97%90%EC%84%9C-r2-%EC%82%AC%EC%9A%A9%EC%9D%84-%EC%A0%9C%EA%B1%B0%ED%95%98%EB%8B%A4-23531c4eee9d?source=rss-34945aba7a15------2</link>
            <guid isPermaLink="false">https://medium.com/p/23531c4eee9d</guid>
            <category><![CDATA[android-app-development]]></category>
            <category><![CDATA[butterknife]]></category>
            <category><![CDATA[epoxy]]></category>
            <category><![CDATA[gradle]]></category>
            <category><![CDATA[androiddev]]></category>
            <dc:creator><![CDATA[BattleShip Park]]></dc:creator>
            <pubDate>Fri, 06 Jan 2023 11:39:43 GMT</pubDate>
            <atom:updated>2023-01-06T11:39:43.560Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*LzAJRtjSGNzX-iVN" /><figcaption>Photo by <a href="https://unsplash.com/@craft_ear?utm_source=medium&amp;utm_medium=referral">Jan Tinneberg</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>오랫만에 안드로이드 스튜디오 업그레이드를 합니다. 사실 업그레이드해서 크게 도움되는 것도 없는데, 베타 버전도 아니고 스테이블 버전 조차 최신 버전으로 사용해 주지 않으면 너무 시대에 뒤쳐지는 기분이 듭니다.</p><p>설마 오늘은 무슨 일이 생길까.. 싶지만 슬픈 예감은 틀린적이 없습니다.</p><blockquote>EpoxyProcessorException: parse EpoxyDataBindingLayouts failed</blockquote><p>처음에 이 에러 메시지를 봤을 때는 무슨 내용인지 알 수 없었으나 EpoxyDataBindingLayouts를 검색해 보니 다음과 같은 코드가 나왔습니다.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/870/1*lJTGRq-yZC7naJhPimA4YA.png" /></figure><p>EpoxyDataBindingLayouts은 epoxy에서 데이터바인딩과의 연결을 도와주는 어노테이션입니다. 레이아웃을 지정해 주면 거기에 맞는 모델 클래스를 생성해 줍니다. 그런데 코드를 보면 R2 클래스를 찾지 못하고 있어서 더 이상 빌드가 안 되고 있다는 것을 알 수 있습니다.</p><p>참고로 왜 R2 냐 R의 오타 아니냐, 라고 생각하실 수 있습니다. 해당 코드는 앱 모듈이 아니라 라이브러리 모듈이고, 라이브러리 모듈에서는 어노테이션의 파라미터로 R 클래스의 값을 넘길 수가 없습니다. 그래서 버터나이프의 플러그인을 사용하여 R2 클래스를 생성하고, 이걸 어노테이션에 사용하고 있습니다.</p><p>(응? 버터나이프를 모르신다고요? findViewById()로 뷰 찾지 않고 어노테이션만으로 뷰를 연결해 주는 최신 라이브러리 모르세요? 이거 사용하면 얼마나 편한데. 아니 이걸 모르고 지금까지 어떻게 UI 개발을 했어요?)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/476/0*QLK0GIbcf_C4a-5J" /></figure><p>혹시 R 클래스의 값은 왜 어노테이션의 파라미터로 사용할 수 없는지, R2에서는 어떻게 해결을 했는지 궁금하시다면 <a href="https://battleshippark.wordpress.com/2018/02/12/%eb%b2%84%ed%84%b0%eb%82%98%ec%9d%b4%ed%94%84-%eb%9d%bc%ec%9d%b4%eb%b8%8c%eb%9f%ac%eb%a6%ac-%ed%94%84%eb%a1%9c%ec%a0%9d%ed%8a%b8-r2-final/">여기</a>를 참고해 주세요</p><p>그런데 왜 갑자기 R2 생성이 안 될까 싶어서 찾아보니, 버터나이프의 <a href="https://github.com/JakeWharton/butterknife/issues/1673">이슈</a>에 그레이들 7.3.3부터 R2가 생성되지 않는다는 내용이 있습니다. 버터나이프는 deprecated 된지 오래되서 이 문제가 해결될 것 같지는 않습니다. 결국 R2 없이 해결할 수 있는 방법을 찾아야 합니다.</p><p>epoxy에서 데이터바인딩을 지원하는 방법이 하나 더 있는데, 레이아웃 파일을 직접 지정하는게 아니라 패턴매칭을 사용하는 것입니다.</p><pre>@EpoxyDataBindingPattern(rClass = R.class, layoutPrefix = &quot;view_holder&quot;)<br>package com.example.package;</pre><p>이렇게 하면 view_holder로 시작하는 레이아웃 파일로 모델 생성을 해줍니다. 다만 이 경우에 view_holder_list_item.xml에서 ListItemBindingModel_ 이 생성되므로 이름을 잘 맞춰서 넣어줘야 겠습니다.</p><p>작업할 때는 힘들었는데, 정리하고 보니 별거 아닌 것처럼 보일까요</p><p>읽어 주셔서 감사합니다.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=23531c4eee9d" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>