Git Product home page Git Product logo

Comments (5)

NicodeLee avatar NicodeLee commented on July 17, 2024

导入报了个初始化的错,类型不对,1.4.4版
java.lang.UnsatisfiedLinkError: No implementation found for long com.iget.datareporter.DataReporter.makeReporter(java.lang.String, java.lang.String, java.lang.String, com.iget.datareporter.IReport) (tried Java_com_iget_datareporter_DataReporter_makeReporter and Java_com_iget_datareporter_DataReporter_makeReporter__Ljava_lang_String_2Ljava_lang_String_2Ljava_lang_String_2Lcom_iget_datareporter_IReport_2)

from datareporter.

NicodeLee avatar NicodeLee commented on July 17, 2024

上面报错看了源码的打包只保留这两个平台就好了。
abiFilters 'armeabi-v7a', 'arm64-v8a'

from datareporter.

lixiaoyu0123 avatar lixiaoyu0123 commented on July 17, 2024

关于使用有几点疑惑:
看了demo的代码,还是有点疑惑,
一般以为使用是这样的,启动统一初始化DataReporter(相关设置)、在各处需要上传的时候添加到上报队列、上报(处理回调)
疑问在第二点添加上报数据哪里,初始化的时候把DataReporter设置为全局对象,添加直接拿到对象添加吗?

对的, 如果需要全局使用的话,需要把创建的DataReporter对象保存为全局对象,一般是使用单例的形式。然后在各处需要上报的时候,直接调用push,把数据打进去。

from datareporter.

NicodeLee avatar NicodeLee commented on July 17, 2024

还有个问题,一般挂时间久了全局对象可能被回收了。
发送数据前做了mDataReporter判断为空。
这时候如果为空,重新再初始化mDataReporter对象有问题吗?
不然会不会有数据上报不成功。

from datareporter.

lixiaoyu0123 avatar lixiaoyu0123 commented on July 17, 2024

纠正一点,全局对象不会被回收,回收的只是activity,全局对象不会被回收。除非整个进程被kill掉。
第二个问题,即使出现mDataReporter为空(但是这种情况基本不会出现),重新初始化mDataReporter也不会有任何问题,
因为初始化的时候会对上一次异常退出做恢复操作。

from datareporter.

Related Issues (16)

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.