RenderHeads / UnityPlugin-AVProVideo

AVPro Video is a multi-platform Unity plugin for advanced video playback
https://www.renderheads.com/products/avpro-video/
224 stars 27 forks source link

Build fail for my project #1792

Closed chengnay closed 3 months ago

chengnay commented 3 months ago

Please DO NOT LINK / ATTACH YOUR PROJECT FILES HERE

Describe the issue Recently, I updated my Unity project to Wave Plugin 5.6.0-r.10 and it will build fail. After some investigation and I found out that it is due to android.enableDexingArtifactTransform=false in AVProVideo\Editor\Scripts\PostProcessBuild_Android.cs script. I am wondering is this necessary to set it to false? What will happen if I manually change it to true? I did try setting it to true and it will build successfully.

Your Setup (please complete the following information):

To Reproduce

  1. Creating an Unity project that includes Wave Plugin 5.6.0-r.10 and AVPro Video plugin
  2. It will always build fail with error message "java.lang.UnsupportedOperationException: This feature requires ASM7"

Logs If applicable, add error logs to help explain your problem. java.lang.UnsupportedOperationException: This feature requires ASM7

Execution failed for task ':launcher:dexBuilderRelease'.

Multiple task action failures occurred: java.lang.UnsupportedOperationException: This feature requires ASM7 A failure occurred while executing com.android.build.gradle.internal.dexing.DexWorkAction Failed to process: C:\Users\chengnan_yang\Documents\CSharp\2023\1128_VRS\VRS\Temp\gradleOut\unityLibrary\build\intermediates\runtime_library_classes_jar\release\classes.jar A failure occurred while executing com.android.build.gradle.internal.dexing.DexWorkAction Failed to process: C:\Users\chengnan_yang\Documents\CSharp\2023\1128_VRS\VRS\Temp\gradleOut\unityLibrary\build\intermediates\runtime_library_classes_jar\release\classes.jar

Screenshots If applicable, add screenshots to help explain your problem.

Videos If applicable, add a copy of your video or the URL

Please DO NOT LINK / ATTACH YOUR PROJECT FILES HERE

Instead email the link to us unitysupport@renderheads.com

Chris-RH commented 3 months ago

Hi, I presume you're not actually using AVPro Video version 2.0 as that is January 2021, and are in fact using a more up to date version? More info on the dexing issue is here.

chengnay commented 3 months ago

Hi @Chris-RH, It is true that the project is still using AVPro Video version 2.0 as we did not update the plugin since March 2021. We will check out the latest version, thanks!

Chris-RH commented 3 months ago

Yes, please update to the latest version. There have been a lot of fixes and upgrades since then!

chengnay commented 3 months ago

Hi @Chris-RH, It looks like newer version, Ultra Edition 2.9.3 will also build fail. It is required to set "android.enableDexingArtifactTransform=false" for using Unity 2020/2021. Is there any alternative or suggestion?

Chris-RH commented 3 months ago

Can you reproduce this in a fresh project using only AVPro Video? What is the full error message?

chengnay commented 3 months ago

Hi @Chris-RH, As for only AVPro Video without Wave Plugin, it will build success. After import 5.6.0-r.10.1, I will get below build error, image log.txt

Chris-RH commented 3 months ago

So the problem is that it isn't an AVPro specific issue. I suggest you google the error message and follow suggestions.

chengnay commented 3 months ago

After some investigation, when I tried to set android.enableDexingArtifactTransform=true, it will build pass. But, I think this is not allowed, am I right?

By the way, does AVPro Video recommend which gradle version to use? Or just Unity built-in version will be enough? image

Chris-RH commented 3 months ago

if it works without it, then that's fine