开发者

can't compile FBReaderJ

开发者 https://www.devze.com 2023-02-01 18:06 出处:网络
Solved: The problem was: wrong version of Java. See my comments. Hi all, using fbreaderj-0.7.17 sources, and Android SDK update manager (Platform tools rev8, 1.6 SDK rev 3).

Solved: The problem was: wrong version of Java. See my comments.

Hi all, using fbreaderj-0.7.17 sources, and Android SDK update manager (Platform tools rev8, 1.6 SDK rev 3).

After ant compile, get the errors:

-pre-build:

-resource-src:
     [echo] Generating R.java / Manifest.java from the resources...
     [null] /opt/android-sdk-update-manager/platform-tools/aapt: /lib32/libz.so.1: no version information available (required by /opt/android-sdk-update-manager/platform-tools/aapt)
     [null] /tmp/FBReaderJ-sources-0.7.17/res/layout/main.xml:8: error: No resource identifier found for attribute 'fadeScrollbars' in package 'android'

BUILD FAILED
/opt/android-sdk-update-manager/tools/ant/main_rules.xml:306: null returned: 1

Targets:

/opt/android-sdk-update-manager/tools/android list targets
Available Android targets:
id: 1 or "android-4"
     Name: Android 1.6
     Type: Platform
     API level: 4
     Revision: 3
     Skins: QVGA, HVGA (default), WVGA800, WVGA854
id: 2 or "Google Inc.:Google APIs:4"
     Name: Google APIs
     Type: Add-On
     Vendor: Google Inc.
     Revision: 2
     Description: Android + Google APIs
     Based on Android 1.6 (API level 4)
     Libraries:
      * com.google.android.maps (maps.jar)
          API for Google Maps
     Skins: WVGA854, HVGA (default), WVGA800, QVGA

Pr开发者_JAVA百科oject update:

/opt/android-sdk-update-manager/tools/android update project --name FBReaderJ --path . --target 1

local.properties:

sdk.dir=/opt/android-sdk-update-manager

ndk.dir=/opt/android-ndk-5/


It looks to me that the main.xml file uses android:fadeScrollbars attribute that is not part of the API level you are using to build the project. I think you should use at least API level 5 to use that atribute.


Solution: (tested)

steps:

  1. /opt/android-sdk-update-manager/tools/android update project --name FBReaderJ --path . --target 2

    (you have to be on 1.6 and onwards. For 1.5 there is a different branch)

  2. from res\layout\main.xml remove the "fadeScrollbars" line

  3. from Android manifest you need to remove this: android:installLocation="auto"

  4. clean and rebuild (either by eclipse or with ant clean & ant release (or ant package)

For point 3. - also see this note about backward compatibility!

0

精彩评论

暂无评论...
验证码 换一张
取 消