Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception : Unable to start activity #183

Open
Cryde opened this issue Sep 16, 2015 · 1 comment
Open

Exception : Unable to start activity #183

Cryde opened this issue Sep 16, 2015 · 1 comment

Comments

@Cryde
Copy link

Cryde commented Sep 16, 2015

Hi !

I try to use this nice module for Android as follow :
index.js :

// CREATE THE MODULE
var NappDrawerModule = require('dk.napp.drawer');
var drawer = NappDrawerModule.createDrawer({
    fullscreen:false, 
    rightWindow: Alloy.createController("menu").getView(),
    centerWindow: Alloy.createController("scroller").getView(),
    fading: 0.2, // 0-1
    parallaxAmount: 0.2, //0-1
    shadowWidth:"40dp", 
    rightDrawerWidth: 240,
    animationMode: NappDrawerModule.ANIMATION_NONE,
    closeDrawerGestureMode: NappDrawerModule.MODE_MARGIN,
    openDrawerGestureMode: NappDrawerModule.MODE_ALL
});

// lets open it
drawer.open();

No big deal, I think ...

Here are my two views :
scroller.xml:

<Alloy>
    <View id="scroller"></View>
</Alloy>

It's associated controller (scroller.js) doesn't contain anything except : var args = arguments[0] || {};

menu.xml

<Alloy>
    <View id="menu">
        <Label text="test" />
    </View>
</Alloy>

It's associated controller (menu.js) doesn't contain anything except : var args = arguments[0] || {};

But after all of that I got this error :

[WARN] :   dalvikvm: threadid=1: thread exiting with uncaught exception (group=0x40f01908)
[ERROR] :  TiApplication: (main) [1268,1268] Sending event: exception on thread: main msg:java.lang.RuntimeException: Unable to start activity ComponentInfo{com.app2/org.appcelerator.titanium.TiActivity}: java.lang.NumberFormatException: Unable to convert null; Titanium 4.1.1,2015/08/16 21:42,7e39876
[ERROR] :  TiApplication: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.app2/org.appcelerator.titanium.TiActivity}: java.lang.NumberFormatException: Unable to convert null
[ERROR] :  TiApplication:   at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2189)
[ERROR] :  TiApplication:   at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2216)
[ERROR] :  TiApplication:   at android.app.ActivityThread.access$600(ActivityThread.java:149)
[ERROR] :  TiApplication:   at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1305)
[ERROR] :  TiApplication:   at android.os.Handler.dispatchMessage(Handler.java:99)
[ERROR] :  TiApplication:   at android.os.Looper.loop(Looper.java:153)
[ERROR] :  TiApplication:   at android.app.ActivityThread.main(ActivityThread.java:5000)
[ERROR] :  TiApplication:   at java.lang.reflect.Method.invokeNative(Native Method)
[ERROR] :  TiApplication:   at java.lang.reflect.Method.invoke(Method.java:511)
[ERROR] :  TiApplication:   at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:821)
[ERROR] :  TiApplication:   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:584)
[ERROR] :  TiApplication:   at dalvik.system.NativeStart.main(Native Method)
[ERROR] :  TiApplication: Caused by: java.lang.NumberFormatException: Unable to convert null
[ERROR] :  TiApplication:   at org.appcelerator.titanium.util.TiConvert.toInt(TiConvert.java:408)
[ERROR] :  TiApplication:   at dk.napp.drawer.Drawer.processProperties(Drawer.java:375)
[ERROR] :  TiApplication:   at org.appcelerator.kroll.KrollProxy.setModelListener(KrollProxy.java:1209)
[ERROR] :  TiApplication:   at dk.napp.drawer.DrawerProxy.windowCreated(DrawerProxy.java:146)
[ERROR] :  TiApplication:   at org.appcelerator.titanium.TiActivityWindows.windowCreated(TiActivityWindows.java:33)
[ERROR] :  TiApplication:   at org.appcelerator.titanium.TiBaseActivity.windowCreated(TiBaseActivity.java:458)
[ERROR] :  TiApplication:   at org.appcelerator.titanium.TiBaseActivity.onCreate(TiBaseActivity.java:551)
[ERROR] :  TiApplication:   at org.appcelerator.titanium.TiActivity.onCreate(TiActivity.java:18)
[ERROR] :  TiApplication:   at android.app.Activity.performCreate(Activity.java:5020)
[ERROR] :  TiApplication:   at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1080)
[ERROR] :  TiApplication:   at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2153)
[ERROR] :  TiApplication:   ... 11 more

Any idea why it isn't working ?

@Cryde
Copy link
Author

Cryde commented Oct 13, 2015

I have """""solve""""" this by adding a leftWindow but without displaying it !
This error only happend on Android ...

Any idea? :/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant