2
votes

I want to use templates for generating html pages on Android application . Later on I want to print these prepared pages. I thought I could use Freemarker template library. But during initialization - in the code : try { cfg = new Configuration();

            cfg.setDirectoryForTemplateLoading(new File(MSprzedazSesja.folderAplikacjiNaKarcie.getAbsolutePath()+MSprzedazSesja.folderWzorcowWydruku));
            cfg.setObjectWrapper(new DefaultObjectWrapper());
            tempFaktura = cfg.getTemplate("wzorzecFaktura.ftl");
        }

I get error: E/AndroidRuntime(7608): at freemarker.core.Configurable.(Configurable.java:139) It gets error at line cfg = new Configuration(); I tried to use that code in windowed Java application and it worked Ok. Is it possible to use Freemarker in Android at all??

1

1 Answers

0
votes

http://freemarker.624813.n4.nabble.com/Exception-when-using-FreeMarker-in-Android-td4654256.html

I met the same problem today. After searched in google, I found this answer: 'Android is not an officially supported target '. So I am considering to replace freemarker in my project