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

Avpro mobile not create android build in unity #1842

Closed WebBusiness2019 closed 1 month ago

WebBusiness2019 commented 1 month ago

Describe the issue i am gating this error while building android apk and i have also configured compileSdkVersion 33 minSdkVersion 22 targetSdkVersion 32 and also have android 33 in editor folder but still i can not able build android apk and i am using firebase with it to play video in avpro and i try this also android.suppressUnsupportedCompileSdk=33 as mention in log when i do this i get duplicate cass error

Your Setup (please complete the following information):

Logs Starting a Gradle Daemon, 1 incompatible Daemon could not be reused, use --status for details WARNING:We recommend using a newer Android Gradle plugin to use compileSdk = 33

This Android Gradle plugin (7.1.2) was tested up to compileSdk = 32

This warning can be suppressed by adding android.suppressUnsupportedCompileSdk=33 to this project's gradle.properties

The build will continue, but you are strongly encouraged to update your project to use a newer Android Gradle Plugin that has been tested with compileSdk = 33

Task :launcher:preBuild UP-TO-DATE Task :unityLibrary:preBuild UP-TO-DATE Task :unityLibrary:xrmanifest.androidlib:preBuild UP-TO-DATE Task :unityLibrary:FirebaseApp.androidlib:preBuild UP-TO-DATE Task :unityLibrary:xrmanifest.androidlib:preDebugBuild UP-TO-DATE Task :unityLibrary:preDebugBuild UP-TO-DATE Task :launcher:preDebugBuild UP-TO-DATE Task :unityLibrary:FirebaseApp.androidlib:preDebugBuild UP-TO-DATE Task :unityLibrary:FirebaseApp.androidlib:compileDebugAidl NO-SOURCE Task :unityLibrary:packageDebugRenderscript NO-SOURCE Task :launcher:mergeDebugNativeDebugMetadata NO-SOURCE Task :unityLibrary:xrmanifest.androidlib:compileDebugAidl NO-SOURCE Task :unityLibrary:writeDebugAarMetadata UP-TO-DATE Task :launcher:generateDebugBuildConfig UP-TO-DATE Task :unityLibrary:xrmanifest.androidlib:writeDebugAarMetadata UP-TO-DATE Task :unityLibrary:FirebaseApp.androidlib:writeDebugAarMetadata UP-TO-DATE Task :unityLibrary:FirebaseApp.androidlib:packageDebugRenderscript NO-SOURCE Task :unityLibrary:compileDebugAidl NO-SOURCE Task :launcher:compileDebugRenderscript NO-SOURCE Task :unityLibrary:xrmanifest.androidlib:packageDebugRenderscript NO-SOURCE Task :unityLibrary:FirebaseApp.androidlib:compileDebugRenderscript NO-SOURCE Task :unityLibrary:xrmanifest.androidlib:compileDebugRenderscript NO-SOURCE Task :launcher:compileDebugAidl NO-SOURCE Task :unityLibrary:compileDebugRenderscript NO-SOURCE Task :unityLibrary:FirebaseApp.androidlib:generateDebugResValues UP-TO-DATE Task :unityLibrary:xrmanifest.androidlib:generateDebugResValues UP-TO-DATE Task :unityLibrary:FirebaseApp.androidlib:generateDebugResources UP-TO-DATE Task :unityLibrary:xrmanifest.androidlib:generateDebugResources UP-TO-DATE Task :unityLibrary:generateDebugResValues UP-TO-DATE Task :unityLibrary:generateDebugResources UP-TO-DATE Task :launcher:javaPreCompileDebug UP-TO-DATE Task :unityLibrary:xrmanifest.androidlib:packageDebugResources UP-TO-DATE Task :unityLibrary:FirebaseApp.androidlib:packageDebugResources UP-TO-DATE Task :unityLibrary:packageDebugResources UP-TO-DATE Task :unityLibrary:xrmanifest.androidlib:extractDeepLinksDebug UP-TO-DATE Task :unityLibrary:FirebaseApp.androidlib:extractDeepLinksDebug UP-TO-DATE Task :unityLibrary:extractDeepLinksDebug UP-TO-DATE Task :unityLibrary:processDebugManifest UP-TO-DATE Task :unityLibrary:xrmanifest.androidlib:processDebugManifest UP-TO-DATE Task :unityLibrary:FirebaseApp.androidlib:processDebugManifest UP-TO-DATE Task :unityLibrary:compileDebugLibraryResources UP-TO-DATE Task :unityLibrary:FirebaseApp.androidlib:parseDebugLocalResources UP-TO-DATE Task :unityLibrary:xrmanifest.androidlib:parseDebugLocalResources UP-TO-DATE Task :unityLibrary:parseDebugLocalResources UP-TO-DATE Task :unityLibrary:generateDebugBuildConfig UP-TO-DATE Task :unityLibrary:javaPreCompileDebug UP-TO-DATE Task :unityLibrary:mergeDebugShaders UP-TO-DATE Task :unityLibrary:xrmanifest.androidlib:generateDebugRFile UP-TO-DATE Task :unityLibrary:FirebaseApp.androidlib:generateDebugRFile UP-TO-DATE Task :unityLibrary:compileDebugShaders NO-SOURCE Task :unityLibrary:xrmanifest.androidlib:compileDebugLibraryResources UP-TO-DATE Task :unityLibrary:FirebaseApp.androidlib:compileDebugLibraryResources UP-TO-DATE Task :unityLibrary:xrmanifest.androidlib:generateDebugBuildConfig UP-TO-DATE Task :unityLibrary:FirebaseApp.androidlib:generateDebugBuildConfig UP-TO-DATE Task :unityLibrary:xrmanifest.androidlib:javaPreCompileDebug UP-TO-DATE Task :unityLibrary:FirebaseApp.androidlib:javaPreCompileDebug UP-TO-DATE Task :unityLibrary:FirebaseApp.androidlib:compileDebugJavaWithJavac UP-TO-DATE Task :unityLibrary:xrmanifest.androidlib:compileDebugJavaWithJavac UP-TO-DATE Task :unityLibrary:xrmanifest.androidlib:bundleLibCompileToJarDebug UP-TO-DATE Task :unityLibrary:FirebaseApp.androidlib:bundleLibCompileToJarDebug UP-TO-DATE Task :unityLibrary:FirebaseApp.androidlib:mergeDebugShaders UP-TO-DATE Task :unityLibrary:xrmanifest.androidlib:mergeDebugShaders UP-TO-DATE Task :unityLibrary:FirebaseApp.androidlib:compileDebugShaders NO-SOURCE Task :unityLibrary:FirebaseApp.androidlib:generateDebugAssets UP-TO-DATE Task :unityLibrary:xrmanifest.androidlib:compileDebugShaders NO-SOURCE Task :unityLibrary:xrmanifest.androidlib:generateDebugAssets UP-TO-DATE Task :unityLibrary:xrmanifest.androidlib:packageDebugAssets UP-TO-DATE Task :unityLibrary:FirebaseApp.androidlib:packageDebugAssets UP-TO-DATE Task :unityLibrary:FirebaseApp.androidlib:processDebugJavaRes NO-SOURCE Task :unityLibrary:xrmanifest.androidlib:processDebugJavaRes NO-SOURCE Task :unityLibrary:FirebaseApp.androidlib:bundleLibResDebug NO-SOURCE Task :unityLibrary:xrmanifest.androidlib:bundleLibResDebug NO-SOURCE Task :unityLibrary:xrmanifest.androidlib:bundleLibRuntimeToJarDebug UP-TO-DATE Task :unityLibrary:FirebaseApp.androidlib:bundleLibRuntimeToJarDebug UP-TO-DATE Task :unityLibrary:xrmanifest.androidlib:mergeDebugJniLibFolders UP-TO-DATE Task :unityLibrary:FirebaseApp.androidlib:mergeDebugJniLibFolders UP-TO-DATE Task :unityLibrary:xrmanifest.androidlib:mergeDebugNativeLibs NO-SOURCE Task :unityLibrary:FirebaseApp.androidlib:mergeDebugNativeLibs NO-SOURCE Task :unityLibrary:xrmanifest.androidlib:copyDebugJniLibsProjectOnly UP-TO-DATE Task :unityLibrary:FirebaseApp.androidlib:copyDebugJniLibsProjectOnly UP-TO-DATE Task :launcher:checkDebugAarMetadata UP-TO-DATE Task :unityLibrary:generateDebugRFile UP-TO-DATE Task :launcher:generateDebugResValues UP-TO-DATE Task :launcher:generateDebugResources UP-TO-DATE Task :unityLibrary:compileDebugJavaWithJavac UP-TO-DATE Task :unityLibrary:bundleLibCompileToJarDebug UP-TO-DATE Task :unityLibrary:generateDebugAssets UP-TO-DATE Task :launcher:mergeDebugResources UP-TO-DATE Task :launcher:createDebugCompatibleScreenManifests UP-TO-DATE Task :launcher:extractDeepLinksDebug UP-TO-DATE Task :launcher:processDebugMainManifest UP-TO-DATE Task :launcher:processDebugManifest UP-TO-DATE Task :launcher:processDebugManifestForPackage UP-TO-DATE Task :unityLibrary:packageDebugAssets Task :unityLibrary:processDebugJavaRes UP-TO-DATE Task :unityLibrary:bundleLibResDebug UP-TO-DATE Task :unityLibrary:bundleLibRuntimeToJarDebug UP-TO-DATE Task :launcher:processDebugResources UP-TO-DATE Task :launcher:compileDebugJavaWithJavac UP-TO-DATE Task :launcher:mergeDebugShaders UP-TO-DATE Task :launcher:compileDebugShaders NO-SOURCE Task :launcher:generateDebugAssets UP-TO-DATE Task :unityLibrary:mergeDebugJniLibFolders Task :launcher:mergeDebugAssets Task :launcher:processDebugJavaRes NO-SOURCE Task :launcher:compressDebugAssets Task :launcher:mergeDebugJavaResource UP-TO-DATE Task :launcher:checkDebugDuplicateClasses FAILED Task :launcher:dexBuilderDebug UP-TO-DATE Task :unityLibrary:mergeDebugNativeLibs 71 actionable tasks: 6 executed, 65 up-to-date

