flutter_zoom_sdk icon indicating copy to clipboard operation
flutter_zoom_sdk copied to clipboard

Duplicate class found modules exoplayer

Open Achin-verma opened this issue 3 years ago • 31 comments

Hi, I have added your library into my project and I am getting one error in my flutter project.

Please, guide me to fix this error.

* What went wrong:
Execution failed for task ':app:checkDebugDuplicateClasses'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.CheckDuplicatesRunnable
   > Duplicate class com.google.android.exoplayer2.ui.package-info found in modules jetified-exoplayer-common-2.14.1-runtime (com.google.android.exoplayer:exoplayer-common:2.14.1) and jetified-exoplayer-ui-2.12.3-runtime (com.google.android.exoplayer:exoplayer-ui:2.12.3)

     Go to the documentation to learn how to <a href="d.android.com/r/tools/classpath-sync-errors">Fix dependency resolution errors</a>.

pubspec.yaml

version: 1.0.0+1

environment:
  sdk: ">=2.12.0 <3.0.0"

dependencies:
  flutter:
    sdk: flutter

  # The following adds the Cupertino Icons font to your application.
  # Use with the CupertinoIcons class for iOS style icons.
  

  cupertino_icons: ^1.0.2
  shared_preferences: ^2.0.7
  fluttertoast: ^8.0.8
  cached_network_image: ^3.1.0
  intl: ^0.17.0
  smooth_page_indicator: ^1.0.0+2
  dotted_line: ^3.1.0
  flutter_rating_bar: ^4.0.0
  event_bus: ^2.0.0
  dio: ^4.0.4
  connectivity_plus: ^2.0.3
  package_info: ^2.0.2
  device_info: ^2.0.3
  hive: ^2.0.4
  get_it: ^7.2.0
  hive_flutter: ^1.1.0
  ars_progress_dialog: ^0.0.1
  url_launcher: ^6.0.10
  image_picker: ^0.8.4+4
  image_cropper: ^1.4.1
  google_maps_flutter: ^2.1.1
  geocoding: ^2.0.1
  flutter_google_places: ^0.3.0
  google_maps_webservice: ^0.0.19
#  geocoder: ^0.2.1
  dotted_border: ^2.0.0
  flutter_html: ^2.2.0
  flutter_zoom_sdk: ^1.0.0+1


dev_dependencies:
  flutter_test:
    sdk: flutter

Achin-verma avatar Jan 13 '22 11:01 Achin-verma

Hi @evilrat , @mauricioluz , Pls review this error.

Achin-verma avatar Jan 13 '22 11:01 Achin-verma

flutter version Gradle version

ark-brighthustle avatar Jan 13 '22 14:01 ark-brighthustle

Flutter Version

Flutter 2.5.3 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 18116933e7 (3 months ago) • 2021-10-15 10:46:35 -0700
Engine • revision d3ea636dc5
Tools • Dart 2.14.4

Gradle version distributionUrl=https://services.gradle.org/distributions/gradle-6.7-all.zip image

Achin-verma avatar Jan 14 '22 08:01 Achin-verma

Flutter Version

Flutter 2.5.3 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 18116933e7 (3 months ago) • 2021-10-15 10:46:35 -0700
Engine • revision d3ea636dc5
Tools • Dart 2.14.4

Gradle version distributionUrl=https://services.gradle.org/distributions/gradle-6.7-all.zip image

Please provide app level and project level gradle code also

ark-brighthustle avatar Jan 14 '22 09:01 ark-brighthustle

Hi, @evilrat .

Gradle version - app level

**gradle-6.7**
**distributionUrl**=https://services.gradle.org/distributions/gradle-6.7-all.zip
dependencies {
        classpath 'com.android.tools.build:gradle:4.1.0'
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
    }

if anything other thing is required pls, share with me.

Achin-verma avatar Jan 14 '22 09:01 Achin-verma

Go to the documentation to learn how to Fix dependency resolution errors.

please send app level build.gradle code

