세상사는 이야기 / 도움이 되었다면 배너 클릭 부탁드려요~ →→→

레이블이 Android인 게시물을 표시합니다. 모든 게시물 표시
레이블이 Android인 게시물을 표시합니다. 모든 게시물 표시

2021년 8월 26일 목요일

Google Play Game Service 연결

Google Play Game Service 연결

Google Play Game Service 로그인을 위해 사용자 인증 정보 추가를 설명한다.


1. Play 게임 서비스 설정

1-1. "Play 게임 서비스" / "설정"  - "Play 게임 서비스 설정"

 - 선택 : "아니요. 게임에서 Google API를 사용하지 않습니다."

 - 게임 이름 : "이름 입력"

 - 우측 하단 "만들기"


1-2. 사용자 인증 정보 "설정"


 - "Google Cloud Platform"링크 또는 설정 상단 "Google Cloud Platform에서 보기"클릭


2. Google Cloud Platform 설정

2.1"Google Cloud Platform"에서 프로젝트가 선택되었는지 확인

"API 및 서비스" / "OAuth 동의 화면" 확인



2.2 "OAuth 동의 화면" / "User Type" - "외부" 선택 "만들기"


2.3 앱 등록 수정

"OAuth 동의 화면" - "앱 등록 수정"
1. "OAuth 동의 화면" 빨간곳 정보 넣고 "저장 후 계속"
2. "범위" 다음
3. "테스트 사용자" 다음
4. "요약" 확인

3. Play 게임 서비스 설정

    "Google Play Console" / "Play 게임 서비스" 

3.1 "사용자 인증 정보" 새로고침



3.2 "사용자 인증 정보 추가"

"사용자 인증 정보" / "사용자 인증 정보 추가"


"사용자 인증 정보 추가 창에서"

유형 : Android

이름 : 게임 이름

불법 복제 방지 사용 : 사용(권장)

"OAuth 클라이언트 만들기" 버튼 선택 후 

"OAuth 클라이언트를 만드는 방법" 팝업 창에서 "OAuth 클라이언트 ID 만들기"링크 클릭

"OAuth 클라이언트를 만드는 방법"



4. Google Cloud Platform 설정
"Google Cloud Platform" ->" OAuth Client ID 만들기"

어플리케이션 유형 :  "Android"


"OAuth 클라이언트를 만드는 방법" 팝업 창에서의 정보를 넣어준다.



5. Play 게임 서비스 설정

"OAuth 클라이언트 새로고침" 후 위에서 만든 "OAuth 클라이언트" 사용자 인증 선택
불법 복제 방지 사용 : 사용(권장)
OAuth 클라이언트 확인 후 오른쪽 하단 "변경사항 저장"


"사용자 인증 정보" 완료


2021년 8월 23일 월요일

[Unity Android] Build - error: unexpected element found in

유니티에서 Plugin 추가 후 빌드 에러가 발생했다.

    유니티 버전 2019.4.29f1


증상

* What went wrong:
Execution failed for task ':launcher:processReleaseResources'.
> Android resource linking failed
C:\Work\DCubeClient\Temp\gradleOut\launcher\build\intermediates\merged_manifests\release\AndroidManifest.xml:42: AAPT: error: unexpected element <queries> found in <manifest>.



빌드된 merged_manifests 파일 확인

C:\Work\DCubeClient\Temp\gradleOut\launcher\build\intermediates\merged_manifests\release\AndroidManifest.xml


해결법

Gradle 버전이 낮아서 생기는 문제로 3.4.0 -> 3.4.3 변경한다.

    참고

    https://stackoverflow.com/questions/62969917/how-to-fix-unexpected-element-queries-found-in-manifest-error


1. BaseGradleTemplate 체크


2. Assets\Plugins\Android\baseProjectTemplate.gradle File 편집

gradle:3.4.0 -> gradle:3.4.3 으로 변경 후 저장

classpath 'com.android.tools.build:gradle:3.4.0' -> classpath 'com.android.tools.build:gradle:3.4.3' ->



baseProjectTemplate.gradle File