Screenshots Setup-1 Setup-2 Setup-3

WebBusiness2019 commented 1 month ago

if i remove avpro package from unity build completed successdully and run all the things in app but while importing avpro in unity its only work in editor mode and give error while creating an android build

Chris-RH commented 1 month ago

I'm not seeing any AVPro errors in that log. If its to do with guava libraries, then look for the solutions here: https://github.com/RenderHeads/UnityPlugin-AVProVideo/issues/1525

WebBusiness2019 commented 1 month ago

But when I remove package from the unity my app work correctly and there is not problem with avpro it's work fine in editor mode but when you going to create build it's showing error that requires compile SDK version 33 and I have already done required step to solve this error in plugin folder

On Tue, May 7, 2024, 2:24 PM Chris-RH @.***> wrote:

I'm not seeing any AVPro errors in that log.

— Reply to this email directly, view it on GitHub https://github.com/RenderHeads/UnityPlugin-AVProVideo/issues/1842#issuecomment-2097788453, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMFOPSP4ONRLOUOFZAUBEBLZBCJF5AVCNFSM6AAAAABHGT4ATKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAOJXG44DQNBVGM . You are receiving this because you authored the thread.Message ID: @.***>

Chris-RH commented 1 month ago

Have you tried upgrading your gradle to a more recent version?

