블로그 이미지
Every unexpected event is a path to learning for you.

카테고리

분류 전체보기 (2737)
Unity3D (817)
Programming (474)
Server (33)
Unreal (4)
Gamebryo (56)
Tip & Tech (228)
협업 (58)
3DS Max (3)
Game (12)
Utility (136)
Etc (96)
Link (32)
Portfolio (19)
Subject (90)
iOS,OSX (53)
Android (14)
Linux (5)
잉여 프로젝트 (2)
게임이야기 (3)
Memories (20)
Interest (38)
Thinking (38)
한글 (30)
PaperCraft (5)
Animation (408)
Wallpaper (2)
재테크 (18)
Exercise (3)
나만의 맛집 (3)
냥이 (10)
육아 (16)
Total
Today
Yesterday
04-19 00:04

Unity 2021.3.33f1

Xcode 15.3

AppsFlyer v6.13.10

----

 

[추가] 2024-04-17

AppsFlyer v6.14.0에서 Xcode 15.3 관련 버그가 수정됐다.

v6.14.0으로 버전업 하면 해결.

 

[AppsFlyer Releases] https://github.com/AppsFlyerSDK/appsflyer-unity-plugin/releases

AppsFlyer v6.14.0

 

 

----

[빌드 에러 로그]

----

[Error] Type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int
[Warning] Incompatible pointer to integer conversion passing 'void *' to parameter of type 'int'
----
BOOL __swizzled_didReceiveRemoteNotification(id self, SEL _cmd, UIApplication* application, NSDictionary* userInfo,void (^UIBackgroundFetchResult)(void) ) {
    NSLog(@"swizzled didReceiveRemoteNotification");
    
    [[AppsFlyerLib shared] handlePushNotification:userInfo];
    
    if(__original_didReceiveRemoteNotification_Imp){
        return ((BOOL(*)(id, SEL, UIApplication*, NSDictionary*, (UIBackgroundFetchResult)))__original_didReceiveRemoteNotification_Imp)(self, _cmd, application, userInfo, nil);
    }
    return YES;
}

----

 

[2024-03-13] Xcode 15.3이 나와서 업데이트 하고 iOS 빌드 하니 위와 같은 에러가 난다.

에러 위치는 AppsFlyer 인데..

검색(아래 링크 참조)해보니 Xcode 15.3 업데이트 하고나서 같은 에러를 겪고 있는 것 같다.

AppsFlyer에서 대응해줘야 될 것 같은데, 링크에서 임시방편으로 수정하는 방법을 알려주고 있다.

일단 빌드를 할 수 없으니 Xcode 15.2로 다운그레이드 했다.

 

[결론]

Xcode 15.3을 쓰려면 두가지 방법중 하나를 고르자.

1. [임시방편] 당장 써야겠다면, 해당 에러 위치를 아래 내용을 참조해서 수정하자.

    1.1. AppsFlyer+AppController.m 파일 위치

          1.1.1. 수동 설치 했으면 : ..\Assets\AppsFlyer\Plugins\iOS\AppsFlyer+AppController.m

          1.1.2. Package로 설치했으면 : /Library/PackageCache/appsflyer-unity-plugin@xxxxxxxxxx/AppsFlyer+AppController.m

    1.2. AppsFlyer+AppController.m line:144 위치의 return 하는 소스를 아래와 같이 수정하자.

          -> return ((BOOL(*)(id, SEL, UIApplication*, NSDictionary*, int(UIBackgroundFetchResult)))__original_didReceiveRemoteNotification_Imp)(self, _cmd, application, userInfo, nil);

[참조] https://github.com/AppsFlyerSDK/appsflyer-unity-plugin/issues/263

 

[추가]

Xcode 15.3부터 C99 이상 강제하는 것 같다.

AppsFlyer 현재 버전이 C89인지.. C99 지원을 안하는 것 같은데..

결국 AppsFlyer가 C99 대응 업데이트를 해줘야 Xcode 15.3에서 정상적으로 빌드가 되지 싶다.

 

 

[참조] https://github.com/AppsFlyerSDK/appsflyer-unity-plugin/issues/263

 

Cannot build with xCode 15.3 · Issue #263 · AppsFlyerSDK/appsflyer-unity-plugin

Hello! I just updated xCode to 15.3 and there seems to be an ISO C99 issue with the AppsFlyer+AppController.mfile. The attached image is a screenshot from xCode 15.2 where the issue Type specifier ...

github.com

반응형
Posted by blueasa
, |

Xcode 15

Unity 2023.3.10f1

----

 

[Xcode Build Error]

