0 votes
in 中文区(Chinese) by (220 points)

按照Pico Unity Integration SDK的文档,配置好了开发环境,在XR-Plug-in Management中先不勾选"PicoXR",可以打包成功,APK可以成功被部署到Pico Neo3。但是勾选"PicoXR"之后,打包失败,关键报错信息如下:

  1. Deprecated Gradle features were used in this build, making it incompatible with Gradle 6.0.

    • What went wrong:
      Execution failed for task ':launcher:processReleaseResources'.
      > Android resource linking failed
      G:\project\myself\unity\PicoUnityIntegrationSdkTest2\Temp\gradleOut\launcher\build\intermediates\merged_manifests\release\AndroidManifest.xml:39: AAPT: error: attribute android:requestLegacyExternalStorage not found.

    error: failed processing manifest.

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org

请问如何解决?

1 Answer

0 votes
by (3.9k points)

这报错就是字面意思,Gradle的版本低了,去官网下一个新一点的版本应该就能解决了。或者unity下载编译器的时候把自带的安卓环境也安装上,我这untiy2020.3.33用自带的安卓环境Gradle6.1.1打包是ok的。

by (220 points)

把Gradle版本升为7.1之后,又出现如下报错:
FAILURE: Build failed with an exception.

  • What went wrong:
    A problem was found with the configuration of task ':unityLibrary:checkReleaseManifest' (type 'CheckManifest').

    • In plugin 'com.android.build.gradle.api.AndroidBasePlugin' type 'com.android.build.gradle.internal.tasks.CheckManifest' property 'manifest' has @Input annotation used on property of type 'File'.

    Reason: A property of type 'File' annotated with @Input cannot determine how to interpret the file.

    Possible solutions:

    1. Annotate with @InputFile for regular files.
    2. Annotate with @InputDirectory for directories.
    3. If you want to track the path, return File.absolutePath as a String and keep @Input.
      本人不是做安卓出身,这些东西看不太懂,麻烦多多指教!
...