Closed PURUSHOTHAM-REDDY-N closed 1 year ago
Yea there's a bug somewhere with xml parsing in gradle v7 or something. I had that too, and I think the root cause lies in the cast SDK.
Anyway, here's a quick fix for gradle v7.0. You can remove it when you upgrade to gradle 8. Add this to your "android/gradle.properties" file
android.enableNewResourceShrinker=false
Relevant resources:
it worked @andreasgangso thank you !
@andreasgangso D:\personal-projects\workspace\flutter_my_video\flutter_my_video>flutter build apk --split-per-abi
Font asset "MaterialIcons-Regular.otf" was tree-shaken, reducing it from 1645184 to 1620 bytes (99.9% reduction). Tree-shaking can be disabled by providing the --no-tree-shake-icons flag when building your app.
FAILURE: Build failed with an exception.
What went wrong: Execution failed for task ':app:shrinkReleaseRes'.
Try:
Get more help at https://help.gradle.org
BUILD FAILED in 2m 11s Running Gradle task 'assembleRelease'... 132.9s Gradle task assembleRelease failed with exit code 1
i think the problem is in here mainactivity.kt i copied it from bcc media project mainactivity.kt
package com.example.flutter_video_player
import android.annotation.SuppressLint import android.content.res.Configuration import android.os.Bundle import android.os.PersistableBundle import android.os.StrictMode import android.view.View import android.view.Window import android.widget.FrameLayout import io.flutter.embedding.android.FlutterFragmentActivity import media.bcc.bccm_player.BccmPlayerPlugin import media.bcc.bccm_player.views.FullscreenPlayerView
class MainActivity : FlutterFragmentActivity() {
}