简体   繁体   中英

Setting Java Classpath in Necessitas

I'm porting an application we've written with Qt to Android, using Necessitas. This has gone fairly smoothly, but I need to use a vendor provided Java library to access the serial port on our Android device. There isn't much help available on using Java within Necessitas, particularly with add-on libraries, but I've been told by the vendor that I need to include the library in the manifest like this:

  <uses-library android:name="vendor.serial.library"
                android:required="true"/>

...and that I also need to include the library in the Java classpath, but this is where I'm stuck: I don't know where the classpath is stored or how to update it. I'm also a little confused as to the location of the library: There's a version on the device at system/framework, which is what I've been told to add to the classpath, but there's also a version on my computer which is larger. How are add-on libraries managed? Do they get copied to the device from the computer when a deploy occurs?

Any help would be much appreciated!

Update

I should point out that our vendor provides instructions as to how to use their library in Eclipse, and this information works: You right-click the project, select properties, then change the Project Build Target to be their supplied library (which is initially installed as an add-on using the Android SDK manager). Unfortunately, I can't find a parallel to this in Necessitas's Qt Creator: Go to Projects -> Run -> Package Configurations and I find an option to set the Android SDK, but no option for our vendor package appears here (just 7, 8 and 10). I assume SDK's have to be configured separately for Necessitas, and it doesn't automatically find all available ones.

Unfortunately, comparing an Eclipse project which uses SDK 10 and one which uses the vendor SDK didn't turn up any clues as to how one might make Necessitas use the new SDK, so I'm at something of a loss as to where to go from here.

@Philip : Please refer the below link. Hope it helps http://qt-project.org/wiki/Setup_Necessitas_SDK_on_Windows

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM