我正在Unity上为Android手机开发游戏。我最近更新了我的facebook SDK,由于在构建应用程序时出现合并冲突,这是由于Play服务解析器必须将额外的库添加到项目中而导致的,因此我必须编辑Gradle.properties文件,如下所示。
org.gradle.jvmargs=-Xmx4096M
android.useAndroidX=true
android.enableJetifier=true
我这样做主要是因为某些支持库是合并冲突的原因。但是现在我继续收到以下错误,并且我不知道如何解决。我已经尝试过多次导入SDK,但是仍然遇到相同的问题。我也曾尝试在Unity论坛上提问,但尚未收到任何回复。任何帮助将不胜感激。
* What went wrong:
Execution failed for task ':preReleaseBuild'.
> Could not resolve all files for configuration ':releaseCompileClasspath'.
> Failed to transform artifact 'com.android.support.support-v4-27.0.2.aar (:com.android.support.support-v4-27.0.2:)' to match attributes {artifactType=android-manifest}
> Execution failed for JetifyTransform: D:\Unity\Projects\Mzito-NewBG\2017.3\Mzito - Unity 2018.1.2f1 - GameTrove\Mzito\Temp\gradleOut\libs\com.android.support.support-v4-27.0.2.aar.
> Failed to transform 'D:\Unity\Projects\Mzito-NewBG\2017.3\Mzito - Unity 2018.1.2f1 - GameTrove\Mzito\Temp\gradleOut\libs\com.android.support.support-v4-27.0.2.aar' using Jetifier. Reason: The given artifact contains a string literal with a package reference 'android.support.v4' that cannot be safely rewritten. Libraries using reflection such as annotation processors need to be updated manually to add support for androidx.. (Run with --stacktrace for more details.)