Assertion failed: (false && "compact unwind compressed function offset doesn't fit in 24 bits"), function operator(), file Layout.cpp, line 5758.

 

Xcode 15로 업데이트 후 빌드를 했더니,

유니티 빌드는 정상적으로 됐는데 Xcode로 넘어와서는 위와 같은 에러를 내면서 빌드가 안된다.

혹시나해서 Mac OS 14로 업데이트도 해봤는데 빌드 실패함.

 

OTHER_LDFLAGS에 -ld_classic을 추가하라는 내용을 보고(아래 링크 참조) 추가해서 정상적으로 빌드 되는 것을 확인 함.

 

    ...
    var pbxProject = new PBXProject();
    pbxProject.ReadFromFile(projectPath);
 
    //Unity Framework
    target = pbxProject.GetUnityFrameworkTargetGuid();
    pbxProject.AddBuildProperty(target, "OTHER_LDFLAGS", "-ld_classic");

 

 

[참조] https://forum.unity.com/threads/project-wont-build-using-xode15-release-candidate.1491761/#post-9355667

 

Bug - Project won't build using Xode15 release candidate.

Hi there, just tried to build the project using Xcode15 RC (Released yesterday). And failed with the following error: Showing Recent Issues...

forum.unity.com

[참조] https://issuetracker.unity3d.com/issues/building-projects-with-il2cpp-scripting-backend-for-apple-platforms-fails-with-xcode-15-dot-0b6-or-newer

 

Unity IssueTracker - Building projects with IL2CPP scripting backend for Apple platforms fails with Xcode 15.0b6 or newer

Xcode >= 15.0b6 contains a change to the "ProductName" in the "version.plist", which Unity will fail to parse. Because of that, U...

issuetracker.unity3d.com

 

 

반응형
Posted by blueasa
, |

[추가] 2023-07-20

Unity 2022.3.5f1에서 이슈 해결된 것 확인함

(몇 버전부터 해결된건지는 확인 못함)

 

--------------------------------------------------

Unity 2022.2.18f1

Firebase 10.7.0

----

 

