BASIC

Author Topic: no native method named "setFilesPath"  (Read 2225 times)

Offline lanslot

  • Mc. Print
  • *
  • Posts: 14
    • View Profile
Code: GLBasic [Select]
03-07 15:33:42.745: E/AndroidRuntime(19239): java.lang.UnsatisfiedLinkError: No implementation found for void com.glbasic.test.SDLActivity.setFilesPath(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String) (tried Java_com_glbasic_test_SDLActivity_setFilesPath and Java_com_glbasic_test_SDLActivity_setFilesPath__Ljava_lang_String_2Ljava_lang_String_2Ljava_lang_String_2Ljava_lang_String_2Ljava_lang_String_2)
03-07 15:33:42.745: E/AndroidRuntime(19239):    at com.glbasic.test.SDLActivity.setFilesPath(Native Method)
03-07 15:33:42.745: E/AndroidRuntime(19239):    at com.glbasic.test.SDLActivity.onCreate(SDLActivity.java:298)
 

method signature:
Code: GLBasic [Select]
public static native void setFilesPath(String path, String devid, String cache, String lang, String extStoragePubDir);

Android Code Snippet:
Code: GLBasic [Select]
setFilesPath(dataDir.toString(),
                AndroidId.toString(),
                chacheDir.toString(),
                java.util.Locale.getDefault().getLanguage(), // getDisplayCountry()
                ext_storage
                );
 

Offline Ian Price

  • Administrator
  • Prof. Inline
  • *******
  • Posts: 4144
  • On the shoulders of giants.
    • View Profile
    • My Apps
Re: no native method named "setFilesPath"
« Reply #1 on: 2016-Mar-07 »
You might need to set the JAVA home path in Windows itself, not GLB - http://javarevisited.blogspot.co.uk/2013/02/windows-8-set-path-and-classpath-java-windows-7.html

This is for Windows 7 & 8, but my upgrade to 10 still maintains the path, so should work on 10 too. maybe.

Setting up JAVA and Android is a hassle but once it's done it's done!


[EDIT] Here's another site with screenhosts showing how to set the path - scroll down a bit.

http://stackoverflow.com/questions/2619584/how-to-set-java-home-on-windows-7
« Last Edit: 2016-Mar-07 by Ian Price »
I came. I saw. I played.

Offline lanslot

  • Mc. Print
  • *
  • Posts: 14
    • View Profile
Re: no native method named "setFilesPath"
« Reply #2 on: 2016-Mar-07 »
in my win7
java home was set
i can run command java -version
and i installed eclipse and android studio to develop
they both ok

--my english is not good,i hope you can understand

Offline Ian Price

  • Administrator
  • Prof. Inline
  • *******
  • Posts: 4144
  • On the shoulders of giants.
    • View Profile
    • My Apps
Re: no native method named "setFilesPath"
« Reply #3 on: 2016-Mar-07 »
Your English is fine :)

As for your problem, erm.. Android is not my strongpoint. Have you tried downloading android Extras - this takes some of the headache out of developing for Android.


I came. I saw. I played.

Offline spacefractal

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 3611
    • View Profile
    • Space Fractal
Re: no native method named "setFilesPath"
« Reply #4 on: 2016-Mar-07 »
the ndk mightbeen missing. Did you try using the Android Extras download (which is required for glbasic v14)? sdl_main.cpp seens to been missing, where the Java code link to.
Greedy Mouse - Karma Miwa - Spot Race - CatchOut - Android Extras - is on a vacation trip, home before end of few days in jan.

Offline lanslot

  • Mc. Print
  • *
  • Posts: 14
    • View Profile
Re: no native method named "setFilesPath"
« Reply #5 on: 2016-Mar-08 »
is there any video to teach people how to export android?
i'm newbie,i don't know how to do this.
and i try to build sample project and export it to html or html-webgl,there is no error,but when i run on firefox or chrome,browser always show “no responding"

i hope you can understand,my english is not good :)

Offline lanslot

  • Mc. Print
  • *
  • Posts: 14
    • View Profile
Re: no native method named "setFilesPath"
« Reply #6 on: 2016-Mar-08 »
i reload NDK,OK  :~)
but html still can't  :~(

Offline spacefractal

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 3611
    • View Profile
    • Space Fractal
Re: no native method named "setFilesPath"
« Reply #7 on: 2016-Mar-08 »
Iim not sure HTML does work? Android and HTML is two diffefent thing. I'm can't help with the html part.
Greedy Mouse - Karma Miwa - Spot Race - CatchOut - Android Extras - is on a vacation trip, home before end of few days in jan.