java.io.FileNotFoundException: /data/data/com.huacai.test/files/android.txt (No such file or directo

错误源信息:


java.io.FileNotFoundException: /data/data/com.huacai.test/files/android.txt (No such file or directory)

at org.apache.harmony.luni.platform.OSFileSystem.openImpl(Native Method)
at org.apache.harmony.luni.platform.OSFileSystem.open(OSFileSystem.java:152)
at java.io.FileInputStream.(FileInputStream.java:82)
at android.app.ContextImpl.openFileInput(ContextImpl.java:400)
at com.huacai.service.FileService.read(FileService.java:32)
at com.huacai.test.FileServiceTest.testRead(FileServiceTest.java:12)
at java.lang.reflect.Method.invokeNative(Native Method)
at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:169)
at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:154)
at android.test.InstrumentationTestRunner.onStart(InstrumentationTestRunner.java:520)

at android.app.Instrumentation$InstrumentationThread.run(Instrumentation.java:1447)



在Manifest.xml 文件中配置android:targetPackage配置错了包名

    package="com.huacai.files"   //注意这里是com.huacai.files
    android:versionCode="1"
    android:versionName="1.0" >


   
   android:targetPackage="com.huacai.test" //而这里是con.huacai.test ,将其改为 com.huacai.files
   android:label="my test for app"/>




你可能感兴趣的:(java.io.FileNotFoundException: /data/data/com.huacai.test/files/android.txt (No such file or directo)