Place the unzipped Gradle file in the following location /Applications/Unity/Hub/Editor/2021.3.12f1/PlaybackEngines/AndroidPlayer/Tools/gradle/ Please note that 2021.3.12f1 is the editor version and should be replaced with your own environment.
Next, open Unity and change the Gradle to be used. From the top menu, select Unity > Preferences and open External Tools.
Uncheck the box marked "Gradle Installed with Unity (recommended)" and enter the path to the Gradle you just placed.
Now the Gradle used for building has been switched to a different version. If there are no problems with the version, you should now be able to build Android.
[Error] Error building Player: Exception: OBSOLETE - Providing Android resources in Assets/Plugins/Android/assets was removed, please move your resources to an AAR or an Android Library. See ""AAR plug-ins and Android Libraries"" section of the Manual for more details.
- 관련 에러 위치 찾아가서 Team Id를 선택하면 잘되긴 하는데, 빌드때마다 수동으로 하기는 애매해서 찾아보니 PodFile에 아래 내용을 추가하면 된다고 한다.
post_install do |installer|
installer.pods_project.targets.each do |target|
if target.respond_to?(:product_type) and target.product_type == "com.apple.product-type.bundle"
target.build_configurations.each do |config|
config.build_settings['CODE_SIGN_IDENTITY'] = ""
#prevent resource bundle from reading image nil
config.build_settings.delete('PRODUCT_BUNDLE_IDENTIFIER')
end
end
end
end
- iOS 빌드해서 PodFile 수작업을 계속할 수는 없는지라 Unity의 Xcode PostProcessBuild에서 자동으로 추가하도록 함.
(Define을 봐서는 Unity2019.3 이상에서만 가능한 것 같다)
#if UNITY_2019_3_OR_NEWER
// FixPodFile 사용법 참조
// https://github.com/googlesamples/unity-jar-resolver/issues/405 : Str4tos 댓글
[PostProcessBuild(45)]//must be between 40 and 50 to ensure that it's not overriden by Podfile generation (40) and that it's added before "pod install" (50)
private static void FixPodFile(BuildTarget buildTarget, string buildPath)
{
/// Stop processing if target is NOT iOS
if (buildTarget != BuildTarget.iOS)
return;
using (StreamWriter sw = File.AppendText(buildPath + "/Podfile"))
{
// [Error 대응] (Xcode 14): Signing for "GoogleSignIn-GoogleSignIn" requires a development team.
// [해결방법 참조] https://github.com/CocoaPods/CocoaPods/issues/11402 : JosephPoplar 댓글
sw.WriteLine("\npost_install do |installer|\n installer.pods_project.targets.each do |target|\n if target.respond_to?(:product_type) and target.product_type == \"com.apple.product-type.bundle\"\n target.build_configurations.each do |config|\n config.build_settings['CODE_SIGN_IDENTITY'] = \"\"\n #prevent resource bundle from reading image nil\n config.build_settings.delete('PRODUCT_BUNDLE_IDENTIFIER')\n end\n end\n end\nend");
/// ex
//sw.WriteLine("\ntarget 'Unity-iPhone' do\nend");
}
}
#endif
[In XCode] Set yes onAlways Embed Swift Standard Librariesin targetUnity-iPhonein Build Settings. Set no onAlways Embed Swift StandardLibraries in targetUnityFrameworkin Build Settings.
This worked for me.
I also had another issue with Unity In App Purchasing that required me to downgrade to version 3.1.0. I think that is an unrelated issue but I'm putting it here just in case. Hope this helps someone
”ITMS-90427: Invalid Swift Support – The expected dylibs are missing from the app’s Framework location, such as /Payload/●●●.app/Frameworks.”とメールが来てました。
どこか設定がわるかったのかもしれません。
結局、Always Embed Swift Standard Librariesの項目を、Unity-iPhone、Unity-iPhoneTest、UnityFrameworkの全てで、”No”にしたところ、全てアップロードまでスムーズに通りました。
[In XCode] Set yes on Always Embed Swift Standard Libraries in target Unity-iPhone in Build Settings. Set no on Always Embed Swift Standard Libraries in target UnityFramework in Build Settings.
ERROR ITMS-90206: "Invalid Bundle. The bundle at 'OOO.app/Frameworks/UnityFramework.framework' contains disallowed file 'Frameworks'."
유니티 프레임워크 에러다!
Xcode 아카이브 이후 Upload시 나타나는 문제.. 해결 방법은 간단하다.
1. 아카이브한 버전 우클릭 2. Show in Finder 3. 뭐 하나 있는데 그거 우클릭! 4. 패키지 내용 보기 4. Products 폴더 이동 5. Applications 폴더 이동 6. 앱 이름으로 된거 우클릭 7. 패키지 내용 보기 8. Frameworks 폴더 이동 9. UnityFramework.framework 폴더 이동 10. Frameworks 폴더 자체 삭제!!