ark-brighthustle avatar Jan 14 '22 14:01 ark-brighthustle

  1. Go to gradle.properties(project properties)
  2. Add android.enableJetifier=true
  3. And also most of time android.useAndroidX=true is present.Check your gradle.properties(Project Properties) and if it does not exist then add android.useAndroidX=true

If using Android Studio Open Android studio> File > Invalidate Caches/Restart…

ark-brighthustle avatar Jan 14 '22 14:01 ark-brighthustle

fixed it with this. app>>build.gradle

implementation('com.google.android.exoplayer:exoplayer:2.14.1'){ exclude group: 'androidx.core' , module : 'core' exclude group: 'androidx.media' , module : 'media' }

Iam-that-Chic avatar Jan 14 '22 14:01 Iam-that-Chic

fixed it with this. app>>build.gradle

implementation('com.google.android.exoplayer:exoplayer:2.14.1'){ exclude group: 'androidx.core' , module : 'core' exclude group: 'androidx.media' , module : 'media' }

Thanks for solution

ark-brighthustle avatar Jan 14 '22 15:01 ark-brighthustle

Hi @evilrat , @Iam-that-Chic ,

After your above solutions, now i am getting, below error.

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:processDebugResources'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
   > Android resource linking failed
     C:\Users\Signity\.gradle\caches\transforms-2\files-2.1\5bdeb913b55663057b362505eaa9e3af\jetified-mobilertc\res\layout\activity_media_player.xml:7: AAPT: error: attribute fastforward_increment (aka com.app.fitlife:fastforward_increment) not found.

     C:\Users\Signity\.gradle\caches\transforms-2\files-2.1\5bdeb913b55663057b362505eaa9e3af\jetified-mobilertc\res\layout\activity_media_player.xml:7: AAPT: error: attribute rewind_increment (aka com.app.fitlife:rewind_increment) not found.

     C:\Users\Signity\.gradle\caches\transforms-2\files-2.1\5bdeb913b55663057b362505eaa9e3af\jetified-mobilertc\res\layout\zm_content_file_video_viewer.xml:8: AAPT: error: attribute fastforward_increment (aka com.app.fitlife:fastforward_increment) not found.

     C:\Users\Signity\.gradle\caches\transforms-2\files-2.1\5bdeb913b55663057b362505eaa9e3af\jetified-mobilertc\res\layout\zm_content_file_video_viewer.xml:8: AAPT: error: attribute rewind_increment (aka com.app.fitlife:rewind_increment) not found.

Achin-verma avatar Jan 17 '22 04:01 Achin-verma

A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade

add this to your gradle.properties

org.gradle.jvmargs=-Xmx4608m

and also

Open [project_folder]/app/build.gradle and add following lines.

defaultConfig { ...

multiDexEnabled true

}

dependencies { ...

implementation 'com.android.support:multidex:2.0.1'

}

if still the issue not got resolved

classpath "com.android.tools.build:gradle:4.1.3"

try to change gradel version

ark-brighthustle avatar Jan 17 '22 05:01 ark-brighthustle

Hi @evilrat , I have done the above solution but still the same issue.

Android resource linking failed AAPT: error: attribute fastforward_increment (aka com.app.fitlife:fastforward_increment) not found.

* What went wrong:
Execution failed for task ':app:processDebugResources'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
   > Android resource linking failed
     C:\Users\Signity\.gradle\caches\transforms-2\files-2.1\90c83ca42071ce504413c720a7e06ce8\jetified-mobilertc\res\layout\activity_media_player.xml:7: AAPT: error: attribute fastforward_increment (aka com.app.fitlife:fastforward_increment) not found.

     C:\Users\Signity\.gradle\caches\transforms-2\files-2.1\90c83ca42071ce504413c720a7e06ce8\jetified-mobilertc\res\layout\activity_media_player.xml:7: AAPT: error: attribute rewind_increment (aka com.app.fitlife:rewind_increment) not found.

     C:\Users\Signity\.gradle\caches\transforms-2\files-2.1\90c83ca42071ce504413c720a7e06ce8\jetified-mobilertc\res\layout\zm_content_file_video_viewer.xml:8: AAPT: error: attribute fastforward_increment (aka com.app.fitlife:fastforward_increment) not found.

     C:\Users\Signity\.gradle\caches\transforms-2\files-2.1\90c83ca42071ce504413c720a7e06ce8\jetified-mobilertc\res\layout\zm_content_file_video_viewer.xml:8: AAPT: error: attribute rewind_increment (aka com.app.fitlife:rewind_increment) not found.

