Steve Luke wrote:Will get back to you about URI. Half of it is 'why toURI() is needed'... but lack of time now for details.
Steve Luke wrote:
Writing off a means to do something is almost always a red flag. Why don't you want to do it the easiest way?
Rico Felix wrote:To solve you can either go up and out of the src directory then down into the dict directory or specify the absolute path from the root of the file system
Seeing that the RowReader class is within src/com/example/dict and the dict directory is relative to the src directory to access the file in that directory your path will have to be specified as ../../../../dict/en_US2sv_SV.dict or you can specify the absolute path as say /home/sven/workspace/Dictionary/dict/en_US2sv_SV.dict
Paul Clapham wrote:
Sven Sylta wrote:The dict-folder is on the same level as the source-folder.
But your code looks for it in the root directory. Remember, just because you see your code as an "Android project", that doesn't change how the operating system sees your file. If it starts with "/" then it starts looking for it in the root directory, not in your source directory.
Tony Docherty wrote:Try creating a File object for this path and print out the value returned from calling its getAbsolutePath() method. Is this value the same as the absolute path to the file on the file system?
Ulf Dittmer wrote:You're setting "activity_main" as the layout, not "fragment_main" - which contains the spinners.
Pawel Pawlowicz wrote:IX is an interface-type reference. Such reference can be cast without compiler error to every class (well... except final classes that don't implement that interface).
You are casting IX reference to type B. B does not implement IX but some class that extends B could do that. Change B definition to final and you will see compile time error.
Pawel Pawlowicz wrote:Second cast:
This cast is legal at compile time. You are getting compiler error because you are trying to cast variable a which does not exist!