Can not read apk file on android emulator - SDK 1.1

by danielececil...@gmail.com » Thu, 30 Apr 2009 02:05:56 GMT


Sponsored Links
 Hi,

It seems my code cannot read an apk File I have created on the Android
emulator.

- First off, I created an sdcard with command 'mksdcard ...'
- then I run this code:

------------- Begin Cut Here --------------->

File tmpdir = new File(tmpdirpath+name);

if (!tmpdir.exists())
 {
  boolean b = tmpdir.mkdirs();
 }
else
 {
  if (!tmpdir.isDirectory())
  {
   throw new RuntimeException("here : the tmp dir conflicts");
  }
 }
File apk = new File(tmpdirpath + name + "/" + name + ".apk");
if (!apk.exists())
 {
  apk.createNewFile();
 }
// with name = name of my apk file.

------------- End Cut Here --------------->

- The apk file is successfully created on a temporary directory on /
sdcard,
but I have no permissions to read it:

- - - - r w - r w -

- I tryed to change them:
# adb shell
# chmod 777 myFile.apk

No error but permissions remain the same

- - - - r w - r w -

and I get the following exception:
        04-28 14:56:16.296: ERROR/dalvikvm(231): Can't open dex cache '/data/
        dalvik-cache/
        
sdc...@.tmpdir@org.python.pycode._p...@org.python.pycode._pyx0.apk@classes.dex':
        No such file or directory
        04-28 14:56:16.296: INFO/dalvikvm(231): Unable to open or create
cache
        for /sdcard/.tmpdir/org.python.pycode._pyx0/
        org.python.pycode._pyx0.apk
        04-28 14:56:16.306: WARN/System.err(231): java.io.IOException: unable
        to open DEX file
        04-28 14:56:16.326: WARN/System.err(231):     at
        dalvik.system.DexFile.openDexFile(Native Method)
        04-28 14:56:16.336: WARN/System.err(231):     at
        dalvik.system.DexFile.<init>(DexFile.java:55)
        04-28 14:56:16.346: WARN/System.err(231):     at
        dalvik.system.DexFile.<init>(DexFile.java:41)
        04-28 14:56:16.355: WARN/System.err(231):     at
        org.python.debug.FixMe.getClassByName(FixMe.java:93)


Can somebody help please?


--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. Help about Alarm Clock

Hi

I want to make an application in which i want to set the alarm, so that my
application set the alarm directly...

for example

I am creating a reminder applicatioin in which i want to set the alarm on a
specific time and specific date...

please help me to tell me the class use in this case.

thanks

-- 
Ali Murtaza

BCSF06M021
Research Assistant
Data Virtulization Ware House
PUCIT, Lahore, Pakistan
ali.murt...@pucit.edu.pk

-- 

2. Oot: om google dibilang boong

bing jadi search engine di apple world? *sigh




> 

3. Oot: om google dibilang boong

4. Bug fix on android 2.1

5. Problem with invalidate

6. Young French Dev need help

7. How to determine size of a custom view