Android-FilePicker icon indicating copy to clipboard operation
Android-FilePicker copied to clipboard

FilePickerBuilder.getInstance() is not working system says can't find symbol getInstance()

Open Inzimam-Tariq opened this issue 7 years ago • 4 comments

I tried the the below simple example as given in the documentation but the project is unable to find getInstance() method. Why?

FilePickerBuilder.getInstance().setMaxCount(5) .setSelectedFiles(filePaths) .setActivityTheme(R.style.LibAppTheme) .pickPhoto(this);

Inzimam-Tariq avatar Jan 15 '19 11:01 Inzimam-Tariq

Add Companion object to get its instance.

eg

FilePickerBuilder.Companion.getInstance().setMaxCount(5) .setSelectedFiles(filePaths) .setActivityTheme(R.style.LibAppTheme) .pickPhoto(this)

sivabe35 avatar Jan 19 '19 09:01 sivabe35

Add Companion object to get its instance.

eg

FilePickerBuilder.Companion.getInstance().setMaxCount(5) .setSelectedFiles(filePaths) .setActivityTheme(R.style.LibAppTheme) .pickPhoto(this)

Hi! I'm newbie looking knowledge. By adding Companion, I got this error java.lang.NoClassDefFoundError: Failed resolution of: Lkotlin/jvm/internal/Intrinsics; at droidninja.filepicker.FilePickerBuilder.setSelectedFiles(FilePickerBuilder.kt). How to fix this?

zahinsarif avatar Feb 03 '19 05:02 zahinsarif

Which Android-FilePicker version are you using? If you are using the latest version i.e filepicker: 2.2.0 then you need to migrate your project to AndroidX.

or use old version filepicker:2.1.5

sivabe35 avatar Feb 04 '19 08:02 sivabe35

Which Android-FilePicker version are you using? If you are using the latest version i.e filepicker: 2.2.0 then you need to migrate your project to AndroidX.

or use old version filepicker:2.1.5

Thank you, I already tried filepicker:2.1.5 and it's works! Thanks a lot bro.

zahinsarif avatar Feb 04 '19 08:02 zahinsarif