// GENERATED BY UNITY. REMOVE THIS COMMENT TO PREVENT OVERWRITING WHEN EXPORTING AGAIN
allprojects {
    buildscript {
        repositories {**ARTIFACTORYREPOSITORY**
            google()
            jcenter()
        }

        dependencies {
            // If you are changing the Android Gradle Plugin version, make sure it is compatible with the Gradle version preinstalled with Unity
            // See which Gradle version is preinstalled with Unity here https://docs.unity3d.com/Manual/android-gradle-overview.html
            // See official Gradle and Android Gradle Plugin compatibility table here https://developer.android.com/studio/releases/gradle-plugin#updating-gradle
            // To specify a custom Gradle version in Unity, go do "Preferences > External Tools", uncheck "Gradle Installed with Unity (recommended)" and specify a path to a custom Gradle version
            classpath 'com.android.tools.build:gradle:3.4.3'
            **BUILD_SCRIPT_DEPS**
        }
    }

    repositories {**ARTIFACTORYREPOSITORY**
        google()
        jcenter()
        flatDir {
            dirs "${project(':unityLibrary').projectDir}/libs"
        }
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}


2021년 3월 16일 화요일

[Unity Android] Unity 2019.x multi Dex 64k 해결법


Unity 2019.x multi Dex 64k 해결법

Unity 2019 버전으로 넘어오면서 기능이 바뀌여 다른 방식으로 해야 한다.


해결 방법

"Edit" -> "Player Settings" -> "Player"탭 -> "Publishing Settings" -> "Custom Launcher Gradle Template" 체크 후 생성된 파일을 수정한다.

  • Assets\Plugins\Android\launcherTemplate.gradle



Assets\Plugins\Android\launcherTemplate.gradle 파일에 아래 줄 추가
defaultConfig {
    multiDexEnabled true // 추가

}


// GENERATED BY UNITY. REMOVE THIS COMMENT TO PREVENT OVERWRITING WHEN EXPORTING AGAIN

apply plugin: 'com.android.application'

dependencies {
    implementation project(':unityLibrary')
}

android {
    compileSdkVersion **APIVERSION**
    buildToolsVersion '**BUILDTOOLS**'

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
    targetCompatibility JavaVersion.VERSION_1_8
    }

    defaultConfig {
        minSdkVersion **MINSDKVERSION**
        targetSdkVersion **TARGETSDKVERSION**
        multiDexEnabled true
        applicationId '**APPLICATIONID**'
        ndk {
            abiFilters **ABIFILTERS**
        }
        versionCode **VERSIONCODE**
        versionName '**VERSIONNAME**'
    }

    aaptOptions {
        noCompress = ['.unity3d', '.ress', '.resource', '.obb'**STREAMING_ASSETS**]
        ignoreAssetsPattern = "!.svn:!.git:!.ds_store:!*.scc:.*:!CVS:!thumbs.db:!picasa.ini:!*~"
    }**SIGN**

    lintOptions {
        abortOnError false
    }

    buildTypes {
        debug {
            minifyEnabled **MINIFY_DEBUG**
            useProguard **PROGUARD_DEBUG**
            proguardFiles getDefaultProguardFile('proguard-android.txt')**SIGNCONFIG**
            jniDebuggable true
        }
        release {
            minifyEnabled **MINIFY_RELEASE**
            useProguard **PROGUARD_RELEASE**
            proguardFiles getDefaultProguardFile('proguard-android.txt')**SIGNCONFIG**
        }
    }**PACKAGING_OPTIONS****SPLITS**
    **BUILT_APK_LOCATION**
    bundle {
        language {
            enableSplit = false
        }
        density {
            enableSplit = false
        }
        abi {
            enableSplit = true
        }
    }
}**SPLITS_VERSION_CODE****LAUNCHER_SOURCE_BUILD_SETUP**

2021년 1월 11일 월요일

[UnityIAP] UnityIAP 2.2.5 Consume처리시 empty transactionID Error 발생

UnityIAP 2.2.5 설치 후  Consume 되지 않은 상품 Consume 처리시 empty transactionID Error 발생

Unable to confirm purchase; Product has missing or empty transactionID


또 유니티IAP 팀이 다음 버전을 기다리라고 함..

2.2.2 버전 이후부터 계속 버그가 생기네...

https://forum.unity.com/threads/bug-unity-iap-2-2-5-cannot-confirmpendingpurchase.1023700/#post-6700876


Packages Manager의 버전과 Unity AssetStore의 버전은 다르다.

2019년 11월 6일 수요일

[Unity Android] Unity Ads 추가 에러

