[Resolved] Android app crash without warning

I have a problem with my application, it works fine on the simulator and on the iPhone, but Android fails and closes without any warning.
here is my code if someone can see the error.

local widget = require(“widget”)
local ui = require(“ui”)
local aftLogg = require(“gettokenlogg”)
local rdj = require(“readjson”)
local json = require “json”
widget.setTheme( “theme_ios” )

this is the function that is call in the WebPop Listener
local function loadingContacts(urlLoad,mctoken)
local tokendiferente = false;
localUrlTarget = urlLoad;
localMtokenTarget = mctoken;
correct,MessAux= pcall(saveToken,mctoken);
if correct == false then
analytics.logEvent(MessAux);
end
correct = true;
MessAux = nil;

correct,datosServ = pcall(loadTable,“MonkiTableContact.json”)
if correct == false then
analytics.logEvent(MessAux);
print(MessAux);
end
correct = true;
MessAux = nil;

if(datosServ == nil) then
local URL = urlLoad
local headers = {}
headers[“Cookie”] = mctoken;

local params = {}
params.headers = headers;
sheet1 = graphics.newImageSheet( “mk-rotating-secuence.png”, { width=120, height=120, numFrames=24 } )
instance1 = display.newSprite( sheet1, { name=“loading”, start=1, count=24, time=1500 } )
instance1.x = display.contentWidth / 2
instance1.y = display.contentHeight / 2;
instance1.xScale = 1;
instance1.yScale = 1;
instance1:play()
instance1:toFront();

network.request( urlLoad, “POST”, networkListener,params );
else
correct,MessAux = pcall(scenario2);
if correct == false then
analytics.logEvent(MessAux);
end
correct = true;
MessAux = nil;
end

end

— this is the listener of the WebPop-------------
local function listener( event )
local shouldLoad = true
local url = event.url
local existJson
existJson = string.find(url,“json=1”)
if existJson == nil then
else
if event.errorCode then
local text = "Error: " … tostring( event.errorMessage )
print(text);
shouldLoad = true
else
native.cancelWebPopup();
correct,urlloadcontact = pcall(obtainContactPage)
if correct == false then
analytics.logEvent(MessAux)
end
correct = true;

local urlToken = url
local mcToken = string.sub(urlToken,string.find(urlToken,“mcToken”),string.len(urlToken))
if string.find(mcToken,"&") then
mcToken = string.sub(mcToken,string.find(mcToken,“mcToken”),(string.find(mcToken,"&")-1))
end

correct,MessAux = pcall(loadingContacts,urlloadcontact,mcToken)

if correct == false then
analytics.logEvent(MessAux);
end
correct = true;
MessAux = nil;

shouldLoad = true
end
end
return shouldLoad
end

Thanks [import]uid: 178315 topic_id: 31828 reply_id: 331828[/import]

I change the webpopup for a webView and that’s it. no more problems. [import]uid: 178315 topic_id: 31828 reply_id: 127020[/import]

I change the webpopup for a webView and that’s it. no more problems. [import]uid: 178315 topic_id: 31828 reply_id: 127020[/import]