Hi all,
I uploaded my app to Play store and in the pre-launch report, they reported a crash on 2 devices out of 9. The logcat shows:
08-21 05:56:37.429: V/Corona(12954): \< Class.forName: plugin.google.iap.v3.LuaLoader 08-21 05:56:37.429: I/Corona(12954): ERROR: Could not instantiate class (plugin.google.iap.v3.LuaLoader): Activity cannot be null. 08-21 05:56:37.429: W/System.err(12954): java.lang.IllegalArgumentException: Activity cannot be null. 08-21 05:56:37.444: W/System.err(12954): at plugin.google.iap.v3.LuaLoader.\<init\>(LuaLoader.java:63) 08-21 05:56:37.444: W/System.err(12954): at java.lang.Class.newInstanceImpl(Native Method) 08-21 05:56:37.444: W/System.err(12954): at java.lang.Class.newInstance(Class.java:1130) . . . 08-21 05:56:37.449: W/System.err(12954): at com.ansca.corona.graphics.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1380) 08-21 05:56:37.449: V/Corona(12954): Loading via reflection: plugin.google.iap.v3.LuaLoader 08-21 05:56:37.449: I/Corona(12954): ERROR: Runtime error 08-21 05:56:37.449: I/Corona(12954): module 'plugin.google.iap.v3' not found:resource (plugin.google.iap.v3.lu) does not exist in archive 08-21 05:56:37.449: I/Corona(12954): no field package.preload['plugin.google.iap.v3'] 08-21 05:56:37.449: I/Corona(12954): no file '/data/data/com.gameforkstudio.testapp/files/coronaResources/plugin/google/iap/v3.lua'
In my code I have:
if ( "apple" == targetAppStore ) then -- iOS store = require( "store" ) elseif ( "google" == targetAppStore ) then -- Android store = require( "plugin.google.iap.v end if targetAppStore ~= "none" then -- if not on simulator store.init( transactionListener ) end
Since it happens only on a small number of devices I was wondering if it was a timing issue.
Do I need to delay calling the store.init() function for a short while or is the issue more serious?
Thanks.