1

I am trying to open gallery in android to pick image and set as profile picture in unity game.

I have written the java code by following this link android pick images from gallery

Called above code from Unity c#, gallery opening but when I picked image the its crashing instantly, when looked on the logs in logcat then there was a message

java.lang.NoSuchMethodError: No static method checkSelfPermission(Landroid/content/Context;Ljava/lang/String;)I in class Landroid/support/v4/content/ContextCompat; or its super classes (declaration of 'android.support.v4.content.ContextCompat' appears in .....

I am sure there is android-support-v4.jar file in my Plugins/Android folder in unity3d.

Any recommendation ??

  • Please show me your code. – Hamid Yusifli Jul 12 '18 at 18:07
  • link already shared in question, I am using same code. – TechnoLover Aug 06 '18 at 15:49
  • After looking so many threads and tried lots of code available on internet, I got a reference of blog which helps me make it working, however that doesn't help me to resolve my issue but solution provided by this blog is working for me, it may help you all. Here is link http://unitydevelopers.blogspot.com/2018/07/pick-image-from-gallery-in-unity3d.html Developer of this plugin is very helpful, this is not costly solution so you can use this and save your time. – TechnoLover Sep 09 '18 at 12:19

0 Answers0