image

image

image

image

Achin-verma avatar Jan 17 '22 05:01 Achin-verma

Hi, I had the same issue:

  • What went wrong: Execution failed for task ':app:processDebugResources'.

A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade Android resource linking failed C:\Users\Medo Kadem.gradle\caches\transforms-2\files-2.1\0b9408005e0d570e3fd780fa07da2ddf\jetified-mobilertc\res\layout\activity_media_player.xml:7: AAPT: error: attribute fastforward_increment (aka com.Kun.Kun:fastforward_increment) not found.

 C:\Users\Medo Kadem\.gradle\caches\transforms-2\files-2.1\0b9408005e0d570e3fd780fa07da2ddf\jetified-mobilertc\res\layout\activity_media_player.xml:7: AAPT: error: attribute rewind_increment (aka com.Kun.Kun:rewind_increment) not found.

 C:\Users\Medo Kadem\.gradle\caches\transforms-2\files-2.1\0b9408005e0d570e3fd780fa07da2ddf\jetified-mobilertc\res\layout\zm_content_file_video_viewer.xml:8: AAPT: error: attribute fastforward_increment (aka com.Kun.Kun:fastforward_increment) not found.

 C:\Users\Medo Kadem\.gradle\caches\transforms-2\files-2.1\0b9408005e0d570e3fd780fa07da2ddf\jetified-mobilertc\res\layout\zm_content_file_video_viewer.xml:8: AAPT: error: attribute rewind_increment (aka com.Kun.Kun:rewind_increment) not found.

I think the problem got from exoplayer version: The functions app:fastforward_increment & app:rewind_increment were removed in the version 2.15.0 and replaced by setSeekBackIncrementMs and setSeekForwardIncrementMs in SimpleExoPlayer.Builder. So instead of changing this value in xml file, now you have to change it programatically.

medokadem avatar Jan 17 '22 06:01 medokadem

ok, @medokadem, any idea how to fix this issue?

Achin-verma avatar Jan 17 '22 07:01 Achin-verma

Hi, I have better_player in my project, which is also using exp player, with a different version. This is the issue

image

Achin-verma avatar Jan 17 '22 07:01 Achin-verma

Hi, I have better_player in my project, which is also using exp player, with a different version. This is the issue

image

did u tried to upgrade better player to latest

ark-brighthustle avatar Jan 17 '22 08:01 ark-brighthustle

fixed it with this. app>>build.gradle

implementation('com.google.android.exoplayer:exoplayer:2.14.1'){ exclude group: 'androidx.core' , module : 'core' exclude group: 'androidx.media' , module : 'media' }

100% working solution thanks @Iam-that-Chic

waqas-alii avatar Feb 28 '22 08:02 waqas-alii

Hi @evilrat , @Iam-that-Chic ,

After your above solutions, now i am getting, below error.

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:processDebugResources'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
   > Android resource linking failed
     C:\Users\Signity\.gradle\caches\transforms-2\files-2.1\5bdeb913b55663057b362505eaa9e3af\jetified-mobilertc\res\layout\activity_media_player.xml:7: AAPT: error: attribute fastforward_increment (aka com.app.fitlife:fastforward_increment) not found.

     C:\Users\Signity\.gradle\caches\transforms-2\files-2.1\5bdeb913b55663057b362505eaa9e3af\jetified-mobilertc\res\layout\activity_media_player.xml:7: AAPT: error: attribute rewind_increment (aka com.app.fitlife:rewind_increment) not found.

     C:\Users\Signity\.gradle\caches\transforms-2\files-2.1\5bdeb913b55663057b362505eaa9e3af\jetified-mobilertc\res\layout\zm_content_file_video_viewer.xml:8: AAPT: error: attribute fastforward_increment (aka com.app.fitlife:fastforward_increment) not found.

     C:\Users\Signity\.gradle\caches\transforms-2\files-2.1\5bdeb913b55663057b362505eaa9e3af\jetified-mobilertc\res\layout\zm_content_file_video_viewer.xml:8: AAPT: error: attribute rewind_increment (aka com.app.fitlife:rewind_increment) not found.

