libmx3 / mx3

a sample project showcasing/collecting cross platform techniques on mobile
MIT License
1.17k stars 149 forks source link

Android build failed #51

Closed katopz closed 9 years ago

katopz commented 9 years ago

I'm try make android from untouched example, Here's what I got so far. Gradle 2.3 Android SDK Tools 21.1.2 Android Build Tools 22

./gradlew djinni
:djinniBuild UP-TO-DATE
:djinniGen UP-TO-DATE
:djinniOutSyncCpp UP-TO-DATE
:djinniOutSyncJava UP-TO-DATE
:djinniOutSyncJni UP-TO-DATE
:djinniOutSyncObjc UP-TO-DATE
:djinniOutSync UP-TO-DATE
:djinni UP-TO-DATE

BUILD SUCCESSFUL

Total time: 3.82 secs
ANDROID_BUILD_TOP=dirname  deps/gyp/gyp --depth=. -f android -DOS=android --root-target libmx3_android -Icommon.gypi mx3.gyp
cd example_android && ./gradlew app:assembleDebug && cd ..
WARNING [Project: :app] Current NDK support is deprecated.  Alternative will be provided in the future.

FAILURE: Build failed with an exception.

* Where:
Build file '/Users/pirsquare/bit/mx3/example_android/app/build.gradle' line: 44

* What went wrong:
A problem occurred evaluating project ':app'.
> Neither path nor baseDir may be null or empty string. path='null' basedir='/Users/pirsquare/bit/mx3/example_android/app'

* 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: 4.796 secs
make: *** [android] Error 1

iOS is build fine anyway, Any help would be appreciated.

Thanks

skabbes commented 9 years ago

Hmm, do you have an ./example_android/local.properties file?

This is what mine looks like:

➜  mx3 git:(master) cat ./example_android/local.properties 
## This file is automatically generated by Android Studio.
# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
#
# This file should *NOT* be checked into Version Control Systems,
# as it contains information specific to your local configuration.
#
# Location of the SDK. This is only used by Gradle.
# For customization when using a Version Control System, please read the
# header note.
sdk.dir=/Users/steven/android-sdk
ndk.dir=/Users/steven/android-ndk

This should obviously be documented much better, I'm sorry it wasn't. Let me know if that fixes things for you. You'll need to download and install the android sdk and ndk.

katopz commented 9 years ago

Aw snap! seem like I didn't install android-ndk on this Mac yet only android-sdk, and error log just said Current NDK support is deprecated. so i thought it's already there just not support lol

now is build fine, btw about local.properties should be doc too, lucky me i mess with gradle before so I know what is missing.

Many thanks, @skabbes sorry for wasting your time. looking fw to play with this new toy :D let me know if you want me to add missing installation step there from my noob point of view lol

Cheers!

skabbes commented 9 years ago

Nah, no one should be expected to know that.

I'm going to add a blurb about adding a local.properties, but I'd absolutely love if you could document things as you come across them.

skabbes commented 9 years ago

Hope this helps:

https://github.com/libmx3/mx3/commit/d6c0797934c3bde3e9aef5cadd2520717e3d42b1