Android building problem

rydwan66
New member
 
Posts: 6
Joined: Tue Nov 15, 2016 12:03

Android building problem

by rydwan66 » Tue Nov 15, 2016 13:44

Hi

I'm trying to build Minetest apk, but I receive this error in terminal:

export NDEBUG=;
export BUILD_TYPE=debug;
make apk
make[1]: Entering directory '/home/aaa/minetest/build/android'
freetype sources missing, downloading...
/bin/sh: 5: git: not found
Makefile:392: recipe for target 'freetype_download' failed
make[1]: *** [freetype_download] Error 1
make[1]: Leaving directory '/home/aaa/minetest/build/android'
Makefile:157: recipe for target 'debug' failed
make: *** [debug] Error 2
 

cheapie
Member
 
Posts: 315
Joined: Mon May 14, 2012 00:59
GitHub: cheapie
IRC: cheapie
In-game: cheapie
 

rydwan66
New member
 
Posts: 6
Joined: Tue Nov 15, 2016 12:03

Re: Android building problem

by rydwan66 » Wed Nov 16, 2016 12:39

Thanks for an advice, cheapie. After the installation of git, the terminal started making apk again. Unfortunately it stopped, because another error message showed up:

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring root project 'Minetest'.
> failed to find target with hash string 'android-23' in: /home/aaa/androidsdk

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 13.101 secs
Makefile:755: recipe for target 'apk' failed
make[1]: *** [apk] Error 1
make[1]: Leaving directory '/home/aaa/minetest/build/android'
Makefile:157: recipe for target 'debug' failed
make: *** [debug] Error 2
aaa@aaa-virtual-machine ~/minetest/build/android $
 

User avatar
sfan5
Moderator
 
Posts: 3829
Joined: Wed Aug 24, 2011 09:44
Location: Germany
GitHub: sfan5
IRC: sfan5

Re: Android building problem

by sfan5 » Wed Nov 16, 2016 14:11

You need to make sure that you have "Android API level 23" installed in your Android SDK
Mods: Mesecons | WorldEdit | Nuke & Minetest builds for Windows (32-bit & 64-bit)
 

rydwan66
New member
 
Posts: 6
Joined: Tue Nov 15, 2016 12:03

Re: Android building problem

by rydwan66 » Sat Nov 19, 2016 11:25

sfan5 wrote:You need to make sure that you have "Android API level 23" installed in your Android SDK


I did what you told me to do. Now, I can build an unsigned APK. Thanks for help. However, I can't make a release build. I created "ant.properties" file and added a path to my keystore, but it doesn't ask me for my keystore and password.

key.store = /home/aaa/key/
key.alias = Minetest

aaa@aaa-virtual-machine ~ $ cd minetest/build/android
aaa@aaa-virtual-machine ~/minetest/build/android $ make release
make[1]: Entering directory '/home/aaa/minetest/build/android'
nothing to be done for irrlicht
changed /home/aaa/minetest/build/android/.gradle/2.10/taskArtifacts/cache.properties.lock
assets changed, refreshing...
make[2]: Entering directory '/home/aaa/minetest/build/android'
make[2]: Leaving directory '/home/aaa/minetest/build/android'
cp: cannot stat '/home/aaa/minetest/games/minetest_game': No such file or directory
nothing to be done for iconv
nothing to be done for gmp
nothing to be done for openssl
nothing to be done for curl
nothing to be done for leveldb
nothing to be done for openal
nothing to be done for libogg/libvorbis
fatal: Not a git repository (or any of the parent directories): .git
make[2]: Entering directory '/home/aaa/minetest/build/android'
[armeabi-v7a] Install : libminetest.so => libs/armeabi-v7a/libminetest.so
[armeabi-v7a] Install : libiconv.so => libs/armeabi-v7a/libiconv.so
[armeabi-v7a] Install : libopenal.so => libs/armeabi-v7a/libopenal.so
[armeabi-v7a] Install : libogg.so => libs/armeabi-v7a/libogg.so
[armeabi-v7a] Install : libvorbis.so => libs/armeabi-v7a/libvorbis.so
[armeabi-v7a] Install : libgmp.so => libs/armeabi-v7a/libgmp.so
make[2]: Leaving directory '/home/aaa/minetest/build/android'
:preBuild UP-TO-DATE
:preReleaseBuild UP-TO-DATE
:checkReleaseManifest
:prepareReleaseDependencies
:compileReleaseAidl UP-TO-DATE
:compileReleaseRenderscript UP-TO-DATE
:generateReleaseBuildConfig UP-TO-DATE
:generateReleaseAssets UP-TO-DATE
:mergeReleaseAssets UP-TO-DATE
:generateReleaseResValues UP-TO-DATE
:generateReleaseResources UP-TO-DATE
:mergeReleaseResources UP-TO-DATE
:processReleaseManifest UP-TO-DATE
:processReleaseResources UP-TO-DATE
:generateReleaseSources UP-TO-DATE
:compileReleaseJavaWithJavac UP-TO-DATE
:compileReleaseNdk UP-TO-DATE
:compileReleaseSources UP-TO-DATE
:lintVitalRelease
:transformClassesWithDexForRelease UP-TO-DATE
:mergeReleaseJniLibFolders UP-TO-DATE
:transformNative_libsWithMergeJniLibsForRelease UP-TO-DATE
:processReleaseJavaRes UP-TO-DATE
:transformResourcesWithMergeJavaResForRelease UP-TO-DATE
:packageRelease UP-TO-DATE
:assembleRelease