Hello I also found this issue, can anyone help ?

tffajari avatar Apr 06 '22 03:04 tffajari

Hi @tffajari , I am also getting the same.

Achin-verma avatar Apr 06 '22 03:04 Achin-verma

actually this is due to other plugin as zoom uses lower version of exoplayer

implementation('com.google.android.exoplayer:exoplayer:2.14.1'){ exclude group: 'androidx.core' , module : 'core' exclude group: 'androidx.media' , module : 'media' }

try this .....

ark-brighthustle avatar Apr 07 '22 06:04 ark-brighthustle

implementation('com.google.android.exoplayer:exoplayer:2.14.1'){ exclude group: 'androidx.core' , module : 'core' exclude group: 'androidx.media' , module : 'media' }

`* What went wrong: Execution failed for task ':app:processDebugResources'.

A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade Android resource linking failed C:\Users\tffaj.gradle\caches\transforms-2\files-2.1\68a393e9b8b592df276f94f20748269d\jetified-mobilertc\res\layout\activity_media_player.xml:7: AAPT: error: attribute fastforward_increment (aka com.bead.discipleship:fastforward_increment) not found.

 C:\Users\tffaj\.gradle\caches\transforms-2\files-2.1\68a393e9b8b592df276f94f20748269d\jetified-mobilertc\res\layout\activity_media_player.xml:7: AAPT: error: attribute rewind_increment (aka com.bead.discipleship:rewind_increment) not found.

 C:\Users\tffaj\.gradle\caches\transforms-2\files-2.1\68a393e9b8b592df276f94f20748269d\jetified-mobilertc\res\layout\zm_content_file_video_viewer.xml:8: AAPT: error: attribute fastforward_increment (aka com.bead.discipleship:fastforward_increment) not found.

 C:\Users\tffaj\.gradle\caches\transforms-2\files-2.1\68a393e9b8b592df276f94f20748269d\jetified-mobilertc\res\layout\zm_content_file_video_viewer.xml:8: AAPT: error: attribute rewind_increment (aka com.bead.discipleship:rewind_increment) not found.`

I got the new error here? can someone explain what the error is?

tffajari avatar Apr 08 '22 07:04 tffajari

@tffajari im also getting this same error, did you figure it out?

Ajay9o9 avatar Apr 12 '22 06:04 Ajay9o9

@evilrat can you please update zoom sdk to use the latest version of exoplayer because specifying exoplyer version to (2.14.1) causing errors with other packages who are also using exoplayer.

waqas-alii avatar May 30 '22 15:05 waqas-alii

Same issue here

AhmedAbouelkher avatar Oct 04 '22 09:10 AhmedAbouelkher

actually this is due to other plugin as zoom uses lower version of exoplayer

implementation('com.google.android.exoplayer:exoplayer:2.14.1'){ exclude group: 'androidx.core' , module : 'core' exclude group: 'androidx.media' , module : 'media' }

try this .....

This is the problem after I tried to try.

A failure occurred while executing com.android.build.gradle.internal.tasks.CheckDuplicatesRunnable Duplicate class com.google.android.exoplayer2.ui.DownloadNotificationHelper found in modules jetified-exoplayer-core-2.17.1-runtime (com.google.android.exoplayer:exoplayer-core:2.17.1) and jetified-exoplayer-ui-2.14.1-runtime (com.google.android.exoplayer:exoplayer-ui:2.14.1)

Can someone help me?

kheson77 avatar Oct 17 '22 04:10 kheson77

I think the developer has given up on this package.

I fixed all its issues (with android) and pushed a new package (not yet released, but can be used) here AhmedAbouelkher/flutter_zoon_sdk

There are some rough edges but they can be solved.

AhmedAbouelkher avatar Oct 18 '22 17:10 AhmedAbouelkher

I think the developer has given up on this package.

I fixed all its issues (with android) and pushed a new package (not yet released, but can be used) here AhmedAbouelkher/flutter_zoon_sdk

There are some rough edges but they can be solved.

How to use this?

sdkysfzai avatar Oct 28 '22 20:10 sdkysfzai

I think the developer has given up on this package. I fixed all its issues (with android) and pushed a new package (not yet released, but can be used) here AhmedAbouelkher/flutter_zoon_sdk There are some rough edges but they can be solved.

How to use this?

  flutter_zoom_sdk:
    git: https://github.com/AhmedAbouelkher/flutter_zoon_sdk

AhmedAbouelkher avatar Oct 28 '22 22:10 AhmedAbouelkher

This is not working for me. "flutter pub run flutter_zoom_sdk:unzip_zoom_sdk" running this gives error `Unhandled exception: Crash when compiling null, at character offset null: Null check operator used on a null value #0 InferableTypeBuilderMixin.type (package:front_end/src/fasta/builder/type_builder.dart:392:29) #1 InferableTypeBuilder.inferType (package:front_end/src/fasta/builder/omitted_type_builder.dart:155:12) #2 SourceLoader.performTopLevelInference (package:front_end/src/fasta/source/source_loader.dart:2358:19) #3 KernelTarget.buildOutlines. (package:front_end/src/fasta/kernel/kernel_target.dart:532:14) #4 withCrashReporting (package:front_end/src/fasta/crash.dart:122:12) #5 IncrementalCompiler.computeDelta. (package:front_end/src/fasta/incremental_compiler.dart:407:33) #6 IncrementalCompiler.compile (package:vm/incremental_compiler.dart:68:50) #7 FrontendCompiler.compile (package:frontend_server/frontend_server.dart:572:11) #8 listenAndCompile. (package:frontend_server/frontend_server.dart:1210:11)

#0 InferableTypeBuilderMixin.type (package:front_end/src/fasta/builder/type_builder.dart:392:29) #1 InferableTypeBuilder.inferType (package:front_end/src/fasta/builder/omitted_type_builder.dart:155:12) #2 SourceLoader.performTopLevelInference (package:front_end/src/fasta/source/source_loader.dart:2358:19) #3 KernelTarget.buildOutlines. (package:front_end/src/fasta/kernel/kernel_target.dart:532:14) #4 withCrashReporting (package:front_end/src/fasta/crash.dart:122:12) #5 IncrementalCompiler.computeDelta. (package:front_end/src/fasta/incremental_compiler.dart:407:33) #6 IncrementalCompiler.compile (package:vm/incremental_compiler.dart:68:50) #7 FrontendCompiler.compile (package:frontend_server/frontend_server.dart:572:11) #8 listenAndCompile. (package:frontend_server/frontend_server.dart:1210:11) Cannot rename file to '..dart_tool/pub\bin\flutter_zoom_sdk\unzip_zoom_sdk.dart-2.18.0.snapshot', path = '..dart_tool/pub\incremental\flutter_zoom_sdk\tmp2fbc8d0a\unzip_zoom_sdk.dart.incremental.dill.incremental.dill' (OS Error: The system cannot find the file specified.
, errno = 2)`

sdkysfzai avatar Oct 29 '22 09:10 sdkysfzai

fixed it with this. app>>build.gradle implementation('com.google.android.exoplayer:exoplayer:2.14.1'){ exclude group: 'androidx.core' , module : 'core' exclude group: 'androidx.media' , module : 'media' }

100% working solution thanks @Iam-that-Chic @WaqasAli-Dev

can anybody tell me where exactly in build.gradle to put this 3 lines @WaqasAli-Dev

OracleYT avatar Jun 27 '23 14:06 OracleYT