[AC-4476] Hyperloop: Error creating proxy on Android
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | n/a |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2016-10-01T17:09:37.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | n/a |
Labels | android |
Reporter | Kai De Sutter |
Assignee | Shak Hossain |
Created | 2016-09-19T12:40:35.000+0000 |
Updated | 2016-10-01T17:09:37.000+0000 |
Description
When requiring any kind of Android library, native or 3th party, in any of my apps (even vanilla), I receive an "Error creating proxy" error:
[ERROR] KrollProxy: (main) [14293,19746] Error creating proxy
[ERROR] KrollProxy: java.lang.NoSuchMethodException: <init> [class org.appcelerator.titanium.TiContext]
[ERROR] KrollProxy: at java.lang.Class.getConstructor(Class.java:528)
[ERROR] KrollProxy: at java.lang.Class.getConstructor(Class.java:492)
[ERROR] KrollProxy: at org.appcelerator.kroll.KrollProxy.createDeprecatedProxy(KrollProxy.java:161)
[ERROR] KrollProxy: at org.appcelerator.kroll.runtime.v8.V8Object.nativeFireEvent(Native Method)
[ERROR] KrollProxy: at org.appcelerator.kroll.runtime.v8.V8Object.fireEvent(V8Object.java:62)
[ERROR] KrollProxy: at org.appcelerator.kroll.KrollProxy.doFireEvent(KrollProxy.java:918)
[ERROR] KrollProxy: at org.appcelerator.kroll.KrollProxy.handleMessage(KrollProxy.java:1141)
[ERROR] KrollProxy: at org.appcelerator.titanium.proxy.TiViewProxy.handleMessage(TiViewProxy.java:357)
[ERROR] KrollProxy: at ti.modules.titanium.ui.widget.listview.ListViewProxy.handleMessage(ListViewProxy.java:312)
[ERROR] KrollProxy: at android.os.Handler.dispatchMessage(Handler.java:98)
[ERROR] KrollProxy: at android.os.Looper.loop(Looper.java:234)
[ERROR] KrollProxy: at android.app.ActivityThread.main(ActivityThread.java:5526)
[ERROR] KrollProxy: at java.lang.reflect.Method.invoke(Native Method)
[ERROR] KrollProxy: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
[ERROR] KrollProxy: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
For example:
var SipManager = require("android.net.sip.SipManager");
Attachments
File | Date | Size |
---|---|---|
log.log | 2016-09-20T00:04:10.000+0000 | 98084 |
screenshot-1.png | 2016-09-19T23:54:31.000+0000 | 101053 |
Hello, Can you send a sample code or a sample project for us to test? We will test it in our environment and get back to you once we have tested it. Thanks.
Hi Sharif, It occurs even when compiling https://github.com/appcelerator/hyperloop-examples which makes me believe that there may be another issue. Also important perhaps is that I am testing with Android 6 in the emulator and on device. (updated environment in this ticket) When creating a new alloy project with only hyperloop enabled where I just add the following code:
So my index.js file looks like this:
I get:
Many thanks for looking into this!
Hello, Can you run "appc run -p android" without "ti build"? We have reports of this with 1.2.7 version the issue is not occurring. Did you ensure that your app is created with appc new and not ti create? Thanks.
Hi Sharif, thank you for your reply. I have tried that but get the same error:
Sharif! :-) Only now I noticed that I am still using hyperloop 1.2.6 and I feel stupid about that. The thing is, I was under the impression that I must be using Hyperloop 1.2.7 because I upgraded everything, CLI, SDK, ... through the normal procedure. I didn't find a way to properly upgrade hyperloop, so I deleted it completely and it downloaded again when creating a new project. Is there a better way to upgrade? Anyways, after testing it again, everything works just fine. Many thanks for your help, I think this can be closed now!