小编Nio*_*obu的帖子

Android错误 - 打开失败的ENOENT

我试图使用整数数组保存一些块覆盖,这只是节省块执行的次数.但是,出于某种原因,当我尝试写入我创建的一些文件时(例如,我在Eclipse中专门制作并放在项目目录中的"BlockForHelper.txt"),我收到此错误:

java.io.FileNotFoundException:  /nfs/guille/groce/users/nicholsk/workspace3/SQLTest/BlockForTest: open failed: ENOENT (No such file or directory)
at libcore.io.IoBridge.open(IoBridge.java:416)
at java.io.FileOutputStream.<init>(FileOutputStream.java:88)
at java.io.FileOutputStream.<init>(FileOutputStream.java:73)
at com.example.sql2.SQLTest.blockCoverage(SQLTest.java:149)
at com.example.sql2.test.SQLTestCase.testSuite(SQLTestCase.java:41)
at java.lang.reflect.Method.invokeNative(Native Method)
at android.test.InstrumentationTestCase.runMethod(InstrumentationTestCase.java:214)
at android.test.InstrumentationTestCase.runTest(InstrumentationTestCase.java:199)
at android.test.ActivityInstrumentationTestCase2.runTest(ActivityInstrumentationTestCase2.java:192)
at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:190)
at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:175)
at android.test.InstrumentationTestRunner.onStart(InstrumentationTestRunner.java:555)
at android.app.Instrumentation$InstrumentationThread.run(Instrumentation.java:1584)
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:400)
... 18 more
Run Code Online (Sandbox Code Playgroud)

并给我错误:

public void blockCoverage() throws IOException
{
    String coverage = "";
    for (int x = 0; x < 20; x++)
        coverage …
Run Code Online (Sandbox Code Playgroud)

eclipse android fileoutputstream

52
推荐指数
1
解决办法
12万
查看次数

strings.xml中的Android变量

在某处我读了如何在XML文档中使用变量.他们说这很简单,我想是的.我在Android strings.xml文件中成功地使用了它.我一整天都在使用它,直到突然android停止解析它并停止将其视为变量.

我用这种方式使用它:

<resources>
<string name="some_string">string1</string>
<string name="another_string"> {$some_string} trolololo </string>
</resources>
Run Code Online (Sandbox Code Playgroud)

并通过java访问它:getApplicationContext().getString(R.strings.another_string);

getApplicationContext().getString(R.strings.another_string);
Run Code Online (Sandbox Code Playgroud)

在我用来接收字符串的输出中:

string1 trolololo
Run Code Online (Sandbox Code Playgroud)

现在我只收到:

{$some_string} trolololo
Run Code Online (Sandbox Code Playgroud)

有谁知道什么是错的?我知道Android的XML可能与标准XML不同,但是它可以用于工作.Awww ...感谢任何建议.

xml variables parsing android

8
推荐指数
2
解决办法
2万
查看次数

Eclipse Android - Manifest中的Parser异常

我正在使用ADT在Eclipse Juno中开发Android应用程序.出于某种原因,我突然在我的程序中出错(这非常简单:我在菜单中添加了一些项目,就是这样)并且由于某种原因,我的项目似乎出错了,因为尝试运行它会导致失败,因为我的项目包含错误.奇怪的是,我的菜单XML文件和我的主要活动都没有显示任何错误,只是整个项目.反过来,当我尝试清理我的项目时,这会删除我的R.java文件.现在,当我尝试重新制作"图形"项目时,在进行任何修改之前,我得到了这个DDMS错误:

[2012-08-08 14:54:24 - com.android.ide.eclipse.adt.internal.project.AndroidManifestHelper] Parser exception for    /nfs/guille/groce/users/nicholsk/workspace3/Graphics/AndroidManifest.xml: The markup in the document following the root element must be well-formed.
[2012-08-08 14:54:24 - com.android.ide.eclipse.adt.internal.project.AndroidManifestHelper] Parser exception for /nfs/guille/groce/users/nicholsk/workspace3/Graphics/AndroidManifest.xml: The markup in the document following the root element must be well-formed.
[2012-08-08 14:54:24 - com.android.ide.eclipse.adt.internal.project.AndroidManifestHelper] Parser exception for /nfs/guille/groce/users/nicholsk/workspace3/Graphics/AndroidManifest.xml: The markup in the document following the root element must be well-formed.
[2012-08-08 14:54:24 - com.android.ide.eclipse.adt.internal.project.AndroidManifestHelper] Parser exception for /nfs/guille/groce/users/nicholsk/workspace3/Graphics/AndroidManifest.xml: The markup in the document following the root element must …
Run Code Online (Sandbox Code Playgroud)

eclipse android adt ddms

1
推荐指数
1
解决办法
7626
查看次数

标签 统计

android ×3

eclipse ×2

adt ×1

ddms ×1

fileoutputstream ×1

parsing ×1

variables ×1

xml ×1