Unity Ads를 추가 후 빌드 에러 발생

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':checkReleaseDuplicateClasses'.
> 1 exception was raised by workers:
  java.lang.RuntimeException: Duplicate class com.unity3d.ads.BuildConfig found in modules classes.jar (:UnityAds:) and classes.jar (:unity-ads:)
  Duplicate class com.unity3d.ads.IUnityAdsListener found in modules classes.jar (:UnityAds:) and classes.jar (:unity-ads:)


Asset Store에서 최신 버전의 UnityAds를 설치 했지만
Unity가 Project 생성시 자동으로 Package에 Advertisement를 설치해 놓아서 그렇다.

둘중 하나를 지우면된다.

- 내프로젝트

-  Package

 Packages쪽 Ads를 지운다.


에러 전문

[Unity Android] AndroidManifest.xml 파일 생성

Unity는 Android용 AndroidManifest.xml 파일을 기본으로 생성해 주지 않는다.

AndroidManifest.xml을 Project로 복사하는 방법은 

Android 빌드 후 프로젝트 폴더의 Temp\StagingArea 경로를 보면 AndroidManifest.xml이 있다.

이 파일을 Assets\Plugins\Android 폴더로 복사한 후 파일을 편집해서 사용하면 된다.



2019년 8월 26일 월요일

[Android] Android Device Monitor 실행 시 에러

Android Device Monitor 실행 시 에러 팝업창과 함께 로그파일 경로가 나왔다

이유는 알수 없지만 검색결과 아래 3가지 방법이 나왔다.

  1. Android Studio를 "관리자 권한으로 실행"
  2. "monitor.exe"를 "관리자 권한으로 실행"
  3. 작업 관리자에서 "monitor.exe"를 "작업 끝내기"

나의 해결책은 3번 "monitor.exe'을 "작업 끝내기"하고 '재실행" 하니 해결되었다.




2019년 7월 11일 목요일

[Unity Android] Unity 2019.1.9 base Custom Gradle Tamplate

[Unity Android] Unity 2019.1.+ base Custom Gradle Tamplate

Unity 2019.1.+에서 사용하는 기본 Custom Gradle Tamplate
Unity 버전이 올라갈때마다 바뀌어서 저장용으로 올려놓는다.

// GENERATED BY UNITY. REMOVE THIS COMMENT TO PREVENT OVERWRITING WHEN EXPORTING AGAIN
buildscript {
    repositories {
        google()
        jcenter()
    }


    dependencies {
        classpath 'com.android.tools.build:gradle:3.4.0'
**BUILD_SCRIPT_DEPS**}
}

allprojects {
    repositories {
        google()
        jcenter()
        flatDir {
            dirs 'libs'
        }
    }
}

apply plugin: 'com.android.application'
**APPLY_PLUGINS**

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
**DEPS**}


android {
    compileSdkVersion **APIVERSION**
    buildToolsVersion '**BUILDTOOLS**'


    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }


    defaultConfig {
        minSdkVersion **MINSDKVERSION**
        targetSdkVersion **TARGETSDKVERSION**
        applicationId '**APPLICATIONID**'
        ndk {
            abiFilters **ABIFILTERS**
        }
        versionCode **VERSIONCODE**
        versionName '**VERSIONNAME**'
    }


    lintOptions {
        abortOnError false
    }


    aaptOptions {
        noCompress = ['.unity3d', '.ress', '.resource', '.obb'**STREAMING_ASSETS**]
        ignoreAssetsPattern = "!.svn:!.git:!.ds_store:!*.scc:.*:!CVS:!thumbs.db:!picasa.ini:!*~"
    }**SIGN**


    buildTypes {
        debug {
            minifyEnabled **MINIFY_DEBUG**
            useProguard **PROGUARD_DEBUG**
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-unity.txt'**USER_PROGUARD****SIGNCONFIG**
            jniDebuggable true
        }
        release {
            minifyEnabled **MINIFY_RELEASE**
            useProguard **PROGUARD_RELEASE**
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-unity.txt'**USER_PROGUARD****SIGNCONFIG**
        }
    }**PACKAGING_OPTIONS****SPLITS**
**BUILT_APK_LOCATION**
**EXTERNAL_SOURCES**
    bundle {
        language {
            enableSplit = false
        }
        density {
            enableSplit = false
        }
        abi {
            enableSplit = true
        }
    }
}**SPLITS_VERSION_CODE****REPOSITORIES****SOURCE_BUILD_SETUP**


2019년 5월 28일 화요일

