Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-9003] Android: Review and fix external error and warning messages

GitHub Issuen/a
TypeStory
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2012-08-06T12:40:38.000+0000
Affected Version/sRelease 2.0.1
Fix Version/sSprint 2012-16 Core, Release 3.0.0
ComponentsAndroid
Labelscore, qe-port
ReporterNeeraj Gupta
AssigneeAllen Yeung
Created2012-05-05T12:59:34.000+0000
Updated2014-02-04T00:45:59.000+0000

Description

Android platform displays a number of error and warning messages that are not very helpful and are confusing to a number of developers. For example, "[WARN] [object TiUILabel] has an auto width value of 0, meaning this view may not be visible." We need to evaluate all the external errors and warning messages - 1. Remove unnecessary messages. Every message should serve a specific purpose and provide meaningful information. 2. Make sure that these messages have consistent language style. Documentation team should review these messages.

Comments

  1. Allen Yeung 2012-08-03

    For testing, you can run any app and look at logcat for the output. I just ran something like:
       var win = Ti.UI.createWindow({
       	navBarHidden : true,
       	backgroundColor : '#000'
       });
       
       var topView = Ti.UI.createView({
       	backgroundColor : 'white',
       	height : Ti.UI.SIZE,
       	top : 0,
       	layout : 'horizontal'
       });
       
       topView.add(Ti.UI.createView({width: Ti.UI.FILL, height: 100, backgroundColor:'blue'}))
       topView.add(Ti.UI.createView({width: 50, height: 150, backgroundColor:'red'}))
       topView.add(Ti.UI.createView({top: 10, bottom: 20, width:50, height: 200, backgroundColor:'purple'}))
       topView.add(Ti.UI.createView({width: 100, height: 100, backgroundColor:'orange'}))
       
       win.addEventListener('postlayout', function(){
       	Ti.API.info('-----------------------------height:' + topView.rect.height);
       
       });
       
       win.add(topView);
       
       win.open();
       
    Please run the app twice, once with false in your tiapp.xml. The other with that value set to true. When the value is set to true, you will notice more logging in logcat... something like "Native view is null". Otherwise, the logs should not show a lot of logging. Before my fix "Native view is null" shows even when the debug value was set to false. Feel free to also test it in other apps like KS, to see the difference.
  2. Allen Yeung 2012-08-10

    PR: https://github.com/appcelerator/titanium_mobile/pull/2673
  3. Anshu Mittal 2013-01-14

    Tested with: SDK: 3.0.0GA Studio: 3.0.1.201212181159 Device: Samgung galaxy note(android 2.3.6) Works as expected

JSON Source