BUILD SUCCESSFUL
 

rydwan66
New member
 
Posts: 6
Joined: Tue Nov 15, 2016 12:03

Re: Android building problem

by rydwan66 » Thu Nov 24, 2016 14:15

I still haven't figured it out. I can only build an unsigned APK. Terminal seems to ignore my ant.properties file that I put in android/build. Can someone explain to me what I'm doing wrong here?

My ant.properties file:

key.store = /home/aaa/key/ - path where I put my keystore
key.alias = john - alias from my keystore
 

rydwan66
New member
 
Posts: 6
Joined: Tue Nov 15, 2016 12:03

Re: Android building problem

by rydwan66 » Fri Dec 16, 2016 12:00

I'm not able to build Debug and Release builds for android. I'm following the tutorial, but I end up in the same place. After the build is finished, my apk can be found in build/outputs/apk/Minetest-release.apk, but according to the tutorial, it should be found in build/android/bin/. Can someone give me some hint?



aaa@aaa-virtual-machine ~ $ cd minetest/build/android
aaa@aaa-virtual-machine ~/minetest/build/android $ make release
make[1]: Entering directory '/home/aaa/minetest/build/android'
nothing to be done for freetype
nothing to be done for irrlicht
changed /home/aaa/minetest/build/android/.gradle/2.10/taskArtifacts/cache.properties.lock
assets changed, refreshing...
make[2]: Entering directory '/home/aaa/minetest/build/android'
make[2]: Leaving directory '/home/aaa/minetest/build/android'
cp: cannot stat '/home/aaa/minetest/games/minetest_game': No such file or directory
nothing to be done for iconv
nothing to be done for gmp
nothing to be done for openssl
nothing to be done for curl
nothing to be done for leveldb
nothing to be done for openal
nothing to be done for libogg/libvorbis
make[2]: Entering directory '/home/aaa/minetest/build/android'
[armeabi-v7a] Install : libminetest.so => libs/armeabi-v7a/libminetest.so
[armeabi-v7a] Install : libiconv.so => libs/armeabi-v7a/libiconv.so
[armeabi-v7a] Install : libopenal.so => libs/armeabi-v7a/libopenal.so
[armeabi-v7a] Install : libogg.so => libs/armeabi-v7a/libogg.so
[armeabi-v7a] Install : libvorbis.so => libs/armeabi-v7a/libvorbis.so
[armeabi-v7a] Install : libgmp.so => libs/armeabi-v7a/libgmp.so
make[2]: Leaving directory '/home/aaa/minetest/build/android'
:preBuild UP-TO-DATE
:preReleaseBuild UP-TO-DATE
:checkReleaseManifest
:prepareReleaseDependencies
:compileReleaseAidl
:compileReleaseRenderscript
:generateReleaseBuildConfig
:generateReleaseAssets UP-TO-DATE
:mergeReleaseAssets
:generateReleaseResValues
:generateReleaseResources
:mergeReleaseResources
:processReleaseManifest
:processReleaseResources
:generateReleaseSources
:compileReleaseJavaWithJavacNote: /home/aaa/minetest/build/android/src/main/java/net.minetest.minetest/MinetestAssetCopy.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.

:compileReleaseNdk UP-TO-DATE
:compileReleaseSources
:lintVitalRelease
:transformClassesWithDexForRelease
:mergeReleaseJniLibFolders
:transformNative_libsWithMergeJniLibsForRelease
:processReleaseJavaRes UP-TO-DATE
:transformResourcesWithMergeJavaResForRelease
:packageRelease
:assembleRelease

BUILD SUCCESSFUL

Total time: 12.198 secs

This build could be faster, please consider using the Gradle Daemon: https://docs.gradle.org/2.10/userguide/ ... aemon.html
APK stored at: build/outputs/apk/Minetest-release.apk
You can install it with `make install_release`
make[1]: Leaving directory '/home/aaa/minetest/build/android'
aaa@aaa-virtual-machine ~/minetest/build/android $
 


Return to Problems



Who is online

Users browsing this forum: No registered users and 3 guests