Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Android HOW TO #189

@savejeff

Description

@savejeff

For everybody struggling with getting it in Android to run/compile

build.gradle:



    compileOptions {
        // Enable support for the new language APIs
        coreLibraryDesugaringEnabled true

        sourceCompatibility JavaVersion.VERSION_17
        targetCompatibility JavaVersion.VERSION_17

    [...]

dependencies {
    [...]
    // GPX Library
    implementation 'io.jenetics:jpx:3.2.1'
    implementation 'javax.xml.stream:stax-api:1.0-2' // adds javax.xml.stream with XMLStreamWriter etc
    implementation 'com.fasterxml.woodstox:woodstox-core:6.4.0' // actual implementation of a XMLOutputFactory etc

}

	GPX gpx = GPX.builder()
			.addWayPoint(WayPoint.of(48.208174, 16.373819)) // Vienna
			.build();

	String gpxString = GPX.Writer.DEFAULT.toString(gpx);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions