a914-gowtham / android-video-trimmer

Helps to trim local videos with compress option on Android applications using Exoplayer 2 and FFmpeg.
Other
362 stars 115 forks source link

Linking error when adding the library #86

Open aruns911 opened 1 year ago

aruns911 commented 1 year ago

When I add the line: implementation 'com.github.a914-gowtham:android-video-trimmer:1.7.3' and maven { url 'https://jitpack.io' }

I get the error: AAPT: error: resource style/Widget.Support.CoordinatorLayout not found. error: failed linking references.

The implementation line is the issue.

A google search brings up the following answer on StackOverflow: https://stackoverflow.com/questions/52566567/resource-style-widget-design-coordinatorlayout-not-found-after-updating-to-api-2

I searched my code, but it does'nt have the phrase Widget.Support.CoordinatorLayout. I'm starting from the google sample library: https://github.com/googlesamples/mlkit/

I cloned it and added in your library. At some date I'd like to add in a camera button, trim it and then continue from there.

Update: I copied com.gowtham into a separate directory. I imported the module into the google sample project. I added a camera button on the front screen. It now crashes the app inside this code: //Java ActivityResultLauncher startForResult = registerForActivityResult( new ActivityResultContracts.StartActivityForResult(), result -> { if (result.getResultCode() == Activity.RESULT_OK && result.getData() != null) { Uri uri = Uri.parse(TrimVideo.getTrimmedVideoPath(result.getData())); Log.d(TAG, "Trimmed path:: " + uri);

            } else
                LogMessage.v("videoTrimResultLauncher data is null");
        });

I tried to ensure the libraries are the same version. Still same issue.

chummy-ch commented 1 year ago

@aruns911 Have you solved this issue ?

MohamedMedhat-Robusta commented 1 year ago

I added the CoordinatorLayout dependency in my build.gradle file and the project built successfully

implementation("androidx.coordinatorlayout:coordinatorlayout:1.2.0")