WebBusiness2019 commented 1 month ago

No I am using inbuilt unity gargle.... I have to download upgraded gradle and have to add gradle externally in unity?

Is there any related documentation available?

On Tue, May 7, 2024, 3:14 PM Chris-RH @.***> wrote:

Have you tried upgrading your gradle to a more recent version?

— Reply to this email directly, view it on GitHub https://github.com/RenderHeads/UnityPlugin-AVProVideo/issues/1842#issuecomment-2097889068, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMFOPSMJGEGRITZ4S3JFJOTZBCO7VAVCNFSM6AAAAABHGT4ATKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAOJXHA4DSMBWHA . You are receiving this because you authored the thread.Message ID: @.***>

Chris-RH commented 1 month ago

You've still not shown me exactly what the error is that you are getting. Please can you click on the error line "Task :launcher:checkDebugDuplicateClasses FAILED" and paste the results.

WebBusiness2019 commented 1 month ago

On Wed, May 8, 2024 at 1:48 PM Chris-RH @.***> wrote:

You've still not shown me exactly what the error is that you are getting. Please can you click on the error line "Task :launcher:checkDebugDuplicateClasses FAILED" and paste the results.

— Reply to this email directly, view it on GitHub https://github.com/RenderHeads/UnityPlugin-AVProVideo/issues/1842#issuecomment-2100014401, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMFOPSNEXUATU2LKOHI4FJDZBHNVBAVCNFSM6AAAAABHGT4ATKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMBQGAYTINBQGE . You are receiving this because you authored the thread.Message ID: @.***>

Chris-RH commented 1 month ago

