error while building termux build-all sh file - android

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.

Related

Trying to build Android app but got clang error

I'm new to Android development. So want to start and just build and run Hello World app in my mobile. I've installed NDK, clang-12, Fyne and run
fyne package --os android --appID com.example.myapp
Got
go build -buildmode=c-shared -o /tmp/gomobile-work-791801243/lib/armeabi-v7a/libparts.so parts failed: exit status 2
# runtime/cgo
clang: error: no input files
The project's structure:
parts:
- go.mod
- Icon.png
- main.go
If I run manually from project root (parts)
go build -buildmode=c-shared -o /tmp/gomobile-work-791801243/lib/armeabi-v7a/libparts.so parts
It creates .so file without any error. Seems like it's just about relative path, but how can I fix it? Sorry for providing poor info, really don't know what may be useful. So please write in comments what info do you need and I'll provide it.
Are you running the command from inside the “parts” folder?
Perhaps you have GOOS or GOARCH set which could alter the build path?
You might have a broken development environment when trying to build for Android. Short of reinstalling it, I would recommend using fyne-cross with either docker or podman.
Just install fyne-cross with:
go install github.com/fyne-io/fyne-cross#latest
Followed in your application directory by:
fyne-cross android

How to create apk on mac using xbuild\msbuild with multiple project files

I have being trying to create an APK file for my Android App. The Project itself contains multiple .csproj files so I need to include them as well as packages and other necessary information. Can you either do this by selecting the .sln file which works to create my IPA file using mdtool. But for me will just run successfully(doesn't have any error) but will not create the APK file. So I thought I would have to use either /t:PackageForAndroid or /t:SignAndroidPackage. But I get the error message PackageForAndroid not found in project. I was unsure what to do here if the problem is that I have to target a file or node in my project that is matched to that target(if this is correct where could I find this?) If I just have to use either of these as target how should it work correctly as I also tried it with MSbuild and this did not work either.
I have tried to use Debug and Release as the /p:Configuration both have the same result. Ad Hoc doesn't work. Then I tried to use a .csproj file as I seen most examples contain that, but this is not working right for me because I have multiple .csproj files as well as a lot of other information needed to build the app. I have tried to use the Include, command unsuccessfully, trying to target all .csproj files as well as just targeting the main build but this has not worked.
How can I create this APK file correctly? I think I am close as if I am not getting any error messages, I am just not creating it correctly. I have on the terminal on the mac and using Bamboo(as this is where I get the project from)and the results are the exact same. Also note that this project successfully builds on the emulator and on an android phone so there are no problems with the project itself.
I fixed the messages by re-installing the msbuild from a github repo, then I used which msbuild to find my location of msbuild. Then I added it as an executable in Bamboo. Then I added a command task in my bamboo plan which then add the MSBuild as its executable and the argument was this:
CustomerApp.Droid/CustomerApp.Droid.csproj /t:SignAndroidPackage /p:Configuration=Release

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..

Cocos2dx Android: Get data from file(assets/*) failed

Where do you need to add your images in your Cocos2dx Android project (in Eclipse)?
They're currently in the 'Resources' folder like what is mentioned on Ray Wenderlich's blog, but I get an error when I run it in the emulator: "get data from (assets/myFileName) failed" for each image. I also added these images to the assets folder in Eclipse, and it makes no difference.
It works fine on the iOS side.
Any suggestions?
I believe you need to run ./build_native.sh in your android folder before run on Eclipse.
So the actual problem wasn't with the building or copying process.
I had a class I made that would apply the correct prefix to a CCSprite if it was an iphone, ipad, etc. And I made some changes to the CCMenuItemImage source code to incorporate this file, but the iOS and Android Cocos2dx files are separate, so the Android project wasn't using the new code, and wasn't adding the correct prefix, so it wasn't finding the image.
Thank you everyone for your answers!
You no need to add to the assets folder , when you run ./build_native.sh it will automatically add to the assets folder. Check it build successfully without any errors and then import to eclipse.
Try using
const char *path = CCFileUtils::sharedFileUtils()->fullPathFromRelativePath("testimage.png");
before giving cocos2d-x your filename.
This was the same problem I face. Actually I have solved this problem by doing:
Run the ./build_native.sh from cygwin. This step to move the asset needed to android project. Dont forget to chmod 777 -R first to your cocos project, i've got an error because the build_native.sh doesn't have permission to move the assets.
In eclipse, build it again following this tutorial. In that link, it shows how to build the cpp source + cocos2d in eclipse.
Run as android application, then the .apk will be generated.
I'm using the Cocos2d-JS version.
If you have an empty JS file that is imported in your project.json, you will get this very error on Android.
In this case, solution is to not have any empty JS files imported.

Who do anyone work with FBReader open source?

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.

Categories

Resources