Uploaded image for project: 'Appcelerator - INBOX'
  1. Appcelerator - INBOX
  2. AC-5075

Android native module build script doesn't correctly generate R.java for included libraries

    Details

      Description

      I'm trying to make a module that include a library with its own layout places under platform/android/res folder.
      Inside the module manifest I also specified respackage com.libray.included.

      I build the module using ti build -p android --build-only, unpack it in my sample app, run the app and when I call the module I get:

      [WARN]  W/System.err: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/library/included/R$layout;
      [WARN]  W/System.err:     at com.library.included.CustomView.<init>(CustomView.java:131)
      [WARN]  W/System.err:     at com.library.included.CustomView.make(CustomView.java:138)
      [WARN]  W/System.err:     at av.snackbar.SnackbarProxy.make(CustomProxy.java:60)
      [WARN]  W/System.err:     at org.appcelerator.kroll.runtime.v8.V8Function.nativeInvoke(Native Method)
      [WARN]  W/System.err:     at org.appcelerator.kroll.runtime.v8.V8Function.callSync(V8Function.java:57)
      [WARN]  W/System.err:     at org.appcelerator.kroll.runtime.v8.V8Function.call(V8Function.java:43)
      [WARN]  W/System.err:     at ti.modules.titanium.TitaniumModule$Timer.run(TitaniumModule.java:147)
      [WARN]  W/System.err:     at android.os.Handler.handleCallback(Handler.java:739)
      [WARN]  W/System.err:     at android.os.Handler.dispatchMessage(Handler.java:95)
      [WARN]  W/System.err:     at android.os.Looper.loop(Looper.java:148)
      [WARN]  W/System.err:     at android.app.ActivityThread.main(ActivityThread.java:5417)
      [WARN]  W/System.err:     at java.lang.reflect.Method.invoke(Native Method)
      [WARN]  W/System.err:     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
      [WARN]  W/System.err:     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
      

      If you try to build the module using ant, install the module inside the app and running it the module will work as well.

        Attachments

          Activity

            People

            • Assignee:
              shossain Shak Hossain
              Reporter:
              Andrea.Vitale Andrea Vitale
            • Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Git Source Code