java - Android: Error opening trace file -


I'm trying to write an Android app that uses the list to keep a list of cars in OnCreate () I start an adapter so that I can show cars as a scroll list with icons. When I start, I run a loop to see all the cars that have QR codes saved on the phone, so I will not have to make them again. Inside the loop is the code that takes every car and adds its name to the name of the QR code. If this is the case, the code is given to the car and it activates a flag which says there is a code in that car.

  Private zero fillcodes (list & lt; car & gt; list cars) {file dir = getFilesDir (); If (dir.isDirectory ()) {String [] children = dir.list (); String [] arr = new string [4]; For (int i = 0; i  

This is the method that I want to generate and save codes Use:

  Private Zero Save-In-Eternal Accumulation (bitmap bitmap image, string name, string car, int car id, int dayd) {Referrer CW = new event (Received) Krenanukrmnikaan) ()); File directory = cw.getFilesDir (); Calendar date = calendar.jistence (); SimpleDateFormat df = New SimpleDateform ("yyMMdd"); String dateTicket = df.format (date.getTime ()); File Myth = new file (directory, day.cacket ("#"). Concepts (Car) .concat ("#"). Conceat (integer .stosting (CARID)) Conceit ("#"). Context (integer. ToString (dayId) concat ("#JPG")); FileOutputStream fos = Faucet; Try Fos = new FileOutputStream (MyPath); BitmapImage.compress (bitmap.compress format.png, 100, foss); Fos.close (); } Hold (exception e) {e.printStackTrace (); }  

log. I ("directory", directory.getAbsolutePath ()); } The code runs well for a while but after the list starts and I tap on a club, I get this error:

  Error opening trace file: any such file Or directory (2)  

I am not using an SD card to save my code. Codes are saved internally and I am sure that this error is caused by something inside. I came to know that by not commenting the code till I got the error.

Do you know why this happens? Thanks!


Comments