[Android]Unity Android Resolver (1.2.111) mainTemplate.gradle설정

Unity Android 64bit 이슈로 
Android Resolver 버전(1.2.111)이 올라가면서 mainTemplate.gradle 파일의 설정이 변경되어서 정리 해 보았다

Unity 2018.3
Android Resolver(1.2.111)
 - firebase_unity_sdk_6.0.0
 - facebook-unity-sdk-7.15.1
 - GooglePlayGamesPlugin-0.9.64

 - GoogleMobileAds-v3.17.0

mainTemplate.gradle
// GENERATED BY UNITY. REMOVE THIS COMMENT TO PREVENT OVERWRITING WHEN EXPORTING AGAIN
buildscript {
    repositories {
        google()
        jcenter()
    }


    dependencies {
            classpath 'com.android.tools.build:gradle:3.2.0'
**BUILD_SCRIPT_DEPS**}
}


allprojects {
    repositories {
        google()
        jcenter()
        flatDir {
            dirs 'libs'
        }


        maven {
            url 'https://google.bintray.com/exoplayer/'
        }
    }
}


// Android Resolver 자동 생성 (1.2.111)
// Android Resolver Repos Start
allprojects {
    repositories {
        maven {
            url "https://maven.google.com"
        }
        maven {
            url "file:///C:/WORKSPACE/Assets/Firebase/m2repository" // Assets/Firebase/Editor/AppDependencies.xml:20, Assets/Firebase/Editor/MessagingDependencies.xml:22
        }
        maven {
            url "https://jcenter.bintray.com/" // Assets/GoogleMobileAds/Editor/FacebookMediationDependencies.xml:7, Assets/GoogleMobileAds/Editor/FacebookMediationDependencies.xml:12, Assets/GoogleMobileAds/Editor/UnityMediationDependencies.xml:7, Assets/GoogleMobileAds/Editor/UnityMediationDependencies.xml:12
        }
        maven {
            url "https://maven.google.com/" // Assets/GoogleMobileAds/Editor/GoogleMobileAdsDependencies.xml:7
        }
        maven {
            url "https://jcenter.bintray.com" // Assets/GoogleMobileAds/Editor/VungleMediationDependencies.xml:7
        }
        maven {
            url "https://jitpack.io" // Assets/GoogleMobileAds/Editor/VungleMediationDependencies.xml:12
        }
        maven {
            url "file:///C:/WORKSPACE/Assets/GooglePlayGames/Editor/m2repository" // Assets/GooglePlayGames/Editor/GooglePlayGamesPluginDependencies.xml:11
        }
        mavenLocal()
        jcenter()
        mavenCentral()
    }
}
// Android Resolver Repos End

apply plugin: 'com.android.application'
**APPLY_PLUGINS**


