Couldn?t see the pictures.
I think ?export? command is the right way to set env path.
Putting it into bashrc may need reset machine to take effect.
By executing export under your console will also work, but may lost effect
after machine reset.
Correct path of NDK and Gradle, NDK I don?t know, for gradle
You can write a simple gradle script to print your GRADLE_HOME directory.
task getHomeDir << {
println gradle.gradleHomeDir
}
and name it build.gradle.
Then run it with:
gradle getHomeDir
You could also take a look at auto_build.sh, it should already contain android
build command.
For example ./auto_build.sh build_android_armeabi
From: ??? [mailto:[email protected]]
Sent: Wednesday, May 11, 2016 5:39 AM
To: h.mahsky at samsung.com; Maxi Wu; jihun.ha at samsung.com
Cc: iotivity-dev at lists.iotivity.org
Subject: Re: Re: [dev] How to operate easy setup on iotivity?
thank you all !!
I tried to set environment path.
so, I searched how to set environment path of NDK and GRADLE, and I did like
this
- open "/home/.bashrc" file
- add
"export
ANDROID_NDK=/home/friend117/iotivity/extlibs/android/ndk/android-ndk-r10d"
"export
GRADLE_HOME=/home/friend117/iotivity/extlibs/android/gradle/gradle-2.2.1"
- save and close
and terminal, build command "scons TARGET_OS=android TARGET_ARCH=armeabi
TARGET_TRANSPORT=IP ES_ROLE=mediator ES_TARGET_ENROLLEE=arduino RELEASE=0"
then,
?? ??? 1
<https://mail.google.com/mail/u/0/?ui=2&ik=59370dbced&view=fimg&th=1549c8fcaec71089&attid=0.1&disp=emb&realattid=ii_1549c86675d70219&attbid=ANGjdJ9HsBe-8A1-FSruMd4OmWckOB2_824FGWwKbHzyodBgGYGEtzyzfj2HkFg6UHPsEJnQgmT8wAamsp92fRQr8qyjaYcG9aoxk8Bx-FzojVUQuoCNuvFB1PkmPD8&sz=s0-l75&ats=1462915550481&rm=1549c8fcaec71089&zw>
maybe I missed something.
1. incorrect path : Is there any way that finding correct path of NDK and
Gradle?
I installed NDK by android studio and gradle by "sudo apt-get install
gradle"
I'm confuss because gradle version is not match between intalled and
version confirm.
I installed "2.2.1" but version conform is bellow
?? ??? 2
<https://mail.google.com/mail/u/0/?ui=2&ik=59370dbced&view=fimg&th=1549c8fcaec71089&attid=0.2&disp=emb&realattid=ii_1549c8eb4f8f9550&attbid=ANGjdJ_ra6PiUgsBSxjrxl3XEuO_tykzLwkLK4QhD9bOpsy9AYiCYPcTs1VCCWyiuMo096ixHSt0vnVqHne-Er2QnIVSFSO19TsX_MvU1lEeBF7Rys3NDCh7lkj8Lrw&sz=s0-l75&ats=1462915550481&rm=1549c8fcaec71089&zw>
2. the way of environment path setting is right? I saw it from google but I'm
not sure about that.
*) Mr. Ha,
the version informs are,
gcc version : 5.3.1
boost version : 1.58.0
and my system,
- Ubuntu 16.04 - 64bit
I just tried easy setup "https://wiki.iotivity.org/easy_setup"
so enrollee : arduino mega + ethernet shield
mediator : android
that's what i'm doing now!!
*) Mr. Wu,
thank you. I'm trying set environment path because of your advice.
*) Mr. MAHSKY ,
when i did build command,
"scons TARGET_OS=android TARGET_ARCH=armeabi TARGET_TRANSPORT=IP
ES_ROLE=mediator ES_TARGET_ENROLLEE=arduino RELEASE=0
ANDROID_NDK=/home/friend117/iotivity/extlibs/android/ndk/android-ndk-r10d"
only gradle infor is shown
?? ??? 3
but this error is also occured
?? ??? 4
Is there any way to add gradle path to build command?
I tried
"scons TARGET_OS=android TARGET_ARCH=armeabi TARGET_TRANSPORT=IP
ES_ROLE=mediator ES_TARGET_ENROLLEE=arduino RELEASE=0
ANDROID_NDK=/home/friend117/iotivity/extlibs/android/ndk/android-ndk-r10d
ANDROID_GRADLE=/home/friend117/iotivity/extlibs/android/gradle/gradle-2.2.1/bin"
but it doesn't work.
2016-05-09 18:38 GMT+09:00 HEMANT MAHSKY <h.mahsky at samsung.com>:
Hi ,
Please follow below steps to build & run easy setup for Android platform
$scons TARGET_OS=android TARGET_ARCH=armeabi TARGET_TRANSPORT=IP
ES_ROLE=mediator ES_TARGET_ENROLLEE={Platform} RELEASE=0
ANDROID_NDK=<iotivity>/extlibs/android/ndk/android-ndk-r10d
{Platform can be } -> arduino , linux, tizen
example -
$scons TARGET_OS=android TARGET_ARCH=armeabi TARGET_TRANSPORT=IP
ES_ROLE=mediator ES_TARGET_ENROLLEE=linux RELEASE=0
ANDROID_NDK=/home/h.mahsky/iotivity_04April_2016/iotivity/extlibs/android/ndk/android-ndk-r10d
or
$export ANDROID_SDK=/home/h.mahsky/Link to
jay_extlibs/android/sdk/android-sdk_r24.2
$export
ANDROID_NDK=/home/h.mahsky/iotivity_04April_2016/iotivity/extlibs/android/ndk/android-ndk-r10d
$scons TARGET_OS=android TARGET_ARCH=armeabi TARGET_TRANSPORT=IP
ES_ROLE=mediator ES_TARGET_ENROLLEE=linux RELEASE=0
- > If your system is not having the Android SDK, NDK then follow instructions
given at build output to install it.
- > Also, you can disable other services & sample building if you just want to
explore Easy setup, it will reduce build time.
1. To disable all other service building, please replace attached SConscript
with <iotivityRoot>/service/SConscript
2. To disable sample building comment cmdBuildExamples from
<iotivityRoot>/android/android_api/SConscript
If you are successful in building, please continue following instructions given
in the build instructions file. Apart from building Android, you need to build
for one more platform for Enrollee device.
Please feel free to ask if you face any difficulties in further execution.
Thanks,
Hemant
------- Original Message -------
Sender : Maxi Wu<maxi.wu at u-media.com.tw>
Date : May 09, 2016 12:59 (GMT+05:30)
Title : Re: [dev] How to operate easy setup on iotivity?
I haven?t try Android build, but here is my two cents, may not be correct.
The error say your are missing some environment variable, not scons arguments.
When you execute scons arg=value, those are arguments.
If you are compile on Linux, I think you could define ANDROID_NDK and
ANDROID_GRADLE in /etc/environment. I am no Linux expert, correct me if I was
wrong.
Note that your system should already have NDK and gradle installed.
2016-05-09 11:18 GMT+09:00 ??? <jihun.ha at samsung.com>:
Hi. Mr. Kim,
Which platform do you want to build Iotivity for? Android?
Because, if you want to do for Android, you need ANDROID_HOME and ANDROID_NDK
settings in scons. Otherwise, you don't need to do.
So, if you want to do for Ubuntu, you can skip your problem, temporarily, by
puting as below:
scons service/easy-setup
And could you give us your gcc and boost versions?
I think your problem happens due to those.
Thank you.
BR, Jihun Ha.
From: iotivity-dev-bounces at lists.iotivity.org
[mailto:[email protected]] On Behalf Of ???
Sent: Sunday, May 8, 2016 1:25 PM
To: iotivity-dev at lists.iotivity.org
Subject: [dev] How to operate easy setup on iotivity?
dear all,
Hello,
I?m a beginner of android, linux, Arduino.
But I?m trying iotivity for myself to be a SW engineer.
I have a problem that compile android platform that is indicated
?~/iotivity/service\easy-setup\Build_Instructions_Android_Arduino.txt? while
I?m trying easy setup.
The build steps are,
1) Compilation using Scons
0) Prerequisite exports for Android
export ANDROID_HOME=<ANDROID_HOME>
export ANDROID_NDK=<ANDROID_NDK>
a) In the IoTivity root source folder execute
scons TARGET_OS=android TARGET_ARCH=armeabi TARGET_TRANSPORT=IP
ES_ROLE=mediator ES_TARGET_ENROLLEE=arduino RELEASE=0
????.
When I tried ?a)? step, errors are occurred.
two info are shown
1. Android NDK path isn't set, the default will be used. You can set
environment variable ANDROID_NDK or add it in command line as : scons
ANDROID_NDK=<path to android NDK> ...
2. Android Gradle path isn't set, the default will be used. You can set
environment variable ANDROID_GRADLE or add it in command line as: scons
ANDROID_GRADLE=<path to android GRADLE>
So I did ?scons ANDROID_NDK=/home/friend117/Android/Sdk/ndk-bundle? then, next
error is shown.
service/resource-encapsulation/src/common/primitiveResource/unittests/ResourceAttributesTest.cpp:80:5:
required from here
/usr/local/include/boost/utility/addressof.hpp:59:47: error: call of overloaded
'f(boost::detail::addr_impl_ref<std::nullptr_t>, int)' is ambiguous
return boost::detail::addressof_impl<T>::f( boost::detail::addr_impl_ref<T>
what should I do for next step?
And what is this error? It always shown even if I did ?sudo apt-get install
libcurl4-openssl-dev?
*********************************** Error *************************************
* Cannot build hue sample. Please install libcurl.
* Example (Ubuntu):
* sudo apt-get install libcurl4-openssl-dev
* sudo ldconfig
* Hint: check with pkg-config --libs libcurl and clear scons cache.
* Skipping hue sample build.
Please help beginner!!!!!
<https://mail.google.com/mail/u/0/?ui=2&ik=59370dbced&view=fimg&th=1549c8fcaec71089&attid=0.3&disp=emb&realattid=eced4ef6c6c03618_0.0.1&attbid=ANGjdJ-JUu-ogkkT-rKKfrmZqZd6s2otZySv8u3z3Ir-e_eeM3rvizVjDaQIVJv1mEbfNBfLLKl4YvDsxWplD85Ym8FrQOhseUGdromux8rfkOSUMwWrq72V4h-JsC4&sz=s0-l75&ats=1462915550481&rm=1549c8fcaec71089&zw>
<http://ext.samsung.net/mailcheck/SeenTimeChecker?do=3af3b79521f261fa2e8493c2cc49aeaa62816422fde9d01f64aad3695d11df5c7be2f8524d3e16dc7167a308fea3079b1b20909a04efd4d2748cfe1d4e847419cf878f9a26ce15a0>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://lists.iotivity.org/pipermail/iotivity-dev/attachments/20160511/ef6702fc/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image002.png
Type: image/png
Size: 59793 bytes
Desc: not available
URL:
<http://lists.iotivity.org/pipermail/iotivity-dev/attachments/20160511/ef6702fc/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image004.png
Type: image/png
Size: 46981 bytes
Desc: not available
URL:
<http://lists.iotivity.org/pipermail/iotivity-dev/attachments/20160511/ef6702fc/attachment-0001.png>