viezel / NappDrawer

A side drawer navigation container view controller for Appcelerator Titanium.
MIT License
247 stars 128 forks source link

[Android] addWindowToStack error using v2.0.2 in TiSDK 8 #222

Closed Astrovic closed 5 years ago

Astrovic commented 5 years ago

The drawer works fine, but the app shows an error message even just using this simple drawer:

var NappDrawerModule = require('dk.napp.drawer');
var splitView = NappDrawerModule.createDrawer({
    leftWindow: Ti.UI.createView({backgroundColor:"blue"}),
    centerWindow: Ti.UI.createView({backgroundColor:"purple"}),
    rightWindow: Ti.UI.createView({backgroundColor:"red"}),
    fading: 0.2, // 0-1
    parallaxAmount: 0.2, //0-1
    shadowWidth:"40dp",
    leftDrawerWidth: "270dp",
    rightDrawerWidth: "270dp", 
});
splitView.open();

Error message:

[ERROR] TiExceptionHandler: (main) [413,3919] No virtual method addWindowToStack(Lorg/appcelerator/titanium/proxy/TiWindowProxy;)V in class Lorg/appcelerator/titanium/TiBaseActivity; or its super classes (declaration of 'org.appcelerator.titanium.TiBaseActivity' appears in /data/app/com.astrovic.drawer-uQ6VpCTN80jIz5NYTM3PvQ==/base.apk)
[ERROR] TiExceptionHandler:
[ERROR] TiExceptionHandler:     dk.napp.drawer.DrawerProxy.windowCreated(DrawerProxy.java:153)
[ERROR] TiExceptionHandler:     org.appcelerator.titanium.TiActivityWindows.windowCreated(TiActivityWindows.java:57)
[ERROR] TiExceptionHandler:     org.appcelerator.titanium.TiBaseActivity.windowCreated(TiBaseActivity.java:578)
[ERROR] TiExceptionHandler:     org.appcelerator.titanium.TiBaseActivity.onCreate(TiBaseActivity.java:726)
[ERROR] TiExceptionHandler:     org.appcelerator.titanium.TiActivity.onCreate(TiActivity.java:47)
[ERROR] TiExceptionHandler:     android.app.Activity.performCreate(Activity.java:7383)
[ERROR] TiExceptionHandler:     android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1218)
[ERROR] TiExceptionHandler:     android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3256)
[ERROR] TiExceptionHandler:     android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3411)
[ERROR] TiExceptionHandler:     android.app.ActivityThread.-wrap12(Unknown Source:0)
[ERROR] TiExceptionHandler:     android.app.ActivityThread$H.handleMessage(ActivityThread.java:1994)
[ERROR] TiExceptionHandler:     android.os.Handler.dispatchMessage(Handler.java:108)
[ERROR] TiExceptionHandler:     android.os.Looper.loop(Looper.java:166)
[ERROR] TiExceptionHandler:     android.app.ActivityThread.main(ActivityThread.java:7529)
[ERROR] TiExceptionHandler:     java.lang.reflect.Method.invoke(Native Method)
[ERROR] TiExceptionHandler:     com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:245)
[ERROR] TiExceptionHandler:     com.android.internal.os.ZygoteInit.main(ZygoteInit.java:921)
Astrovic commented 5 years ago

This solves the issue: https://github.com/SquirrelMobile/NappDrawer/commit/8407e302b2e9ad51f876641185b6cc7df101f5d9

viezel commented 5 years ago

@Astrovic great. please make a PR that I can merge.