Quick Links: Gideros Home | Download Gideros | Developer Guide
Unable to export APK
  • antixantix +1 -1
    Member
    Hey all. I have an issue exporting to APK. In my test project I have..

    main.lua
    local m = require("module")
    m.init()
     
    application:setBackgroundColor(0x008800)

    and module.lua
    local M = {}
     
    M.init = function(options)
    print("module initited")
    end
     
    return M

    In the windows player this works, but when I export to the device as an APK it just crashes on running. What am I missing to make this work? I know it must be simple but I can't figure it out (insert frustrated simian noises here) :-??

    Edit:
    I ran Android Studio and in ADB the error is..
    07-02 08:29:16.340 20499-20516/? E/AndroidRuntime: FATAL EXCEPTION: GLThread 2096
    Process: com.yourdomain.yourapp, PID: 20499
    com.giderosmobile.android.player.LuaException: main.lua:5: module 'module' not found:
    no field package.preload['module']
    no file './module.lua'
    no file '/usr/local/share/lua/5.1/module.lua'
    no file '/usr/local/share/lua/5.1/module/init.lua'
    no file '/usr/local/lib/lua/5.1/module.lua'
    no file '/usr/local/lib/lua/5.1/module/init.lua'
    no file './module.so'
    no file '/usr/local/lib/lua/5.1/module.so'
    no file '/usr/local/lib/lua/5.1/loadall.so'
    stack traceback:
    main.lua:5: in main chunk
    (luac): in main chunk
    at LUA.MAIN_CHUNK(main.lua:5)
    at LUA.MAIN_CHUNK(luac:1234)

    That seems strange that the file does not exist when clearly it does? (insert more simian noises here)
    Check out my DevBlog, my GitHub, and my games Falling Animals | Breaky Wall | Exetor
  • totebototebo +1 -1 (+2 / -0 )
    Member Accepted Answer
    With the latest Gideros releases I think you need to set any file you require to "exclude from execution" in the library. Or whatever it's called, I'm on my phone. :)
    My Gideros games: www.totebo.com
  • antixantix +1 -1 (+1 / -0 )
    Member
    @totebo thanks! That seems to have worked :)

    Likes: totebo

    Check out my DevBlog, my GitHub, and my games Falling Animals | Breaky Wall | Exetor
  • simwhisimwhi +1 -1 (+1 / -0 )
    Member
    @antix I found out about this the hard way too, when I moved to the latest Gideros version,

    Likes: antix

  • antixantix +1 -1
    Member
    That will teach me for upgrading! :-))
    Check out my DevBlog, my GitHub, and my games Falling Animals | Breaky Wall | Exetor
  • SinisterSoftSinisterSoft +1 -1 (+1 / -0 )
    Maintainer
    Yes, if you require or include anything then it should be excluded from execution, with the main programs.

    Likes: antix

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Login with Facebook Sign In with Google Sign In with OpenID

In this Discussion

Top Posters