Who do anyone work with FBReader open source? - android

Newly, I want to work with FBReader. I took it's codes from github and download Android NDK and cygwin. But I have several problems.
I need your help for config and use these codes. I install Cygwin and try to config it but I get the following error in codes:
1. I get error in main.xml : "error: No resource identifier found for attribute 'fadeScrollbars' in package 'android' "
2. I get errors in src/... : " The import org.geometerplus.zlibrary.ui.android.R cannot be resolved " (for line: import org.geometerplus.zlibrary.ui.android.R; )
3. In HowToBuild file I don't understand which create 'local.properties' file and how to set address for sdk.dir && ndk.dir
4. In .bashrc file where should I insert parameters? (which line)
5. Does Android NDK should config? How?
I search and study a lot of, But I can't use FBReader. Could you help me, please?
By the way, I used Eclipse.
Thanks and Regards, Omid

you may build NDK using cmd.
ndk-build -C your_project_location
this link will help you.

This is what I did: I downloaded and extracted the NDK. Then I ran the NDK-build command on the project directory in CMD:
cd: <PROJECT SOURCE DIRECTORY>
<PATH-TO-NDK FOLDER>\ndk-build
After its built, follow steps inside of the FBBuilder readme. Setting the path are super easy. Create file local.properties in the root of FBReader project, and inside it enter the SDK and NDK paths just as shown in the readme. If you have winodws, your path would be something like this C:\android\android_ndk, etc.
Once you do that, you should come across the following error: org.geometerplus.zlibrary.ui.android.R is unresolved. This even I don't know how to fix. I'm currently researching this.

I was also getting the same problem. First try to resolve other issues in your project. This file is generated automatically by your sdk, so don't bother about that. Also the package name in your manifest file must be same as below:-
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.geometerplus.zlibrary.ui.android"
android:installLocation="auto"
android:versionCode="108021"
android:versionName="1.8.2" >
As soon as other errors will be resolved,sdk will create this file when you refresh project or clean the project.

Related

error while building termux build-all sh file

I have downloaded termux-packages and tried to build the sh file named build-all.sh. But I get these errors.
Using existing buildorder file: /data/data/com.termux/files/home/.termux-build/_buildall-aarch64/buildorder.txt
Building libandroid-support... ERROR: See /data/data/com.termux/files/home/.termux-build/_buildall-aarch64/libandroid-support.err
In termux folder, I have both the files they mentioned. And I don't understand what is this error.
Can you guys please help me..
Try looking in the referenced file:
cat /data/data/com.termux/files/home/.termux-build/_buildall-aarch64/libandroid-support.err
Note that building on-device (inside Termux) is not supported, you need a computer and should probably use the Docker image as described in the project README.

Where is build.xml in android

I m making an app which shares its file from assets folder and I m sharing an xml file to other app it gives me this exception
java.io.FileNotFoundException: This file can not be opened as a file descriptor; it is probably compressed
I got this TUTORIAL but at point number 7 it says that "ADD THIS SECTION TO THE END OF build.xml" so where can I get this build.xml??
And any way around to resolve this exception??
I m using MAC OS X
Run android update project -p ..., where the ... is the path to the project. This will create or update the build.xml and related command-line build files. This assumes that your SDK's tools/ directory in your PATH; otherwise, you will need to fully-qualify the path to the android command.I hope it will helps you .
Follow this Procedure To Use build.xml
Go to your Android SDK installation, and open the file "tools/ant/build.xml", copy the complete "test" target and paste it in the "build.xml" of the test project, before the import of build.xml, so before the comment starting with "Import the actual build file". There is more information on how to customize targets in that comment.
If its Confusing Follow this for Complete Ant....
Hope You understand..

Cannot find build.xml (Android)

I've been looking for an asnwer for this for a little while now, but I cant seem to find it. I moved a NeBeans Android project over through perfoce and now I am getting the following error
****\ZYAndroidAPP\build.xml:81: Cannot find F:\Program Files (x86)\Android\android-sdk\tools\ant\build.xml imported from ****\ZYAndroidAPP\build.xml
Seems like the build information from Android is not being approriately set by
<import file="${sdk.dir}/tools/ant/build.xml" />
in in the build script of the project. I tried setting it to the correct path to the SDK and it gave me the same error.
Has anyone had this problem before?
Check two things...
A. Make sure your path is set properly in your local.properties file
sdk.dir=/Users/me/Documents/android-sdk-macosx/
B. Make sure your environment variable is set properly:
echo $ANDROID_HOME
If not, then set it:
export ANDROID_HOME=/Users/me/Documents/android-sdk-macosx/
As #Justin Breitfeller said the local.properties had a bad sdk path
If you are looking for an answer to this, check which android version your app is and which versions are available in the SDK. This error is thrown by netbeans if there is no matching SDK version.
I had the same problem and i found a solution :
the directory {sdk_dir}\tools wasn't here so :
download the sdk from the official website
copy/paste \tools directory on the first sdk directory
First way: find local.properties and change sdk.dir to a correct path where Android SDK is installed.
Second way: change <import file="..." /> to a correct path to SDK.

