Skip to content

Android-Luajavax v1.0

Latest
Compare
Choose a tag to compare
@bennyhuo bennyhuo released this 23 Feb 02:15
· 5 commits to master since this release

Bugfix:

  • [Bug] Wrong class argument passed into jni function calling javaNew. This will lead to that the 'new' method always returns nil when called from Lua on Java class.
  • [Bug] Falsely removes the Lua state object when closing.
  • [Bug] Error occurred when pass an expression of Java method call as an argument into another Java method call from Lua.
  • [Bug] Use objectIndex instead of classIndex for Java Classes.

Feature:

  • [Feature] The original error message was simply something like 'Not a valid Java Object.'. I have added the Lua script line info when error calling Java api in Lua.
  • [Feature] Add support to access fields and methods with the same name in Java object when calling Java api from Lua. Function in Lua is a first-class type so it is treated equally as other types like number or string, thus making keys in the Lua table must be different whatever types of the values are. However, This is not the case in Java since fields and methods are not the same things so they can share a identical name. When accessing a key, we can figure out whether it is a function call or a value access from the calling stack to make this work.
  • [Feature] Support Java vararg method call from Lua.
  • [Feature] Support partially redirect stdio to Logcat.