GithubHelp home page GithubHelp logo

Comments (5)

rosuH avatar rosuH commented on July 26, 2024

报错信息贴一下,如果有的话。以及调用方式

from androidfilepicker.

yi-qingqiu avatar yi-qingqiu commented on July 26, 2024

在fragment中使用
调用方法
FilePickerManager.INSTANCE
.from(mFragment)
.forResult(FilePickerManager.REQUEST_CODE);
异常
kotlin.KotlinNullPointerException
at me.rosuh.filepicker.config.FilePickerManager.from(FilePickerManager.kt:37)
at com.huateng.item.ui.financing.AddAttachmentFragment$1.onClick(AddAttachmentFragment.java:113)
at android.view.View.performClick(View.java:5637)
at android.view.View$PerformClick.run(View.java:22429)
at android.os.Handler.handleCallback(Handler.java:751)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6119)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)

/**
 * 不能使用 fragment.getContext(),因为无法保证外部的代码环境
 */
fun from(fragment: Fragment): FilePickerConfig {
    this.fragment = WeakReference(fragment)
    this.context = WeakReference(fragment.activity!!)
    this.config = FilePickerConfig(this) 

return config!!
//我在这里创建了一个FilePickerConfig 异常解决了 不知道这样对不对?

}

from androidfilepicker.

rosuH avatar rosuH commented on July 26, 2024

非常感谢,看起来应该是没有初始化 config
我现在在外面,估计要下午才回家着手排查和修复。

from androidfilepicker.

rosuH avatar rosuH commented on July 26, 2024

已在 6a82c88 中修复。
这两天会发布新版,感谢反馈。

from androidfilepicker.

rosuH avatar rosuH commented on July 26, 2024

已在 0.5.2 中修复。

from androidfilepicker.

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.