License and Ncore context android

General information about Neurotechnology and its software

License and Ncore context android

Postby caribouman » Jun 07, 2018 15:50

Code: Select all
 protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        NCore.setContext(this);



        String requiredLicenses=("Biometrics.FingerExtraction");



        String Address = "/local";
        int Port = 5000;
        try {
            //

            NLicense.obtainComponents(Address,Port,requiredLicenses);
        } catch (IOException e) {
            e.printStackTrace();
        }


i make this to obtain license but i have Unable to start activity ComponentInfo : Bad file descriptor

do i miss something ?


thanks

the SDK is 9
caribouman
 
Posts: 4
Joined: Sep 10, 2012 13:41

Re: License and Ncore context android

Postby MartynasV » Jun 11, 2018 09:10

caribouman wrote:
Code: Select all
 protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        NCore.setContext(this);



        String requiredLicenses=("Biometrics.FingerExtraction");



        String Address = "/local";
        int Port = 5000;
        try {
            //

            NLicense.obtainComponents(Address,Port,requiredLicenses);
        } catch (IOException e) {
            e.printStackTrace();
        }


i make this to obtain license but i have Unable to start activity ComponentInfo : Bad file descriptor

do i miss something ?


thanks

the SDK is 9

Hello caribouman,

Please provide SDK revision number(can be found in SDK root directory, in Revision.txt file).
Send full error stack trace.
Martynas V
Neurotechnology
MartynasV
Neurotechnology
 
Posts: 346
Joined: Feb 27, 2015 11:24
Location: Vilnius, Lithuania

Re: License and Ncore context android

Postby caribouman » Jun 19, 2018 15:04

hi the Product revision number: 158289

now i succeed to pass this step


i succeed to put native library, but i was forced to remove the .lib at the end of the name of the dll inside the folder win32-x86-64

but now when i try to initialize licenseManager
i have java.lang.UnsatisfiedLinkError: %1 n’est pas une application Win32 valide

i am on windows 10 64bits

do you have an idea?
caribouman
 
Posts: 4
Joined: Sep 10, 2012 13:41

Re: License and Ncore context android

Postby caribouman » Jun 19, 2018 15:06

this is the complete message:


Caused by: java.lang.UnsatisfiedLinkError: %1 n’est pas une application Win32 valide.

at com.sun.jna.Native.open(Native Method)
at com.sun.jna.NativeLibrary.loadLibrary(NativeLibrary.java:263)
at com.sun.jna.NativeLibrary.getInstance(NativeLibrary.java:403)
at com.neurotec.lang.NCore.<clinit>(NCore.java:132)
caribouman
 
Posts: 4
Joined: Sep 10, 2012 13:41

Re: License and Ncore context android

Postby vaidasz » Jun 20, 2018 06:36

caribouman wrote:hi the Product revision number: 158289

now i succeed to pass this step


i succeed to put native library, but i was forced to remove the .lib at the end of the name of the dll inside the folder win32-x86-64

but now when i try to initialize licenseManager
i have java.lang.UnsatisfiedLinkError: %1 n’est pas une application Win32 valide

i am on windows 10 64bits

do you have an idea?


Hello,

You are confusing. From previous post and topic we understand that it is Android. What are you developing - Android or Windows application?

caribouman wrote:hi the Product revision number: 158289

You are using not the latest SDK update version. Please download latest version of the SDK.

caribouman wrote:i succeed to put native library, but i was forced to remove the .lib at the end of the name of the dll inside the folder win32-x86-64

There is no need to rename anything. It seems that you are doing something incorrectly. For Android application you need to use libraries from SDK\Lib\Android folder.
Vaidas Z
Neurotechnology
vaidasz
Neurotechnology
 
Posts: 580
Joined: Apr 30, 2010 06:57
Location: Vilnius, Lithuania

Re: License and Ncore context android

Postby caribouman » Jun 20, 2018 07:59

yes sorry, i didnt make a new subject for this...
i start on android and i succeed to make it work

now i have to make the same application on windows 10
and this morning i change to
Product revision number: 178878 on sdk 10 to be sure to have the last one

so i copy the two folders win32_x86 and Win64_x64 in my libs folder, i add this folder to my resource path

if i just make this i have this message:
java.lang.UnsatisfiedLinkError: Unable to load library 'NCore': Native library (win32-x86-64/NCore.dll) not found in resource path

the win32-x86-64 folder does nt exist in the last product revison ...and the name is Ncore.dll.lib
what is the best way to add the native library file to one new project ?

thanks
caribouman
 
Posts: 4
Joined: Sep 10, 2012 13:41

Re: License and Ncore context android

Postby vaidasz » Jun 20, 2018 12:11

caribouman wrote:yes sorry, i didnt make a new subject for this...
i start on android and i succeed to make it work

now i have to make the same application on windows 10
and this morning i change to
Product revision number: 178878 on sdk 10 to be sure to have the last one

so i copy the two folders win32_x86 and Win64_x64 in my libs folder, i add this folder to my resource path

if i just make this i have this message:
java.lang.UnsatisfiedLinkError: Unable to load library 'NCore': Native library (win32-x86-64/NCore.dll) not found in resource path

the win32-x86-64 folder does nt exist in the last product revison ...and the name is Ncore.dll.lib
what is the best way to add the native library file to one new project ?

thanks


Hello,

Native libraries for Windows are located at SDk\Bin\Win32_x86 and SDK\Bin\SDK\Win64_x64.
The error message you get means that native libraries cannot be found. If you are running from some IDE, make sure working directory is set either to Win32_x86 or Win64_x64.
Also I noticed some strange things with Java (I am not an expert for that) where native libraries could have not been loaded unless there are both x86 and x64 JDK installed on the computer.
Vaidas Z
Neurotechnology
vaidasz
Neurotechnology
 
Posts: 580
Joined: Apr 30, 2010 06:57
Location: Vilnius, Lithuania


Return to Public

Who is online

Users browsing this forum: No registered users and 3 guests