dependencies {
    compile 'com.android.support:multidex:1.0.2'


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


// Android Resolver 자동 생성 (1.2.111)
// Android Resolver Dependencies Start
    compile 'com.android.support:appcompat-v7:25.3.1' // Facebook.Unity.Editor.AndroidSupportLibraryResolver.addSupportLibraryDependency
    compile 'com.android.support:cardview-v7:25.3.1' // Facebook.Unity.Editor.AndroidSupportLibraryResolver.addSupportLibraryDependency
    compile 'com.android.support:customtabs:25.3.1' // Facebook.Unity.Editor.AndroidSupportLibraryResolver.addSupportLibraryDependency
    compile 'com.android.support:support-v4:25.3.1' // Facebook.Unity.Editor.AndroidSupportLibraryResolver.addSupportLibraryDependency
    compile 'com.applovin:applovin-sdk:8.1.4' // Assets/GoogleMobileAds/Editor/AppLovinMediationDependencies.xml:6
    compile 'com.facebook.android:audience-network-sdk:5.0.1' // Assets/GoogleMobileAds/Editor/FacebookMediationDependencies.xml:12
    compile 'com.github.vungle:vungle-android-sdk:6.3.24' // Assets/GoogleMobileAds/Editor/VungleMediationDependencies.xml:12
    compile 'com.google.ads.mediation:applovin:8.1.4.0' // Assets/GoogleMobileAds/Editor/AppLovinMediationDependencies.xml:4
    compile 'com.google.ads.mediation:facebook:5.0.1.0' // Assets/GoogleMobileAds/Editor/FacebookMediationDependencies.xml:7
    compile 'com.google.ads.mediation:unity:3.0.0.0' // Assets/GoogleMobileAds/Editor/UnityMediationDependencies.xml:7
    compile 'com.google.ads.mediation:vungle:6.3.24.0' // Assets/GoogleMobileAds/Editor/VungleMediationDependencies.xml:7
    compile 'com.google.android.gms:play-services-ads:17.2.0' // Assets/GoogleMobileAds/Editor/GoogleMobileAdsDependencies.xml:7
    compile 'com.google.auto.value:auto-value-annotations:1.6.3' // Assets/Firebase/Editor/AppDependencies.xml:22
    compile 'com.google.firebase:firebase-analytics:16.5.0' // Assets/Firebase/Editor/MessagingDependencies.xml:15
    compile 'com.google.firebase:firebase-app-unity:6.0.0' // Assets/Firebase/Editor/AppDependencies.xml:20
    compile 'com.google.firebase:firebase-common:17.0.0' // Assets/Firebase/Editor/AppDependencies.xml:13
    compile 'com.google.firebase:firebase-iid:[18.0.0]' // Assets/Firebase/Editor/MessagingDependencies.xml:13
    compile 'com.google.firebase:firebase-messaging:18.0.0' // Assets/Firebase/Editor/MessagingDependencies.xml:17
    compile 'com.google.firebase:firebase-messaging-unity:6.0.0' // Assets/Firebase/Editor/MessagingDependencies.xml:22
    compile 'com.google.games:gpgs-plugin-support:0.9.64' // Assets/GooglePlayGames/Editor/GooglePlayGamesPluginDependencies.xml:11
    compile 'com.unity3d.ads:unity-ads:3.0.0' // Assets/GoogleMobileAds/Editor/UnityMediationDependencies.xml:12
// Android Resolver Dependencies End

**DEPS**
}


android {
    compileSdkVersion **APIVERSION**
    buildToolsVersion '**BUILDTOOLS**'


    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }


    defaultConfig {
        minSdkVersion **MINSDKVERSION**
        targetSdkVersion **TARGETSDKVERSION**
        applicationId '**APPLICATIONID**'
        ndk {
            abiFilters **ABIFILTERS**
        }
        versionCode **VERSIONCODE**
        versionName '**VERSIONNAME**'


        multiDexEnabled true
    }


    lintOptions {
        abortOnError false
    }


    dexOptions {
        jumboMode = true
        javaMaxHeapSize "4g"
    }


    aaptOptions {
        noCompress = ['.unity3d', '.ress', '.resource', '.obb'**STREAMING_ASSETS**]
        ignoreAssetsPattern = "!.svn:!.git:!.ds_store:!*.scc:.*:!CVS:!thumbs.db:!picasa.ini:!*~"
    }**SIGN**


    buildTypes {
          debug {
            minifyEnabled **MINIFY_DEBUG**
            useProguard **PROGUARD_DEBUG**
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-unity.txt'**USER_PROGUARD****SIGNCONFIG**
            jniDebuggable true
        }
        release {
            minifyEnabled **MINIFY_RELEASE**
            useProguard **PROGUARD_RELEASE**
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-unity.txt'**USER_PROGUARD****SIGNCONFIG**
        }
    }**PACKAGING_OPTIONS****SPLITS**
**BUILT_APK_LOCATION**
**EXTERNAL_SOURCES**
    bundle {
        language {
            enableSplit = false
        }
        density {
            enableSplit = false
        }
        abi {
            enableSplit = true
        }
    }
}**SPLITS_VERSION_CODE****REPOSITORIES****SOURCE_BUILD_SETUP**



2019년 5월 17일 금요일

[Unity Android] ClassNotFoundException com.google.games.bridge.TokenFragment

Unity Android 64bit 빌드중 에러가 발생하여서 기존 SDK를 전부 버전업했다.
unity-jar-resolver 1.2.108, 1.2.109 버전이 아래와 같은 토큰 에러가 발생.
아래 설명처럼 1.2.110이상으로 설치하면 된다.

ClassNotFoundException com.google.games.bridge.TokenFragment after updating from version 1.2.104 to 1.2.108


05-06 11:12:23.462 16323-16386/ W/Unity: *** [Play Games Plugin DLL] 05/06/19 11:12:23 +02:00 ERROR: Exception launching token request: java.lang.ClassNotFoundException: com.google.games.bridge.TokenFragment


