[TIMOB-23574] Android error Unable to start activity ComponentInfo
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | n/a |
Status | Open |
Resolution | Unresolved |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | n/a |
Labels | n/a |
Reporter | Andrea |
Assignee | Maggie Chen |
Created | 2016-06-27T21:45:05.000+0000 |
Updated | 2017-10-30T18:38:02.000+0000 |
Description
var pWidth = Ti.Platform.displayCaps.platformWidth;
var pHeight = Ti.Platform.displayCaps.platformHeight;
var winAccetta = Titanium.UI.createWindow({
width:pWidth,
height:pHeight,
navBarHidden:true,
backgroundColor: 'white',
layout:'vertical',
fullscreen: true,
orientationModes: [Ti.UI.PORTRAIT],
exitOnClose: true,
title: 'BS Root'
});
var client = Ti.Network.createHTTPClient({
// function called when the response data is available
onload : function(e) {
Ti.API.info("Received text: " + this.responseText);
var tableView = Ti.UI.createTableView({separatorStyle: Ti.UI.iPhone.TableViewSeparatorStyle.SINGLE_LINE});
winAccetta.add(tableView);
winAccetta.navBarHidden = true;
var licenza = Titanium.UI.createLabel({
width:Ti.UI.FILL,
top:30,
left:10,
height:'auto',
font : {
fontSize : 11,
fontFamily : 'Arial'
},
text: "-------PROVA-------"
});
winAccetta.add(licenza);
//
winAccetta.open();
},
// function called when an error occurs, including a timeout
onerror : function(e) {
Ti.API.debug(e.error);
alert('error');
},
timeout : 5000 // in milliseconds
});
// Prepare the connchection.
client.open("POST", url);
// client.open("GET", url);
client.send({
"type" : "getcategories",
"sourcetype" : "source_app",
});
[ERROR] : Zygote: MountEmulatedStorage() [INFO] : SELinux: Function: selinux_compare_spd_ram, SPD-policy is existed. and_ver=SEPF_SM-J120FN_5.1.1 ver=51 [ERROR] : Zygote: v2 [ERROR] : Zygote: accessInfo : 0 [ERROR] : SELinux: [DEBUG] get_category: variable seinfo: default sensitivity: NULL, cateogry: NULL [ERROR] : MotionRecognitionManager: mSContextService = null [ERROR] : MotionRecognitionManager: motionService = com.samsung.android.motion.IMotionRecognitionService$Stub$Proxy@2ed1b876 [DEBUG] : AndroidRuntime: Shutting down VM [ERROR] : TiApplication: (main) [1374,1374] Sending event: exception on thread: main msg:java.lang.RuntimeException: Unable to start activity ComponentInfo{com.com.provamobile/org.appcelerator.titanium.TiActivity}: java.lang.NumberFormatException: Unable to convert null; Titanium 5.3.0,2016/06/01 10:18,94fa8af [ERROR] : TiApplication: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.com.provamobile/org.appcelerator.titanium.TiActivity}: java.lang.NumberFormatException: Unable to convert null [ERROR] : TiApplication: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3133) [ERROR] : TiApplication: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3243) [ERROR] : TiApplication: at android.app.ActivityThread.access$1000(ActivityThread.java:218) [ERROR] : TiApplication: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1718) [ERROR] : TiApplication: at android.os.Handler.dispatchMessage(Handler.java:102) [ERROR] : TiApplication: at android.os.Looper.loop(Looper.java:145) [ERROR] : TiApplication: at android.app.ActivityThread.main(ActivityThread.java:6917) [ERROR] : TiApplication: at java.lang.reflect.Method.invoke(Native Method) [ERROR] : TiApplication: at java.lang.reflect.Method.invoke(Method.java:372) [ERROR] : TiApplication: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1404) [ERROR] : TiApplication: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1199) [ERROR] : TiApplication: Caused by: java.lang.NumberFormatException: Unable to convert null [ERROR] : TiApplication: at org.appcelerator.titanium.util.TiConvert.toInt(TiConvert.java:412) [ERROR] : TiApplication: at ti.modules.titanium.ui.widget.tableview.TiTableView.
After debugging many days my code I thing that it is no more possibile to open a window inside a new thread
Hello, Using the above code with url as https://www.google.com/ I got the below error. My Window never opens.
I can't understand your answer, do you want me to suggest you something? I have another url that I can't give you and I receive the answer, but you also should know how to use appcelerator methods. Can you help me to understand what help I can give you?
I tried to launch the script from another mac, but I still have the same error. Could you please help me?
I don't know why google doesn't work, maybe cause it is a https connection and the method works only with http...
After I bumped my app's Ti SDK to 6.2.0.GA, my app is crashing on loading. Log shows something about Number casting, but I can't find where it is. Already replaced every String.format() line with a cast to string inside the method... App was working fine with previous versions, so I need some help to find where this bug lies... Below is the logcat I'm facing:
Thanks in advance!
I'm also getting this on 6.2.0.GA as well. On 6.1.2.GA this doesn't happen for me.
[~perdona] Sorry for the inconvenience. I am interested to find out from you, is there any VideoPlayer involved? Is the error reproducible on every device every time? I met the same error once but it can't be reproduced every time. It would be very helpful if anyone could provide the code can reproduce the error.
@Maggie Chen Okay, let's try to find this together. I do use VideoPlayer in my app, but I didn't think this is what's crashing the app... Answering your questions, yes, reproducible on every device every time! I will try to isolate the videoplayer code and remove it from my first loading, and then post an update here! Thanks in advance!
[~perdona] What are you assigning as
repeatMode
for your VideoPlayer? You can only use the following:Touché! I was using null to (maybe?) workaround some other issue...
Will alter that and post feedback here for you guys! Thanks a lot.
This should work: