简体   繁体   中英

Android Studio - Export Javacode to HTML

I tryed to export my Javacode from Android Studio to a HTML Code. But when I start the exported HTML-Code in Firefox, Chrome or Opera, I only see the Code and not the Game what I programmed. Did I need something else to do like css? I hope anyone can help me.

Strecki

File > Export to HTML... can't convert your native app(written in Java or Kotlin) into Web app. It is like a wrapper to display beautifully the source code files(*.java, *.kt, *.xml, *.aidl, etc)

Once you export your project to HTML.

Firstly, It will creates exportToHTML folder. Secondly, It will create index.html files in each folder and convert all the file names like these:

MyJavaFile.java > MyJavaFile.java.html
MyXmlFile.xml > MyXmlFile.xml.html
MyAidlFile.aidl > MyAidFile.aidl.html
MyImlFile.iml > MyImlFile.iml.html
(and so on...)

The file structures are similar to the original one. And each html files has this CSS.

<style type="text/css">
    .s0 { color: #808080;}
    .s1 { color: #a9b7c6;}
    .s2 { color: #cc7832;}
    .s3 { color: #629755; font-style: italic;}
    .s4 { color: #6a8759;}
    .s5 { color: #6897bb;}
</style>

And the files has tag to display the source code.

the index.html files only shows the file names as a hyperlink.

In this way, the files only display the source files.

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