참고 링크
https://github.com/googlesamples/unity-jar-resolver/issues/208


아래 링크에서 Unity-jar-resolver버전을 안정된 버전으로 유지하도록 하자
https://github.com/googlesamples/unity-jar-resolver/

Error Log

2019년 1월 29일 화요일

[Unity Android] Unity 2018 - mainTemplate.gradle 정리

[Unity Android] 버전 체크 mainTemplate.gradle 파일

Unity 2018.3 버전에서 사용

// GENERATED BY UNITY. REMOVE THIS COMMENT TO PREVENT OVERWRITING WHEN EXPORTING AGAIN
buildscript {
    repositories {
        if (GradleVersion.current() >= GradleVersion.version("4.2")) {
            jcenter()
            google()
        } else {
            jcenter()
        }
        maven { url "https://maven.google.com/"}
    }


    dependencies {
           // use newer version of the plugin for newer unity/gradle versions
            if (GradleVersion.current() < GradleVersion.version("4.0")) {
                classpath 'com.android.tools.build:gradle:2.1.0'
            } else if (GradleVersion.current() < GradleVersion.version("4.2")) { // Unity 2018.1 : Gradle version 4.0.1
            classpath 'com.android.tools.build:gradle:2.3.3'
            } else {                        // Unity 2018.2 : Gradle version 4.2.1
                classpath 'com.android.tools.build:gradle:3.0.1'
            }
    }
}


allprojects {
    repositories {
        if (GradleVersion.current() >= GradleVersion.version("4.2")) {
            jcenter()
            google()
        } else {
            jcenter()
        }


        maven { url 'https://maven.google.com'}
        flatDir {
            dirs 'libs'
        }
    }
}


apply plugin: 'com.android.application'


dependencies {
    compile 'com.android.support:multidex:1.0.1'


    if (GradleVersion.current() >= GradleVersion.version("4.2")) {
        implementation fileTree(dir: 'libs', include: ['*.jar'])
    } else {
        compile fileTree(dir: 'libs', include: ['*.jar'])
    }
**DEPS**
}


android {
    compileSdkVersion **APIVERSION**
    buildToolsVersion '**BUILDTOOLS**'


    if (GradleVersion.current() < GradleVersion.version("4.2")) {
        // fix complaint that 3rd party libraries have the same package name
        enforceUniquePackageName false
    }


    defaultConfig {
        minSdkVersion    **MINSDKVERSION**
        targetSdkVersion **TARGETSDKVERSION**
        applicationId '**APPLICATIONID**'
        
        versionCode    **VERSIONCODE**
        versionName    '**VERSIONNAME**'


        // Enabling multidex support.
        multiDexEnabled true


        if (GradleVersion.current() >= GradleVersion.version("4.0")) {
            ndk {
                abiFilters **ABIFILTERS**
            }
        }
    }
    dexOptions {
        javaMaxHeapSize "4g"
    }


    lintOptions {
        abortOnError false
    }


    aaptOptions {
        noCompress '.unity3d', '.ress', '.resource', '.obb'**STREAMING_ASSETS**
    }


**SIGN**
    buildTypes {
          debug {
             minifyEnabled **MINIFY_DEBUG**
            if (GradleVersion.current() >= GradleVersion.version("4.2")) {// > Build-in class shrinker and multidex are not supported yet.
                useProguard **PROGUARD_DEBUG**            
            }
             proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-unity.txt'**USER_PROGUARD**
              jniDebuggable true
          }
          release {
             minifyEnabled **MINIFY_RELEASE**
             if (GradleVersion.current() >= GradleVersion.version("4.2")) {// > Build-in class shrinker and multidex are not supported yet.
                useProguard **PROGUARD_RELEASE**
            }
              proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-unity.txt'**USER_PROGUARD**
              **SIGNCONFIG**
          }
    }
**PACKAGING_OPTIONS**
}


**SOURCE_BUILD_SETUP**


2018년 12월 17일 월요일

[Unity Android] Unity 2018.3 마이그레이션 Firebase.Editor.dll error

Unity 2018.3.0f 마이그레이션 Firebase.Editor.dll error

Unity 2018.2 -> 2018.3.0으로 버전을 업. 에러 발생
Assembly 'Assets/Firebase/Editor/Firebase.Editor.dll' will not be loaded due to errors: Unable to resolve reference 'Unity.iOS.Extensions.Xcode'. Is the assembly missing or incompatible with the current platform?


