Git Product home page Git Product logo

Comments (9)

hnvn avatar hnvn commented on August 17, 2024 7

I've tried to use my plugin in my own project, it works well. If you have any problems, they might come from AndroidX migration. You should follow the official document about AndroidX. There're some my suggestion:

  • change compileSdkVersion and targetSdkVersion to 28
  • add following codes to gradle.properties
android.useAndroidX=true
android.enableJetifier=true
  • upgrade com.android.tools.build:gradle to 3.3.1 (the newest)
dependencies {
        classpath 'com.android.tools.build:gradle:3.3.1'
    }
  • gradle-wrappter.properties:
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.1-all.zip

from flutter_downloader.

hnvn avatar hnvn commented on August 17, 2024

Have you tried running example project yet?

from flutter_downloader.

wsxyeah avatar wsxyeah commented on August 17, 2024
+--- android.arch.work:work-runtime:1.0.0-beta05
|    +--- androidx.lifecycle:lifecycle-extensions:2.0.0
|    |    +--- androidx.lifecycle:lifecycle-runtime:2.0.0
|    |    |    +--- androidx.lifecycle:lifecycle-common:2.0.0
|    |    |    |    \--- androidx.annotation:annotation:1.0.0 -> 1.0.1
|    |    |    +--- androidx.arch.core:core-common:2.0.0
|    |    |    |    \--- androidx.annotation:annotation:1.0.0 -> 1.0.1
|    |    |    \--- androidx.annotation:annotation:1.0.0 -> 1.0.1
|    |    +--- androidx.arch.core:core-common:2.0.0 (*)
|    |    +--- androidx.arch.core:core-runtime:2.0.0
|    |    |    +--- androidx.annotation:annotation:1.0.0 -> 1.0.1
|    |    |    \--- androidx.arch.core:core-common:2.0.0 (*)
|    |    +--- androidx.fragment:fragment:1.0.0
|    |    |    +--- androidx.core:core:1.0.0 -> 1.0.1
|    |    |    |    +--- androidx.annotation:annotation:1.0.0 -> 1.0.1
|    |    |    |    +--- androidx.collection:collection:1.0.0
|    |    |    |    |    \--- androidx.annotation:annotation:1.0.0 -> 1.0.1
|    |    |    |    +--- androidx.lifecycle:lifecycle-runtime:2.0.0 (*)
|    |    |    |    \--- androidx.versionedparcelable:versionedparcelable:1.0.0
|    |    |    |         +--- androidx.annotation:annotation:1.0.0 -> 1.0.1
|    |    |    |         \--- androidx.collection:collection:1.0.0 (*)
|    |    |    +--- androidx.legacy:legacy-support-core-ui:1.0.0
|    |    |    |    +--- androidx.annotation:annotation:1.0.0 -> 1.0.1
|    |    |    |    +--- androidx.core:core:1.0.0 -> 1.0.1 (*)
|    |    |    |    +--- androidx.legacy:legacy-support-core-utils:1.0.0
|    |    |    |    |    +--- androidx.annotation:annotation:1.0.0 -> 1.0.1
|    |    |    |    |    +--- androidx.core:core:1.0.0 -> 1.0.1 (*)
|    |    |    |    |    +--- androidx.documentfile:documentfile:1.0.0
|    |    |    |    |    |    \--- androidx.annotation:annotation:1.0.0 -> 1.0.1
|    |    |    |    |    +--- androidx.loader:loader:1.0.0
|    |    |    |    |    |    +--- androidx.annotation:annotation:1.0.0 -> 1.0.1
|    |    |    |    |    |    +--- androidx.core:core:1.0.0 -> 1.0.1 (*)
|    |    |    |    |    |    +--- androidx.lifecycle:lifecycle-livedata:2.0.0
|    |    |    |    |    |    |    +--- androidx.arch.core:core-runtime:2.0.0 (*)
|    |    |    |    |    |    |    +--- androidx.lifecycle:lifecycle-livedata-core:2.0.0
|    |    |    |    |    |    |    |    +--- androidx.lifecycle:lifecycle-common:2.0.0 (*)
|    |    |    |    |    |    |    |    +--- androidx.arch.core:core-common:2.0.0 (*)
|    |    |    |    |    |    |    |    \--- androidx.arch.core:core-runtime:2.0.0 (*)
|    |    |    |    |    |    |    \--- androidx.arch.core:core-common:2.0.0 (*)
|    |    |    |    |    |    \--- androidx.lifecycle:lifecycle-viewmodel:2.0.0
|    |    |    |    |    |         \--- androidx.annotation:annotation:1.0.0 -> 1.0.1
|    |    |    |    |    +--- androidx.localbroadcastmanager:localbroadcastmanager:1.0.0
|    |    |    |    |    |    \--- androidx.annotation:annotation:1.0.0 -> 1.0.1

It shows localboardcastmanager is depended by androidx.lifecycle:lifecycle-extensions:2.0.0, but work-runtime should not depend on androidx.lifecycle:lifecycle-extensions:2.0.0.

So better specify localbroadcastmanager dependency explicitly?

from flutter_downloader.

hnvn avatar hnvn commented on August 17, 2024

I can run example project without any error. You might have a look at it.

from flutter_downloader.

wsxyeah avatar wsxyeah commented on August 17, 2024

Yes, I can run example project without any error.

But when I create a new flutter project, then add flutter_downloader: ^1.1.6 to its pubspec.yaml, the build failure occurs.
This behavior is not expected, right?

from flutter_downloader.

moodstubos avatar moodstubos commented on August 17, 2024

got same error today after "flutter upgrade"

.pub-cache\hosted\pub.dartlang.org\flutter_downloader-1.1.6\android\src\main\java\vn\hunghd\flutterdownloader\FlutterDownloaderPlugin.java:12: error: package androidx.localbroadcastmanager.content does not exist
import androidx.localbroadcastmanager.content.LocalBroadcastManager;

from flutter_downloader.

KostasKrv avatar KostasKrv commented on August 17, 2024

Same problem here. Followed your last message and worked again. Thanks!

from flutter_downloader.

JiweiMaster avatar JiweiMaster commented on August 17, 2024

@wsxyeah I encounter same error about
'import androidx.localbroadcastmanager.content.LocalBroadcastManager' ,
could you tell me how do you solve this problem finally,thanks

from flutter_downloader.

furkanuzundev avatar furkanuzundev commented on August 17, 2024

@hnvn The solution is worked for me, Thanks!

from flutter_downloader.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.