[빌드에러 #1]

> Configure project :unityLibrary
Build was configured to prefer settings repositories over project repositories but repository 'maven' was added by build file 'unityLibrary\build.gradle'


...

 

[빌드에러 #2]

Execution failed for task ':launcher:checkReleaseDuplicateClasses'.
> Could not resolve all files for configuration ':launcher:releaseRuntimeClasspath'.


-------------------------------------------------------------------------------------------------------------

 

 

Unity 2021에서 Unity 2022로 포팅하는 중에 위와 같은 빌드 에러가 떠서 찾아보니

Gradle 관련 Unity 2022 버그가 있는 것 같다.

 

[수정]

[참조] 링크 내용대로 아래와 같이 Gradle을 수정하고 정상적으로 빌드 되는 걸 확인 함.

간단히 정리하면 settingsTemplate.gradle에 있던 걸 baseProjectTemplate.gradle로 옮겨야 한다.

-------------------------------------------------------------------------------------------------------------

256p commented on Jan 24

Also, there is another workaround that keeps the Gradle version (in case some android lib requires it).
For that workaround, you will need to copy a file from /Applications/Unity/Hub/Editor/2022.2.3f1/PlaybackEngines/AndroidPlayer/Tools/GradleTemplates/settingsTemplate.gradle to Assets/Plugins/Android/settingsTemplate.gradle. That way Unity will use your template in Assets/Plugins/Android. (It's weird that Unity doesn't has a checkbox for that)
For my version of unity, it looks like that:

 

[Before] ../Assets/Plugins/Android/settingsTemplate.gradle

pluginManagement {
    repositories {
        **ARTIFACTORYREPOSITORY**
        gradlePluginPortal()
        google()
        mavenCentral()
    }
}

include ':launcher', ':unityLibrary'
**INCLUDES**

dependencyResolutionManagement {
    repositoriesMode.set(RepositoriesMode.PREFER_SETTINGS)
    repositories {
        **ARTIFACTORYREPOSITORY**
        google()
        mavenCentral()
        flatDir {
            dirs "${project(':unityLibrary').projectDir}/libs"
        }
    }
}

 

The conflicting part is RepositoriesMode.PREFER_SETTINGS. But you can safely delete the whole dependencyResolutionManagement block from here. Since the android project still needs to know about local dependencies, copy the repositories block, you will need it later.
Now settingsTemplate.gradle should look like this:

 

[After] ../Assets/Plugins/Android/settingsTemplate.gradle

pluginManagement {
    repositories {
        **ARTIFACTORYREPOSITORY**
        gradlePluginPortal()
        google()
        mavenCentral()
    }
}

include ':launcher', ':unityLibrary'
**INCLUDES**

------------------------------------------------------------------------------------------------------------------------------------------

Now in Project Settings > Player > Publishing Settings for Android enable Custom Base Gradle Template
Initially, it will look like that:

 

[Before] ../Assets/Plugins/Android/baseProjectTemplate.gradle

plugins {
    id 'com.android.application' version '7.1.2' apply false
    id 'com.android.library' version '7.1.2' apply false
    **BUILD_SCRIPT_DEPS**
}

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

 

Now create allprojects block and paste repositories copied in the settings template. As a result base template will look like that:

 

[After] ../Assets/Plugins/Android/baseProjectTemplate.gradle

plugins {
    id 'com.android.application' version '7.1.2' apply false
    id 'com.android.library' version '7.1.2' apply false
    **BUILD_SCRIPT_DEPS**
}

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

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

 

Now Gradle should build successfully.

 

-------------------------------------------------------------------------------------------------------------

 

[참조] https://github.com/googlesamples/unity-jar-resolver/issues/594

 

[Bug] Android Gradle project repositories block don't work for the latest Unity versions · Issue #594 · googlesamples/unity-ja

[REQUIRED] Please fill in the following fields: Unity editor version: 2022.2.2f1 External Dependency Manager version: 1.2.175 Source you installed EDM4U: .unitypackage Features in External Dependen...

github.com

 

 

반응형
Posted by blueasa
, |

증상

유니티 안드로이드 빌드 시 아래와 같은 에러

/Users/jim/Desktop/workspace/project/project/Temp/gradleOut/launcher/build/intermediates/merged_manifests/release/AndroidManifest.xml:52: AAPT: error: unexpected element found in

 

해당 파일의 52번째 줄에는 <quries>라는 신택스가 있는데 인식을 못하는 것 같다.

 

원인

stackoverflow.com/questions/62969917/how-do-i-fix-unexpected-element-queries-found-in-manifest

 

How Do I Fix "unexpected element found in "?

All of a sudden, I am getting this build error in my Android project: unexpected element found in How do I fix it?

stackoverflow.com

 

유니티의 gradle 버전이 3.4.0 인데 버전이 낮아서 그렇다고 한다.

 

해결

Gradle 버전 3.4.0 -> 3.4.3으로 변경한다.

위의 Grade의 com.android.tools.build:gradle:3.4.0'라고 적혀있는 부분을 com.android.tools.build:gradle:3.4.3'으로 바꿔주고 유니티 빌드를 다시 해보자.

 

위 파일의 경로는 아래와 같다.

/Applications/Unity/Hub/Editor/2019.4.15f1/PlaybackEngines/AndroidPlayer/Tools/GradleTemplates/baseProjectTemplate.gradle



출처: https://ajh322.tistory.com/294 [IT 잡동사니]

 

유니티 안드로이드 빌드 에러 - unexpected element found in

증상 유니티 안드로이드 빌드 시 아래와 같은 에러 /Users/jim/Desktop/workspace/project/project/Temp/gradleOut/launcher/build/intermediates/merged_manifests/release/AndroidManifest.xml:52: AAPT: error:..

ajh322.tistory.com

 

[참조] devgod.tistory.com/33

 

[Unity/Android] unexpected element found in 에러 해결

기존 프로젝트에 광고관련 SDK와 추가 스토어 대응을 하려고 플러그인을 이것저것 넣다보니 위와 같은 에러가 발생했다. 해당 에러는 구글에서 핫픽스가 나와있는 에러이며, 안드로이드 11에 관

devgod.tistory.com

[추가]

- 유니티 엔진 자체 Gradle 파일 위치는 기본 설치 시 아래와 같다.

[Unity 2018] C:\Program Files\Unity\Hub\Editor\2018.4.32f1\Editor\Data\PlaybackEngines\AndroidPlayer\Tools\GradleTemplates\mainTemplate.gradle

[Unity 2019] C:\Program Files\Unity\Hub\Editor\2019.4.22f1\Editor\Data\PlaybackEngines\AndroidPlayer\Tools\GradleTemplates\baseProjectTemplate.gradle

 

- Custom Gradle을 수정하려면 아래 파일에서 수정하자.

[Unity 2018]

1) Player Settings-Publishing Settings-Build-Custom Gradle Template 체크

2) ..\MyProject\Assets\Plugins\Android\mainTemplate.gradle 수정

 

[Unity 2019]

1) Project Settings-Player-Publishing Settings-Build-Custom Base Gradle Template 체크

2) ..\MyProject\Assets\Plugins\Android\baseProjectTemplate.gradle 수정

반응형
Posted by blueasa
, |