유니티에서 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 변경한다.
참고
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
}
댓글 없음:
댓글 쓰기