NDK build error

Hi I am new to Android NDK Development.
MacBook-Pro:JNIexample sk$ ndk-build
usage: dirname path
gmake: /Users/sk/build/core/build-local.mk: No such file or directory
gmake: *** No rule to make target `/Users/sk/build/core/build-local.mk'. Stop.
Why do I get his error?
So I was having the same trouble, and it looks like if I have any directory which is a part of full dir-path which has dir-name with space (' ') in between then 'ndk-build' wont be able to resolve paths. So my directory name "development tools" wasnt good enough so I changed it to "developmenttools" and it worked. If I hard-code the path in 'ndk-build' then it was working so found out the reason.
You need to specify the project you want to build. Like this: ndk-build -C location_of_project.
For example, to build the hello-neon sample that comes with the NDK you would go to your ndk install root and do ndk-build -C samples/hello-neon
The ndk-build tool is actually just a wrapper that calls gmake with the build-local.mk file. It finds the build-local.mk file by creating a relative path rooted at the location of the ndk-built tool. Sounds like you don't have the full NDK installed, or maybe moved the ndk-build tool without moving the rest of the NDK contents?
I also faced this problem. And i solved it and post entire answer here. I hope it helps you.
Please notice that from the error message:
gmake: /Users/sk/build/core/build-local.mk: No such file or directory.
The build/core/builid-local.mk is actually in the ndk's root directory, why is it listed as the /Users/username/build…?
I've encountered the same error on my Macbook. I've put the ndk inside /Applications/Android Studio.app directory, since there is a space between the name, somehow the tool in ndk can't resolve the implied path. That's why the error message is printed.
Later I renamed Android Studio.app to Android-Studio.app and thus resolved the issue.
The solution for me was different. If you look in the ndk-build script, you see it immediately runs `dirname $0` to get the directory to work in.
I was calling "ndk-build" from my command line, which was using a copy of the ndk-build script that I had put in /usr/local/bin/ and so my error was '/usr/local/bin/build/core/build-local.mk: No such file or directory'.
The solution is to be in the ndk folder where the real ndk-build script lives, and use the -C /path/to/project option to tell it where to start. So, 'cd /path/to/ndk' and then run './ndk-build -C /path/to/project'
I was having same problem. I created new workspace and import existing project to it. But forgot to add ndk location in windows->preferences->Android->NDK.

How to resolve build path errors?

If I run my project this error will come build path problem how to solve this error.
error:
Description Resource Path Location
Type Project 'videothumb' is missing
required source folder: 'gen'
videothumb Build path Build Path
Problem
The project cannot be built until
build path errors are resolved
videothumb Unknown Java Problem
Can any one help me?
Try to clean project and if it still doesn't help close and then open project.
IF you are using eclipse then do as follows:
right click your project.
select build path-->configure build path.
update all the broken links in all 4 tabs.
Go to project-->clean [project will be found at top menu of eclipse.]
Clean your project.
Its done. For any further explanation comment on my answer.
Hope this helps.
Edit:
Here you go:
As you can see i'm at source tab of configure build path and i have only one folder here named ATalk/Src. likewise you can have number of folders.
Check for red cross mark on folder. if its there then your folder path is wrong means link is broken for that folder.
Same way you can check in Libraries tab. There you will find list of jars in your project. If any of them have red cross then its path is missing. So update all such red cross paths.
As you can see i dont have a red cross on my folder means it is at correct location.
Hope you get my point.
EDIT:
I just noticed that, according to your screenshot, the problem seems to be that the adb tool is not found. Now I might be wrong but I think that as of Android 2.3 (maybe even earlier) the adb tool is expected to be in [path-to-your-sdk]/platform-tools folder, not in the [path-to-your-sdk]/tools folder. The later path was used in earlier SDK's and your problem might be caused by such a simple thing that you have an outdated Android plugin in Eclipse.
OLD, IRRELEVANT ANSWER:
I've seen these kind of issues in Eclipse environments when I have some kind of error in my XML files. Malformed errors (that violate the rules of the XML structure) are often treated as "syntax errors" and are shown directly when you write them or when you try to build your application.
Other errors, however, like giving invalid references (giving a dimension where an integer is expected, for example) are not always highlighted with file name and failing line number (I'm not sure if this is bug in Eclipse's android plugin or even if it's a bug at all).
These kind of errors you'll have to hunt down manually and rebuild your project (as dcave555 sugested). This is really boring work if you have many XML files with many changes in
I think the path should look like this: /home/embdes/projects/android/android-sdk-linux_86
The problem is because of your Android build path settings. Try to check:
Window > Prefereces > Android > Build path
it should properly set to your Android SDK

Categories

Resources