jhomlala / betterplayer

Better video player for Flutter, with multiple configuration options. Solving typical use cases!
Apache License 2.0
932 stars 1.04k forks source link

[BUG] No namespace in build.gradle file #1221

Open AliYar-Khan opened 1 year ago

AliYar-Khan commented 1 year ago

History check Yes i have checked the history and nothing solves my problem Describe the bug A clear and concise description of what the bug is. I am not able to run the app it says: Could not create an instance of type com.android.build.api.variant.impl.LibraryVariantBuilderImpl.

Namespace not specified. Please specify a namespace in the module's build.gradle file like so: To Reproduce Steps to reproduce the behavior:

  1. create a new app with flutter latest stable
  2. add better player 0.0.83 version
  3. run the app
  4. See error

*Example code Paste here your minimal reproducible code. This code should be ready to copy-paste-run.

Expected behavior A clear and concise description of what you expected to happen. A running flutter app with better_player latest version Screenshots If applicable, add screenshots to help explain your problem.

Flutter doctor Please add flutter doctor output here. Doctor summary (to see all details, run flutter doctor -v): [√] Flutter (Channel stable, 3.10.4, on Microsoft Windows [Version 10.0.19045.2965], locale en-US) [√] Windows Version (Installed version of Windows is version 10 or higher) [√] Android toolchain - develop for Android devices (Android SDK version 33.0.1) [√] Chrome - develop for the web [√] Visual Studio - develop for Windows (Visual Studio Build Tools 2022 17.4.4) [√] Android Studio (version 2022.2) [√] VS Code (version 1.79.0) [√] Connected device (4 available) [√] Network resources

• No issues found! Better Player version

Smartphone (please complete the following information):

Additional context Add any other context about the problem here. A problem occurred configuring project ':better_player'.

Could not create an instance of type com.android.build.api.variant.impl.LibraryVariantBuilderImpl. Namespace not specified. Please specify a namespace in the module's build.gradle file like so:

android { namespace 'com.example.namespace' }

If the package attribute is specified in the source AndroidManifest.xml, it can be migrated automatically to the namespace value in the build.gradle file using the AGP Upgrade Assistant; please refer to https://developer.android.com/studio/build/agp-upgrade-assistant for more information. at com.android.build.gradle.internal.core.dsl.impl.VariantDslInfoImpl.getNamespace(VariantDslInfoImpl.kt:77) at com.android.build.gradle.internal.core.dsl.impl.VariantDslInfoImpl.initApplicationId(VariantDslInfoImpl.kt:128) at com.android.build.gradle.internal.core.dsl.impl.VariantDslInfoImpl.access$initApplicationId(VariantDslInfoImpl.kt:37) at com.android.build.gradle.internal.core.dsl.impl.VariantDslInfoImpl$applicationId$2.invoke(VariantDslInfoImpl.kt:94) at com.android.build.gradle.internal.core.dsl.impl.VariantDslInfoImpl$applicationId$2.invoke(VariantDslInfoImpl.kt:91) at kotlin.SynchronizedLazyImpl.getValue(LazyJVM.kt:74) at com.android.build.gradle.internal.core.dsl.impl.VariantDslInfoImpl.getApplicationId(VariantDslInfoImpl.kt:91) at com.android.build.gradle.internal.core.dsl.impl.ComponentDslInfoImpl$mergedFlavor$2.invoke(ComponentDslInfoImpl.kt:67) at com.android.build.gradle.internal.core.dsl.impl.ComponentDslInfoImpl$mergedFlavor$2.invoke(ComponentDslInfoImpl.kt:63) at kotlin.SynchronizedLazyImpl.getValue(LazyJVM.kt:74) at com.android.build.gradle.internal.core.dsl.impl.ComponentDslInfoImpl.getMergedFlavor(ComponentDslInfoImpl.kt:63) at com.android.build.gradle.internal.core.dsl.impl.VariantDslInfoImpl.getMinSdkVersion(VariantDslInfoImpl.kt:63) at com.android.build.api.variant.impl.VariantBuilderImpl.(VariantBuilderImpl.kt:48) at com.android.build.api.variant.impl.LibraryVariantBuilderImpl.(LibraryVariantBuilderImpl.kt:35) at com.android.build.api.variant.impl.LibraryVariantBuilderImpl_Decorated.(Unknown Source) at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:77) at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at org.gradle.internal.instantiation.generator.AsmBackedClassGenerator$InvokeConstructorStrategy.newInstance(AsmBackedClassGenerator.java:1948) at org.gradle.internal.instantiation.generator.AbstractClassGenerator$GeneratedClassImpl$GeneratedConstructorImpl.lambda$newInstance$0(AbstractClassGenerator.java:510) at org.gradle.internal.deprecation.DeprecationLogger$4.create(DeprecationLogger.java:295) at org.gradle.internal.deprecation.DeprecationLogger.whileDisabledThrowing(DeprecationLogger.java:273) at org.gradle.internal.instantiation.generator.AbstractClassGenerator$GeneratedClassImpl$GeneratedConstructorImpl.newInstance(AbstractClassGenerator.java:509) at org.gradle.internal.instantiation.generator.DependencyInjectingInstantiator.doCreate(DependencyInjectingInstantiator.java:64) ... 211 more

guyluz11 commented 1 year ago

Please add title for the issue

pjarnfelt commented 4 months ago

I have the same issue on 0.0.84!

pjarnfelt commented 4 months ago

The build gradle is missing a namespace. Updating the better_player codebase android/build.gradle

android {
    namespace "com.jhomlala.better_player" <-- added this
    ...

fixes it. Please update the codebase