http://www.jsonschema2pojo.org/


JSON 타입의 데이터를 pojo(Plain Old Java Object)로 변환해주는 사이트

패키지명 및 클래스명을 입력한 후 생성하고 싶은 코드 설정을 한 다음 입력창 아래의 Preview를 클릭하여 사용할 수 있다.


http://json2csharp.rohitl.com/ - 잘 안되는 느낌

http://json2csharp.com/ - 얘가 그나마

https://quicktype.io/ - 엄청난데?

C# 버전도 존재한다!!

이유는 모르겠으나..

Error:Cannot fit requested classes in a single dex file. Try supplying a main-dex list. # methods: 74362 > 65536

오류가 발생했습니다.


구글링 끝에 아래와 같이 조치법을 찾아 공유합니다.


1. Build.gradle(Module:app)에 multiDexEnabled true 값 추가

apply plugin: 'com.android.application'

android {
    compileSdkVersion 25
    buildToolsVersion '27.0.3'
    defaultConfig {
        applicationId "com.app.test"
        minSdkVersion 15
        targetSdkVersion 25
        multiDexEnabled true
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}


2. dependencies 에 의존성 추가

dependencies {

    implementation fileTree(include: ['*.jar'], dir: 'libs')

    implementation 'com.android.support:multidex:1.0.3'

}

* Build Your First Android App in Kotlin

https://codelabs.developers.google.com/codelabs/build-your-first-android-app-kotlin/index.html


* Kotlin 으로 안드로이드 개발 시작하기

https://tech.wanted.co.kr/android/2018/02/23/android-kotlin-dev-1.html


* 레진코믹스가 코틀린으로 간 까닭은?

https://www.slideshare.net/jyte/ss-76157630


* 요기요는 Kotlin을 어떻게 적용했나?

https://rgpkorea.github.io/posts/yogiyo-kotlin/


* LezhinComics는 Kotlin을 어떻게 적용 하고 있을까?

https://www.slideshare.net/myeonginwoo/lezhin-kotlin-jetbrain-82440237

'Android > 링크' 카테고리의 다른 글

[Android] 로그 라이브러리 - Timber  (0) 2018.10.22
[Android] Chrome Custom Tab  (0) 2018.10.18
[Android] Navigation Drawer Android Example  (0) 2018.10.09
[Android] Android SVG to VectorDrawable  (0) 2018.06.22
[Android] retrofit2  (0) 2018.05.17

1. Build APK 실행시 오류 발생

Error:Execution failed for task ':app:transformClassesWithDexForDebug'.

> com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: java.util.concurrent.ExecutionException: com.android.dex.DexException: Multiple dex files define Landroid/support/v13/view/DragAndDropPermissionsCompat;



2. 폭풍 검색

3. Android Studio에서 Terminal 창을 연다(보통 하단에 있음!)

4. 명령어 실행

gradlew app:dependencies


5. 뭔가 버전 충돌이 나는 곳을 찾는다!

+--- com.android.support:appcompat-v7:27.1.1
|    +--- com.android.support:support-annotations:27.1.1
|    +--- com.android.support:support-core-utils:27.1.1
|    |    +--- com.android.support:support-annotations:27.1.1
|    |    \--- com.android.support:support-compat:27.1.1
|    |         +--- com.android.support:support-annotations:27.1.1
|    |         \--- android.arch.lifecycle:runtime:1.1.0
|    |              +--- android.arch.lifecycle:common:1.1.0
|    |              \--- android.arch.core:common:1.1.0
|    +--- com.android.support:support-fragment:27.1.1
|    |    +--- com.android.support:support-compat:27.1.1 (*)
|    |    +--- com.android.support:support-core-ui:27.1.1
|    |    |    +--- com.android.support:support-annotations:27.1.1
|    |    |    +--- com.android.support:support-compat:27.1.1 (*)
|    |    |    \--- com.android.support:support-core-utils:27.1.1 (*)
|    |    +--- com.android.support:support-core-utils:27.1.1 (*)
|    |    +--- com.android.support:support-annotations:27.1.1
|    |    +--- android.arch.lifecycle:livedata-core:1.1.0
|    |    |    +--- android.arch.lifecycle:common:1.1.0
|    |    |    +--- android.arch.core:common:1.1.0
|    |    |    \--- android.arch.core:runtime:1.1.0
|    |    |         \--- android.arch.core:common:1.1.0
|    |    \--- android.arch.lifecycle:viewmodel:1.1.0
|    +--- com.android.support:support-vector-drawable:27.1.1
|    |    +--- com.android.support:support-annotations:27.1.1
|    |    \--- com.android.support:support-compat:27.1.1 (*)
|    \--- com.android.support:animated-vector-drawable:27.1.1
|         +--- com.android.support:support-vector-drawable:27.1.1 (*)
|         \--- com.android.support:support-core-ui:27.1.1 (*)
+--- com.android.support:design:27.1.1
|    +--- com.android.support:support-v4:27.1.1
|    |    +--- com.android.support:support-compat:27.1.1 (*)
|    |    +--- com.android.support:support-media-compat:27.1.1
|    |    |    +--- com.android.support:support-annotations:27.1.1
|    |    |    \--- com.android.support:support-compat:27.1.1 (*)
|    |    +--- com.android.support:support-core-utils:27.1.1 (*)
|    |    +--- com.android.support:support-core-ui:27.1.1 (*)
|    |    \--- com.android.support:support-fragment:27.1.1 (*)
|    +--- com.android.support:appcompat-v7:27.1.1 (*)
|    +--- com.android.support:recyclerview-v7:27.1.1
|    |    +--- com.android.support:support-annotations:27.1.1
|    |    +--- com.android.support:support-compat:27.1.1 (*)
|    |    \--- com.android.support:support-core-ui:27.1.1 (*)
|    \--- com.android.support:transition:27.1.1
|         +--- com.android.support:support-annotations:27.1.1
|         \--- com.android.support:support-compat:27.1.1 (*)
+--- com.android.support:support-emoji:27.1.1
|    \--- com.android.support:support-compat:27.1.1 (*)
+--- com.github.rey5137:material:1.2.4
|    +--- com.android.support:cardview-v7:23.4.0
|    +--- com.android.support:appcompat-v7:23.4.0 -> 27.1.1 (*)
|    \--- com.android.support:recyclerview-v7:23.4.0 -> 27.1.1 (*)
+--- com.afollestad.material-dialogs:core:0.9.4.3
|    +--- com.android.support:support-v13:25.3.1
|    |    +--- com.android.support:support-annotations:25.3.1 -> 27.1.1
|    |    \--- com.android.support:support-v4:25.3.1 -> 27.1.1 (*)
|    +--- com.android.support:appcompat-v7:25.3.1 -> 27.1.1 (*)
|    +--- com.android.support:recyclerview-v7:25.3.1 -> 27.1.1 (*)
|    +--- com.android.support:support-annotations:25.3.1 -> 27.1.1
|    \--- me.zhanghai.android.materialprogressbar:library:1.4.0
|         +--- com.android.support:appcompat-v7:25.3.1 -> 27.1.1 (*)
|         \--- com.android.support:support-annotations:25.3.1 -> 27.1.1
...후략


6.  이곳이 문제가 아닐까 짐작을 해본다.


7. 이렇게 해당 모듈을 제외하고 컴파일 할 수 있도록 build.gradle 파일을 수정한다.

dependencies {
    ....
    compile ('com.afollestad.material-dialogs:core:0.9.4.3') {
        exclude module: 'support-v13'
    }
}


8. Build APK 해보니, 된다!

+ Recent posts