- 사용중인 Firebase 버전 5.2.1

공식 홈페이지확인 결과
5.3.1에서 해당사항이 수정되었다.


Firebase 버전 업~ 패키지 설치 후
- Android Resolver






2018년 11월 1일 목요일

[Unity Android] Facebook sdk "keytool not find"

Facebook Unity Plugin "keytool not find"

Program Files에 설치 되어있는 Java jre파일 확인
"C:\Program Files\Java\jre1.8.0_19\bin"

환경변수 -> Path에 설치 되어있는 jre의 bin폴더 추가


2018년 9월 13일 목요일

[Unity Android] Android 언어별 Appicon, App이름 변경

[Unity Android]  언어별 Appicon, 이름 변경
언어별로 icon과 앱이름을 변경과정을 정리하였다.

1. 언어별 AppIcon 설정
Plugs/Android/res폴더 아래
사용할 Icon을 국가, 사이즈 별로 폴더에 넣는다.
(mipmap 추가)

  • ldpi (저밀도) ~120dpi : 36x36 (0.75x)
  • mdpi (중간 밀도) ~160dpi : 48x48 (1.0x 기준)
  • hdpi (고밀도) ~240dpi : 72x72 (1.5x)
  • xhdpi (초고밀도) ~320dpi : 96x96 (2.0x)
  • xxhdpi (초초고밀도) ~480dpi : 144x144 (3.0x)
  • xxxhdpi (초초초고밀도) ~640dpi : 192x192 (4.0x)
    (런처 아이콘에만 해당, 위의 참고 참조)


확인 방법
시스템 언어를 한국어로 설정했을 경우
[환경설정] -> [언어 및 키보드] -> [언어 선택] -> 언어 변경



2. 언어별 AppName 설정
Plugs/Android/res폴더 아래
values-[언어코드] 아래 strings.xml 파일을 수정한다.

values : 디폴트
values-ko : 한국어
values-ja : 일본어
values-zh : 중국어

  • res/values-ko/strings.xml 한글
    • xml 인코딩 주의! UTF-8(+)로 저장
  • res/values-zh-rCN/strings.xml 중국어 간체
  • res/values-zh-rTW/strings.xml 중국어 번체




주요 해상도별 대표 디바이스 화면 크기
ldpi(120dpi /기타 소형단말기) : 240 x 320
mdpi(160dpi/G1, 옵티머스원): 320 x 480
mdpi(160dpi/G1, 갤럭시 탭 7.0,):600 x 1024
mdpi(160dpi/G1, 모토롤라 Xoom 10,갤럭시탭 7.7 & 10.1):1280 x 800
hdpi(240dpi / 갤럭시 S/S2) : 480 x 800
hdpi(240dpi / 모토로라 드로이드, XPERIA X10) : 480 x 854
xhdpi(320dpi / 갤럭시 S3/노트II ) : 720 x 1280
xhdpi(320dpi / 삼성 갤럭시 넥서스 ) : 720 x 1194 or 1280
xhdpi(320dpi / 삼성 갤럭시 노트I : 800 x 1280
xhdpi(320dpi / LG 옵티머스G, 넥서스4) : 768 x 1280
xxhdpi(480dpi / 갤럭시 S4 & 옵티머스G프로) : 1080×1920
xxxhdpi(640dpi / LG G3) : 1440×2560

mdpi 는 기준 밀도입니다. mdpi 에서1 px 는 1 dip 와 같습니다. 비율은 아래 표를 참고하세요.
ldpi | mdpi | tvdpi | hdpi | xhdpi | xxhdpi | xxxhdpi
0.75 | 1    | 1.33  | 1.5  | 2     | 3      | 4

아이콘 크기는 아래 표를 참고하세요.
ldpi    | mdpi    | tvdpi    | hdpi    | xhdpi     | xxhdpi    | xxxhdpi
36 x 36 | 48 x 48 | 64 x 64  | 72 x 72 | 96 x 96   | 144 x 144 | 192 x 192

픽셀 밀도는 아래 표를 참고하세요.
ldpi  | mdpi  | tvdpi  | hdpi  | xhdpi  | xxhdpi  | xxxhdpi
120   | 160   | 213    | 240   | 320    | 480     | 640
참고 링크
http://egloos.zum.com/sweeper/v/3189739
http://limchaeng.tistory.com/24