Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-13075

Android:Module having images in assets folder installed in android application does not copy over assets during second build

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Low
    • Resolution: Cannot Reproduce
    • Affects Version/s: Release 3.0.0, Release 3.0.2
    • Fix Version/s: None
    • Component/s: Android
    • Environment:

      Android : 4.0.4
      Ti Studio : 3.0.2.201302191606

      Description

      Description

      In a custom android module having images in assets directory in which getting any image in Kroll.method using "context.getAssets().open("sample.jpg");" when installed to any blank android project it runs perfectly for the first time after cleaning it but again if try to install without cleaning it will not be able to find the file this time.

      Steps to Reproduce

      1. Create a Titanium Module Project and put any image in assets directory.
      2. In "example" @Kroll.method put this code :

      try {
          InputStream is = context.getAssets().open("sample.jpg");
          Log.d(LCAT, "inputstream=="+is);
      } catch (IOException e) {
          e.printStackTrace();
      }
      

      3. Install this module in Titanium android project.
      4. Clean the project and then install and run it.(It will run successfully this time)
      5. Now install the project again without cleaning it first, and run it again.(This time it will not be able to find the file)

      Error Logs

      java.io.FileNotFoundException: sample.jpg
      W/System.err(  957):    at android.content.res.AssetManager.openAsset(Native Method)
      W/System.err(  957):    at android.content.res.AssetManager.open(AssetManager.java:315)
      W/System.err(  957):    at android.content.res.AssetManager.open(AssetManager.java:289)
      W/System.err(  957):    at ti.gl.imagemod.SampleimagemodModule.example(SampleimagemodModule.java:55)
      W/System.err(  957):    at org.appcelerator.kroll.runtime.v8.V8Runtime.nativeRunModule(Native Method)
      W/System.err(  957):    at org.appcelerator.kroll.runtime.v8.V8Runtime.doRunModule(V8Runtime.java:140)
      W/System.err(  957):    at org.appcelerator.kroll.KrollRuntime.handleMessage(KrollRuntime.java:289)
      W/System.err(  957):    at org.appcelerator.kroll.runtime.v8.V8Runtime.handleMessage(V8Runtime.java:166)
      W/System.err(  957):    at android.os.Handler.dispatchMessage(Handler.java:95)
      W/System.err(  957):    at android.os.Looper.loop(Looper.java:137)
      W/System.err(  957):    at org.appcelerator.kroll.KrollRuntime$KrollRuntimeThread.run(KrollRuntime.java:112)
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                emerriman Eric Merriman
                Reporter:
                rsharma Rupesh Sharma
              • Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Backbone Issue Sync

                  • Titanium SDK/CLI <> Titanium Mobile
                    Synced with:
                    TIMOB-15903
                    Sync status:
                    ERROR
                    Last received:
                    Last sent:

                    Git Integration