i had an issue with the following code lines i dont know how can i solve this i tried alot but i am fail
java.io.FileNotFoundException mediaItem.getUriCropped() my code is so simple i put mediaitem.getUriCropped into
myimage_path = new File(mediaItem.getUriCropped().toString());
myimage_path.getAbsolutePath(); and after that i pass it to multipart calss where it can be send to server after doing this i am recieving this in my logcat...............
01-19 12:29:41.929 31583-31609/app.bir.com.truelie E/exception﹕ sendPostRequest
java.io.FileNotFoundException: /file:/storage/emulated/0/Android/data/app.bir.com.truelie/files/caches/1453188569226217639967.tmp: open failed: ENOENT (No such file or directory)
at libcore.io.IoBridge.open(IoBridge.java:409)
at java.io.FileInputStream.(FileInputStream.java:78)
at app.bir.com.truelie.post.MultipartPost.postFileParameter(MultipartPost.java:90)
at app.bir.com.truelie.post.MultipartPost.send(MultipartPost.java:49)
at app.bir.com.truelie.Addnew.addtruelie$Post_Truelie.doInBackground(addtruelie.java:491)
at app.bir.com.truelie.Addnew.addtruelie$Post_Truelie.doInBackground(addtruelie.java:457)
at android.os.AsyncTask$2.call(AsyncTask.java:287)
at java.util.concurrent.FutureTask.run(FutureTask.java:234)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:230)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573)
at java.lang.Thread.run(Thread.java:841)
Caused by: libcore.io.ErrnoException: open failed: ENOENT (No such file or directory)
at libcore.io.Posix.open(Native Method)
at libcore.io.BlockGuardOs.open(BlockGuardOs.java:110)
at libcore.io.IoBridge.open(IoBridge.java:393)
at java.io.FileInputStream.(FileInputStream.java:78)
at app.bir.com.truelie.post.MultipartPost.postFileParameter(MultipartPost.java:90)
at app.bir.com.truelie.post.MultipartPost.send(MultipartPost.java:49)
at app.bir.com.truelie.Addnew.addtruelie$Post_Truelie.doInBackground(addtruelie.java:491)
at app.bir.com.truelie.Addnew.addtruelie$Post_Truelie.doInBackground(addtruelie.java:457)
at android.os.AsyncTask$2.call(AsyncTask.java:287)
at java.util.concurrent.FutureTask.run(FutureTask.java:234)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:230)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573)
at java.lang.Thread.run(Thread.java:841)................
and the other thing i am using universalImageloader library to set image on my imageView i use the following line of code and its working fine ......................
imageLoader.getInstance().displayImage(mediaItem.getUriCropped().toString(), mCropImageView);
please also have a look at my multipart class ..........
i had an issue with the following code lines i dont know how can i solve this i tried alot but i am fail java.io.FileNotFoundException mediaItem.getUriCropped() my code is so simple i put mediaitem.getUriCropped into myimage_path = new File(mediaItem.getUriCropped().toString()); myimage_path.getAbsolutePath(); and after that i pass it to multipart calss where it can be send to server after doing this i am recieving this in my logcat...............
01-19 12:29:41.929 31583-31609/app.bir.com.truelie E/exception﹕ sendPostRequest java.io.FileNotFoundException: /file:/storage/emulated/0/Android/data/app.bir.com.truelie/files/caches/1453188569226217639967.tmp: open failed: ENOENT (No such file or directory) at libcore.io.IoBridge.open(IoBridge.java:409) at java.io.FileInputStream.(FileInputStream.java:78)
at app.bir.com.truelie.post.MultipartPost.postFileParameter(MultipartPost.java:90)
at app.bir.com.truelie.post.MultipartPost.send(MultipartPost.java:49)
at app.bir.com.truelie.Addnew.addtruelie$Post_Truelie.doInBackground(addtruelie.java:491)
at app.bir.com.truelie.Addnew.addtruelie$Post_Truelie.doInBackground(addtruelie.java:457)
at android.os.AsyncTask$2.call(AsyncTask.java:287)
at java.util.concurrent.FutureTask.run(FutureTask.java:234)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:230)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573)
at java.lang.Thread.run(Thread.java:841)
Caused by: libcore.io.ErrnoException: open failed: ENOENT (No such file or directory)
at libcore.io.Posix.open(Native Method)
at libcore.io.BlockGuardOs.open(BlockGuardOs.java:110)
at libcore.io.IoBridge.open(IoBridge.java:393)
at java.io.FileInputStream.(FileInputStream.java:78)
at app.bir.com.truelie.post.MultipartPost.postFileParameter(MultipartPost.java:90)
at app.bir.com.truelie.post.MultipartPost.send(MultipartPost.java:49)
at app.bir.com.truelie.Addnew.addtruelie$Post_Truelie.doInBackground(addtruelie.java:491)
at app.bir.com.truelie.Addnew.addtruelie$Post_Truelie.doInBackground(addtruelie.java:457)
at android.os.AsyncTask$2.call(AsyncTask.java:287)
at java.util.concurrent.FutureTask.run(FutureTask.java:234)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:230)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573)
at java.lang.Thread.run(Thread.java:841)................
and the other thing i am using universalImageloader library to set image on my imageView i use the following line of code and its working fine ...................... imageLoader.getInstance().displayImage(mediaItem.getUriCropped().toString(), mCropImageView);
please also have a look at my multipart class ..........
public class MultipartPost {
}