Peter,
When I try this it doesn't recognize getResources() and says it is
undefined.
Steve,
Well, this is what I find:
com.l1ghtm4n.text2speech.R <- this is the one I was importing as
it contains the raw.myfilename for the file I am trying to open. This
R file does include the line "package com.l1ghtm4n.text2speech;".
android.R
com.android.internal.R
Does that tell you what you were asking?
Kelsey
On Oct 6, 4:14 am, Peter Stevenson <[EMAIL PROTECTED]> wrote:
> Peter Wrote
>
> private InputStream inputFile;
>
> inputFile = getResources().openRawResource(R.raw.waypoints);
> dbHelper.readWatpointIn(inputFile);
>
> Hope this helps
>
> kelseywright wrote:
> > No one has any suggestions on how to troubleshoot this? =(
>
> > On Oct 4, 11:21 pm, kelseywright <[EMAIL PROTECTED]> wrote:
>
> >> Hello,
>
> >> I am trying to open a file in res/raw. I've tried to open it with code
> >> similar to the following:
>
> >> int file = R.raw.myfilename;
> >> System.err.println("file:" + file);
> >> Resources res = Resources.getSystem();
> >> System.err.println("Resources created");
> >> InputStream compiledIS = res.openRawResource(file);
>
> >> When I compile and run the emulator the first 4 lines work fine and it
> >> prints out the file id and the Resources created message, but fails on
> >> the last line with the message:
>
> >> 10-05 03:08:22.896: WARN/ResourceType(218): No package identifier when
> >> getting value for resource number 0x7f040005
>
> >> I've tried searching Groups and haven't been able to find anyone else
> >> with the same problem. I am doing everything the documentation I have
> >> been able to find says to do, so I must be doing something wrong that
> >> I am not seeing. Does anyone else have more file experience with
> >> Android that could provide some suggestions?
>
> >> Kelsey
>
> >> PS. I am still on SDK 0.9 and haven't upgraded yet.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---