Unfortunately that is guava library error that occurs when you have more than one asset requiring guava libraries. Its not specific to AVPro (In fact the library is required by Exoplayer, not our asset).

Obviously in this case you would need to use jetified-guava-31.1-android in your gradle to correct it.

https://github.com/firebase/firebase-android-sdk/issues/1320 https://github.com/firebase/firebase-android-sdk/issues/1575 https://stackoverflow.com/questions/56639529/duplicate-class-com-google-common-util-concurrent-listenablefuture-found-in-modu https://gist.github.com/caseykulm/8f229ef3d89dec02780ea880129bc75d

WebBusiness2019 commented 1 month ago

Thank you for your response....

But when I remove avpro package then why my project able to create build? If your package is not using that package can you clear me that....

Is there any other ways to solve this error... With our upgrade or changing default unity gradle

On Wed, May 8, 2024, 6:24 PM Chris-RH @.***> wrote:

Unfortunately that is guava library error that occurs when you have more than one asset requiring guava libraries. Its not specific to AVPro (In fact the library is required by Exoplayer, not our asset).

Obviously in this case you would need to use jetified-guava-31.1-android in your gradle to correct it.

firebase/firebase-android-sdk#1320 https://github.com/firebase/firebase-android-sdk/issues/1320 firebase/firebase-android-sdk#1575 https://github.com/firebase/firebase-android-sdk/issues/1575

https://stackoverflow.com/questions/56639529/duplicate-class-com-google-common-util-concurrent-listenablefuture-found-in-modu https://gist.github.com/caseykulm/8f229ef3d89dec02780ea880129bc75d

— Reply to this email directly, view it on GitHub https://github.com/RenderHeads/UnityPlugin-AVProVideo/issues/1842#issuecomment-2100514288, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMFOPSPJ3X5BFE4K6DPECMLZBIOBHAVCNFSM6AAAAABHGT4ATKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMBQGUYTIMRYHA . You are receiving this because you authored the thread.Message ID: @.***>

Chris-RH commented 1 month ago

Its because both Exoplayer (in AVPro) and Firebase use guava libraries, so if you remove one of them then there will not be any conflicts and will build properly.

There are solutions listed in those links that I have posted.

WebBusiness2019 commented 1 month ago

Thank you for your reply sir, I'll check them out.

On Wed, May 8, 2024, 7:02 PM Chris-RH @.***> wrote:

Its because both Exoplayer (in AVPro) and Firebase use guava libraries, so if you remove one of them then there will not be any conflicts and will build properly.

There are solutions listed in those links that I have posted.

— Reply to this email directly, view it on GitHub https://github.com/RenderHeads/UnityPlugin-AVProVideo/issues/1842#issuecomment-2100586239, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMFOPSLGSC6SEBPCSRQXVBTZBISOXAVCNFSM6AAAAABHGT4ATKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMBQGU4DMMRTHE . You are receiving this because you authored the thread.Message ID: @.***>

WebBusiness2019 commented 1 month ago

Sorry again I need one more favour from you can you give me that link that you are mentioned bcoz I search to many things on internet but I not get any related that you mentioned

On Wed, May 8, 2024, 7:02 PM Chris-RH @.***> wrote:

Its because both Exoplayer (in AVPro) and Firebase use guava libraries, so if you remove one of them then there will not be any conflicts and will build properly.

There are solutions listed in those links that I have posted.

— Reply to this email directly, view it on GitHub https://github.com/RenderHeads/UnityPlugin-AVProVideo/issues/1842#issuecomment-2100586239, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMFOPSLGSC6SEBPCSRQXVBTZBISOXAVCNFSM6AAAAABHGT4ATKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMBQGU4DMMRTHE . You are receiving this because you authored the thread.Message ID: @.***>

Chris-RH commented 1 month ago

https://github.com/firebase/firebase-android-sdk/issues/1320 https://github.com/firebase/firebase-android-sdk/issues/1575 https://stackoverflow.com/questions/56639529/duplicate-class-com-google-common-util-concurrent-listenablefuture-found-in-modu https://gist.github.com/caseykulm/8f229ef3d89dec02780ea880129bc75d

but in your case you will need to change it to jetified-guava-31.1-android

LILQK commented 1 month ago

I dont know if this will help but I found a solution for my case: justo removed the the guava file from the avpro files. and added this line on the dependencies in the mainTemplate.gradle: implementation 'com.google.guava:guava:33.2.0-jre' I hope this helps

Chris-RH commented 1 month ago

It does seem that different methods work for different setups.