Giter Site home page Giter Site logo

Comments (4)

taishuhongye avatar taishuhongye commented on May 17, 2024 1

implementation "android.arch.lifecycle:livedata:1.1.1",引用这个包之后就可以了。
这是gradle一个误导我的地方。up主此库没有问题。之前用的是gradle 4.7构建,不用手动引用 "android.arch.lifecycle:livedata:1.1.1"。现在升级5.1.1之后,引用的lifecycle的库变了。手动引用一下之后就好了。

from liveeventbus.

JeremyLiao avatar JeremyLiao commented on May 17, 2024

我理解跟gradle版本应该没有关系,check一下你的dependency呢,是否有implementation "android.arch.lifecycle:livedata:1.1.1"

from liveeventbus.

taishuhongye avatar taishuhongye commented on May 17, 2024

哦好的,gradle4.7的时候,没有去引用android.arch.lifecycle:livedata:1.1.1,便可以运行。所以我没注意项目中是否有android.arch.lifecycle:livedata:1.1.1。而升级到5.1.1之后发现没有Observer了。而且所引用的android.arch.lifecycle的包也有变化,所以我认为是gradle5.1.1所引用的包的问题。
。稍等我看一下。项目中是否有android.arch.lifecycle:livedata:1.1.1

from liveeventbus.

taishuhongye avatar taishuhongye commented on May 17, 2024

如果有和我一样刚升5的。并且手动implementation "android.arch.lifecycle:livedata:1.1.1"的。升了之后先把build文件夹删掉,或者clean一下。再重新编译。否则报类重复,observer已经引用过。的错误。

from liveeventbus.

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.