java.io.FileNotFoundException: sample.jpg

Appcelerator JIRA | Rupesh Sharma | 4 years ago
  1. 0

    h2. 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. h2. Steps to Reproduce 1. Create a Titanium Module Project and put any image in assets directory. 2. In "example" @Kroll.method put this code : {code} try { InputStream is = context.getAssets().open("sample.jpg"); Log.d(LCAT, "inputstream=="+is); } catch (IOException e) { e.printStackTrace(); } {code} 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) h2. Error Logs {code} 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) {code}

    Appcelerator JIRA | 4 years ago | Rupesh Sharma
    java.io.FileNotFoundException: sample.jpg
  2. 0

    I only have Arabic as my sour...

    GitHub | 2 years ago | door43app
    java.io.FileNotFoundException: sourceTranslations/jhn/ar/avd/notes.json
  3. Speed up your debug routine!

    Automated exception search integrated into your IDE

  4. 0

    Test

    GitHub | 2 years ago | door43app
    java.io.FileNotFoundException: sourceTranslations/num/ar/avd/notes.json
  5. 0

    crash report

    GitHub | 2 years ago | door43app
    java.io.FileNotFoundException: sourceTranslations/obs/en/resources_catalog.link
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.io.FileNotFoundException

    sample.jpg

    at android.content.res.AssetManager.openAsset()
  2. Android Platform
    AssetManager.open
    1. android.content.res.AssetManager.openAsset(Native Method)
    2. android.content.res.AssetManager.open(AssetManager.java:315)
    3. android.content.res.AssetManager.open(AssetManager.java:289)
    3 frames
  3. ti.gl.imagemod
    SampleimagemodModule.example
    1. ti.gl.imagemod.SampleimagemodModule.example(SampleimagemodModule.java:55)
    1 frame
  4. org.appcelerator.kroll
    V8Runtime.handleMessage
    1. org.appcelerator.kroll.runtime.v8.V8Runtime.nativeRunModule(Native Method)
    2. org.appcelerator.kroll.runtime.v8.V8Runtime.doRunModule(V8Runtime.java:140)
    3. org.appcelerator.kroll.KrollRuntime.handleMessage(KrollRuntime.java:289)
    4. org.appcelerator.kroll.runtime.v8.V8Runtime.handleMessage(V8Runtime.java:166)
    4 frames
  5. Android Platform
    Looper.loop
    1. android.os.Handler.dispatchMessage(Handler.java:95)
    2. android.os.Looper.loop(Looper.java:137)
    2 frames
  6. org.appcelerator.kroll
    KrollRuntime$KrollRuntimeThread.run
    1. org.appcelerator.kroll.KrollRuntime$KrollRuntimeThread.run(KrollRuntime.java:112)
    1 frame