viezel / NappDrawer

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

[ANDROID] Including in a 3.6.x project targeting API 21 yields an error #135

Open stephenfeather opened 9 years ago

stephenfeather commented 9 years ago

Raising an issue to which we may attach findings as 3.6.x and Android 5 support progresses

{code} [ERROR] [Genymotion] TiApplication: (main) [852,1608] Sending event: exception on thread: main msg:java.lang.AbstractMethodError: abstract method not implemented; Titanium 3.6.0,2014/12/23 22:37,9b02f63 [ERROR] [Genymotion] TiApplication: java.lang.AbstractMethodError: abstract method not implemented [ERROR] [Genymotion] TiApplication: at dk.napp.drawer.DrawerProxy.windowCreated(DrawerProxy.java) [ERROR] [Genymotion] TiApplication: at org.appcelerator.titanium.TiActivityWindows.windowCreated(TiActivityWindows.java:33) [ERROR] [Genymotion] TiApplication: at org.appcelerator.titanium.TiBaseActivity.windowCreated(TiBaseActivity.java:450) [ERROR] [Genymotion] TiApplication: at org.appcelerator.titanium.TiBaseActivity.onCreate(TiBaseActivity.java:543) [ERROR] [Genymotion] TiApplication: at org.appcelerator.titanium.TiActivity.onCreate(TiActivity.java:18) [ERROR] [Genymotion] TiApplication: at android.app.Activity.performCreate(Activity.java:5104) [ERROR] [Genymotion] TiApplication: at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1080) [ERROR] [Genymotion] TiApplication: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2144) [ERROR] [Genymotion] TiApplication: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2230) [ERROR] [Genymotion] TiApplication: at android.app.ActivityThread.access$600(ActivityThread.java:141) [ERROR] [Genymotion] TiApplication: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1234) [ERROR] [Genymotion] TiApplication: at android.os.Handler.dispatchMessage(Handler.java:99) [ERROR] [Genymotion] TiApplication: at android.os.Looper.loop(Looper.java:137) [ERROR] [Genymotion] TiApplication: at android.app.ActivityThread.main(ActivityThread.java:5041) [ERROR] [Genymotion] TiApplication: at java.lang.reflect.Method.invokeNative(Native Method) [ERROR] [Genymotion] TiApplication: at java.lang.reflect.Method.invoke(Method.java:511) [ERROR] [Genymotion] TiApplication: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793) [ERROR] [Genymotion] TiApplication: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560) [ERROR] [Genymotion] TiApplication: at dalvik.system.NativeStart.main(Native Method) {code}

viezel commented 9 years ago

great.. Would be interesting to know whats wrong.

AnthonyNjuguna commented 9 years ago

I have drilled down to find that the error is being cause by line 139 in DrawerProxy.java because the extended class TiWindowProxy implements the method
public void windowCreated(TiBaseActivity activity, Bundle savedInstanceState)

and the line at 139 implements the method as

public void windowCreated(TiBaseActivity activity)

Thus causing an AbstractMethodError ---

Is it possible for you to make the change - or should i fork and ask for a pull request?

Thanks

stephenfeather commented 9 years ago

You should fork and send a PR. Thank you.

adamkearsley commented 9 years ago

@AnthonyNjuguna That fix was merged after i added it to a Pull Request yet its not worked. Just tried with 4.0.0 SDK on Android 5 and same error.

AnthonyNjuguna commented 9 years ago

@adamkearsley I will have another look at it.

AnthonyNjuguna commented 9 years ago

@adamkearsley Try the dist from this branch and tell me wether this fixes your issue https://github.com/AnthonyNjuguna/NappDrawer/tree/issue-%23135