Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-24201] Hyperloop: Android - Can't find requested module from .aar file in android

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionDuplicate
Resolution Date2017-03-21T12:59:11.000+0000
Affected Version/sRelease 6.0.0, Hyperloop 2.0.1, Hyperloop 2.0.0
Fix Version/sn/a
ComponentsAndroid, Hyperloop
Labelsn/a
ReporterMostafizur Rahman
AssigneeGary Mathews
Created2016-12-07T17:30:42.000+0000
Updated2017-03-29T21:29:42.000+0000

Description

*Steps to reproduce* : 1. Create a test project. 2. Enable Hyperloop. 3. Add [Third-party libraries](http://www.filedropper.com/video-android-100-beta4) on Platform > android 4. Add the following code in index.js
(function constructor(args) {
    var VideoView = require('com.twilio.video.VideoView');

    var Activity = require('android.app.Activity');
    var activity = new Activity(Ti.Android.currentActivity);
    
    var primaryVideoView = new VideoView(activity);    
     $.container.add(primaryVideoView);


    $.container.open();
})(arguments[0] || {});
5. Build on android devices. *Error Log* :
[ERROR] :  TiExceptionHandler: (main) [419,419] ----- Titanium Javascript Runtime Error -----
[ERROR] :  TiExceptionHandler: (main) [1,420] - In ti:/module.js:303,2
[ERROR] :  TiExceptionHandler: (main) [0,420] - Message: Uncaught Error: Requested module not found: com.twilio.video.VideoView
[ERROR] :  TiExceptionHandler: (main) [0,420] - Source: 	throw new Error("Requested module not found: " + request); // TODO Set 'code' property to 'MODULE_NOT_FOUND' to match Node?
[ERROR] :  V8Exception: Exception occurred at ti:/module.js:303: Uncaught Error: Requested module not found: com.twilio.video.VideoView
[ERROR] :  SensorManager: uid = 10413
*Test Environment*
Operating System
  Name                        = Mac OS X
  Version                     = 10.11.6
  Architecture                = 64bit
  # CPUs                      = 4
  Memory                      = 8589934592
Node.js
  Node.js Version             = 4.4.4
  npm Version                 = 2.15.1
Titanium CLI
  CLI Version                 = 5.0.10
Titanium SDK
  SDK Version                 = 6.0.0.GA
  <module platform="android" version="2.0.0">hyperloop</module>

Comments

  1. Mostafizur Rahman 2016-12-12

    Thanks [~gmathews], Tested this issues with attached module and following test code. But its not working its showing bellow error. *Test Environments* Ti SDK 6.0.0.GA CLI 6.0.0 Hyperloop 2.1.0 hyperloop plugins 2.0.0 *Test Code*
       (function constructor(args) {
       
           var VideoView = require('com.twilio.video.VideoView');
       
           var Activity = require('android.app.Activity');
       
           var activity = new Activity(Ti.Android.currentActivity);
           var primaryVideoView = new VideoView(activity);    
       
            $.container.add(primaryVideoView);
       
           $.container.open();
       
       })(arguments[0] || {});
       
       
    *Errors*
       [ERROR] :  HyperloopProxy: (main) [435,435] Exception during instantiation of class 'com.twilio.video.VideoView'
       [ERROR] :  HyperloopProxy: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/twilio/video/R$styleable;
       [ERROR] :  HyperloopProxy: 	at com.twilio.video.VideoView.<init>(VideoView.java:55)
       [ERROR] :  HyperloopProxy: 	at com.twilio.video.VideoView.<init>(VideoView.java:50)
       [ERROR] :  HyperloopProxy: 	at java.lang.reflect.Constructor.newInstance(Native Method)
       [ERROR] :  HyperloopProxy: 	at java.lang.reflect.Constructor.newInstance(Constructor.java:288)
       [ERROR] :  HyperloopProxy: 	at hyperloop.ClassProxy.newInstance(ClassProxy.java:89)
       [ERROR] :  HyperloopProxy: 	at org.appcelerator.kroll.runtime.v8.V8Runtime.nativeRunModule(Native Method)
       [ERROR] :  HyperloopProxy: 	at org.appcelerator.kroll.runtime.v8.V8Runtime.doRunModule(V8Runtime.java:196)
       [ERROR] :  HyperloopProxy: 	at org.appcelerator.kroll.KrollRuntime.runModule(KrollRuntime.java:241)
       [ERROR] :  HyperloopProxy: 	at org.appcelerator.titanium.TiLaunchActivity.loadActivityScript(TiLaunchActivity.java:128)
       [ERROR] :  HyperloopProxy: 	at org.appcelerator.titanium.TiLaunchActivity.windowCreated(TiLaunchActivity.java:183)
       [ERROR] :  HyperloopProxy: 	at org.appcelerator.titanium.TiRootActivity.windowCreated(TiRootActivity.java:107)
       [ERROR] :  HyperloopProxy: 	at org.appcelerator.titanium.TiBaseActivity.onCreate(TiBaseActivity.java:673)
       [ERROR] :  HyperloopProxy: 	at org.appcelerator.titanium.TiLaunchActivity.onCreate(TiLaunchActivity.java:169)
       [ERROR] :  HyperloopProxy: 	at org.appcelerator.titanium.TiRootActivity.onCreate(TiRootActivity.java:96)
       [ERROR] :  HyperloopProxy: 	at android.app.Activity.performCreate(Activity.java:5990)
       [ERROR] :  HyperloopProxy: 	at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1106)
       [ERROR] :  HyperloopProxy: 	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2278)
       [ERROR] :  HyperloopProxy: 	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2387)
       [ERROR] :  HyperloopProxy: 	at android.app.ActivityThread.access$800(ActivityThread.java:151)
       [ERROR] :  HyperloopProxy: 	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1303)
       [ERROR] :  HyperloopProxy: 	at android.os.Handler.dispatchMessage(Handler.java:102)
       [ERROR] :  HyperloopProxy: 	at android.os.Looper.loop(Looper.java:135)
       [ERROR] :  HyperloopProxy: 	at android.app.ActivityThread.main(ActivityThread.java:5254)
       [ERROR] :  HyperloopProxy: 	at java.lang.reflect.Method.invoke(Native Method)
       [ERROR] :  HyperloopProxy: 	at java.lang.reflect.Method.invoke(Method.java:372)
       [ERROR] :  HyperloopProxy: 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
       [ERROR] :  HyperloopProxy: 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)
       [ERROR] :  HyperloopProxy: Caused by: java.lang.ClassNotFoundException: Didn't find class "com.twilio.video.R$styleable" on path: DexPathList[[zip file "/data/app/com.twilioandroid-1/base.apk"],nativeLibraryDirectories=[/data/app/com.twilioandroid-1/lib/x86, /vendor/lib, /system/lib]]
       [ERROR] :  HyperloopProxy: 	at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
       [ERROR] :  HyperloopProxy: 	at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
       [ERROR] :  HyperloopProxy: 	at java.lang.ClassLoader.loadClass(ClassLoader.java:469)
       [ERROR] :  HyperloopProxy: 	... 27 more
       [ERROR] :  HyperloopProxy: 	Suppressed: java.lang.ClassNotFoundException: com.twilio.video.R$styleable
       [ERROR] :  HyperloopProxy: 		at java.lang.Class.classForName(Native Method)
       [ERROR] :  HyperloopProxy: 		at java.lang.BootClassLoader.findClass(ClassLoader.java:781)
       [ERROR] :  HyperloopProxy: 		at java.lang.BootClassLoader.loadClass(ClassLoader.java:841)
       [ERROR] :  HyperloopProxy: 		at java.lang.ClassLoader.loadClass(ClassLoader.java:504)
       [ERROR] :  HyperloopProxy: 		... 28 more
       [ERROR] :  HyperloopProxy: 	Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack available
       
       
    Can you please review again? Thanks Again
  2. Gary Mathews 2016-12-12

    master: https://github.com/appcelerator/hyperloop.next/pull/108 2_0_X: https://github.com/appcelerator/hyperloop.next/pull/109
  3. Gary Mathews 2016-12-12

    Duplicate of TIMOB-24176
  4. Lee Morris 2017-03-29

    Closing ticket as duplicate.

JSON Source