How do I import and use a GTFS file into my android app to make (offline) public transport routing available? I found the way to do it in the web instance, but haven't found a quickstart-style guide to do it. Is it even possible? Reading the project on Public Transit (https://github.com/graphhopper/graphhopper/projects/1) makes me think it is, but haven't found the way to do it....

The quickstart on how to create the necessary files is in the module Readme. Currently we have no official Android support for public transit but you can try. Still import the data on a desktop or server before the mobile usage - similar to what you need to do for road routing.

My best guess is that this error is created because you don't use the the GraphHopperGtfs class. If you use the regular GraphHopper class, you will use the DefaultFlagEncoderFactory, which does not contain public transport.

How can I use it when I'm executing ./graphhopper.shto generate the files?

It should work exactly as documented in the documentation linked above. Currently, it's not possible to do it with ./graphhopper.sh import, you have to use ./graphhopper.sh web. Will create a PR that fixes this issue.

You only need to do this for the Android code. Essentially you would change this everywhere in the Android code where graphhopper = new GraphHopper to graphhopper = new GraphHopperGtfs. Hope this helps.

Yes, please have a look at the class itself: GraphHopperGtfs(PtFlagEncoder flagEncoder, TranslationMap translationMap, GraphHopperStorage graphHopperStorage, LocationIndex locationIndex, GtfsStorage gtfsStorage, RealtimeFeed realtimeFeed). You can also use the factory, as shown here: