Error while building FBReaderJ 0.5.27 for Android in Eclipse

117 views
Skip to first unread message

Wang

unread,
Oct 29, 2009, 9:51:01 PM10/29/09
to FBReader
Hi,

Whie building FBReaderJ 0.5.27 for Android in Eclipse, I found that
it seems some necessary xml files are missing.

For example, in LibraryTabActivity.java,

Line 198 :
LayoutInflater.from(parent.getContext()).inflate
(R.layout.library_tree_item, parent, false);

Line 205 :
final ImageView iconView = (ImageView)view.findViewById
(R.id.library_tree_item_icon);

but library_tree_item.xml doesn't exist in the source package of
FBReaderJ, and id cannot be found in R.java.

Anybody help me please?

geometer

unread,
Oct 30, 2009, 12:01:04 AM10/30/09
to FBReader
Hi,

You're right, the directory 'res' was missing in the source archive.
Thank you for the report. I've replaced the archive on the site.
Please download it again.

Best,

-- Nikolay

Wang

unread,
Nov 1, 2009, 9:38:11 PM11/1/09
to FBReader
Hi,

Thank you very much for your response.

But it seems there are a few problem existing, the following is the
debug message from eclipse :

R.drawable.ic_tab_library_author cannot be resolved
LibraryTabActivity.java
R.drawable.ic_tab_library_recent cannot be resolved
LibraryTabActivity.java
R.drawable.ic_tab_library_results cannot be resolved
LibraryTabActivity.java
R.drawable.ic_tab_library_tag cannot be resolved
LibraryTabActivity.java
R.drawable.text_search_close cannot be resolved FBReader.java
R.drawable.text_search_next cannot be resolved FBReader.java
R.drawable.text_search_previous cannot be resolved FBReader.java
R.raw cannot be resolved to a type ZLAndroidLibrary.java

I guess the lines starting with "R.drawable" indicate that a number
of png file are missed in the project. We could duplicate other png
files in the drawable folder to get the files with right name, it will
be ok.

But the last line "R.raw cannot be resolved to a type
ZLAndroidLibrary.java" seems something important is not there?
The line in the source require R.raw is ZLAndroidLibrary.java(line
107)
myResourceId = R.raw.class.getField(fieldName).getInt(null);

Could you give me a hand please?

BRs,

Wang

Luke

unread,
Nov 3, 2009, 9:11:18 AM11/3/09
to FBReader
Dear Wang and geometer,

sorry to bother you.
i am trying to build FBReaderJ 0.5.27 source.
however, it seems don't meet Android project Architecture.
thereby, i try to create the create build source architecture by
"packagetool.sh" and get error message as below.

error message -
sed: can't read AndroidManifest.xml.pattern: No such file or directory
Buildfile: build.xml
BUILD FAILED
/luke/android/source/build-env/sqp/project/nv-t20/modified/external/
FBReaderJ-sources-0.5.27/build.xml:17: taskdef class
com.android.ant.SetupTask cannot be found

would you please guide me how to build the FBReaderJ source?
thanks a lot.

Luke

geometer

unread,
Nov 4, 2009, 12:06:43 PM11/4/09
to FBReader
Luke,

Sorry, that's my mistake again. I forget to add AndroidManifest.xml
(and some more files) into the archive, sorry. :(

I've builded new version of source package and I've tested this
version! I hope there are no new mistakes this time. :)

An instruction about building is also included into this package.

In short:
0) Download it again and unzip.
1) Edit 'local.properties' file to set up a correct path to the SDK
1.6.
2) Run './createRawResources.py' (python is required).
3) Run 'ant release'.

Sorry again and thank you for your questions.

Best,

-- Nikolay

Luke

unread,
Nov 5, 2009, 9:29:14 PM11/5/09
to FBReader
Dear Nikolay,

thanks for your support.
it can work now. thanks a again.

Luke

Wang

unread,
Nov 9, 2009, 5:03:24 AM11/9/09
to FBReader
Nikolay,

Thank you for your reversion, it can be built now.

But there is another issue rising, while trying install the apk
(FBReaderJ-unsigned.apk) into the emulator, the following error
messages take place:

---------------------------------------------------------
./adb install FBReaderJ-unsigned.apk
* daemon not running. starting it now *
* daemon started successfully *
190 KB/s (592829 bytes in 3.036s)
pkg: /data/local/tmp/FBReaderJ-unsigned.apk
Failure [INSTALL_PARSE_FAILED_NO_CERTIFICATES]
---------------------------------------------------------

I used android emulator to execute FBReaderJ, and I tried "Android
1.5 - API Level 3" and "Android 1.6 - API Level 4", the AVDs are new
created, and the error take place.

Does Nikolay or any guy get the some issue or have solutions?

BRs,

Winston

geometer

unread,
Nov 9, 2009, 10:23:50 AM11/9/09
to FBReader
Winston,

You must sign the package before installing as desribed e.g. here:
http://developer.android.com/guide/publishing/app-signing.html

You can just run 'ant debug' to compile and sign the package with a
debug key.

The files for signing FBReader with the development team key are of
course no public. :)

Best,

-- Nikolay

Wang

unread,
Nov 11, 2009, 4:05:38 AM11/11/09
to FBReader
Nikolay,

Thank you very much, it works....:)

BRs,

Winston
Reply all
Reply to author
Forward
0 new messages