Error on building the Titanium Mobile SDK from source - android

I downloaded the source code of titanium mobile sdk from github. I installed python ,scons ,jdk and android sdk in windows 7. I set path for java,android sdk,etc in environment variable.
but on compiling with scons , following error is rised.
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\Users\Shihab>cd C:\Project\titanium_mobile
C:\Project\titanium_mobile>scons
scons: Reading SConscript files ...
Building MobileSDK version 3.1.0, githash 2d79a72
KeyError: 14:
File "C:\Project\titanium_mobile\SConstruct", line 115:
sdk = AndroidSDK(ARGUMENTS.get("android_sdk", None), 14)
File "C:\Project\titanium_mobile\support\android\androidsdk.py", line 49:
self.set_api_level(api_level)
File "C:\Project\titanium_mobile\support\android\androidsdk.py", line 53:
self.find_platform_dir()
File "C:\Project\titanium_mobile\support\android\androidsdk.py", line 127:
old_style_dir = os.path.join(self.android_sdk, 'platforms', android_api_leve
ls[api_level])
C:\Project\titanium_mobile>
How to resolve this error?

This forum post says that KeyError: NN means that Android API version NN was not found. Do you have that particular version? (API 14 == Android 4.0)

Why dont you just download Titanium Studio? from the appcelerator page, you can try to create a project there and see if your doing all the configurations correctly

Related

How to build boost 1.69.0 for Android with NDK r18b using dec1/Boost-for-Android?

I tried to use https://github.com/dec1/Boost-for-Android to compile boost for Android. It reports 1.69.0 is supported for NDK r18b. I'm under Windows 7.
Even if this is reported as working, I encounter many problems when trying to run the provided script:
Downloaded boost 1.69.0
Downloaded sources
Modified BOOST_SRC_DIR to point to folder containing "1.69.0" boost folder
Modified ANDROID_NDK_ROOT to point to ndk folder
Modified ABIS="armeabi-v7a,x86"
Modified LINKAGE="static"
Added Cygwin to my path (as this is a .sh file I need to run)
Ran doIt.sh
Got non blocking errors:
-nLe fichier sp?cifi? est introuvable.
ERROR: Unsupported HOST_TAG: windows-x86_64
Then I got final error
## COMMAND: mkdir /tmp/ndk-/tmp/build-11600/build-boost/armeabi-v7a/llvm/host-bin
## COMMAND: ./bootstrap.sh --with-toolset=cc Building Boost.Build engine
with toolset cc... Failed to build Boost.Build build engine Consult
'bootstrap.log' for more details ERROR: Could not bootstrap Boost build
'bootstrap.log'reports gcc: not found
Added MinGW to my PATH (to have gcc be found), then retried:
Now I get in 'bootstrap.log':
cc -o bootstrap/jam0 command.c compile.c constants.c debug.c execcmd.c frames.c function.c glob.c hash.c hdrmacro.c headers.c jam.c jambase.c jamgram.c lists.c make.c make1.c object.c option.c output.c parse.c pathsys.c regexp.c rules.c scan.c search.c subst.c timestamp.c variable.c modules.c strings.c filesys.c builtins.c class.c cwd.c native.c md5.c w32_getreg.c modules/set.c modules/path.c modules/regex.c modules/property-set.c modules/sequence.c modules/order.c execunix.c fileunix.c pathunix.c
command.c:1:0: sorry, unimplemented: 64-bit mode not compiled in
There is no 'cc' available in my PATH, dunno where this is supposed to be found
Any idea what I may be doing wrong?
Sorry, only building on linux is officially supported. Mac and Windows should work fine too but details of setting up the relevant environments (eg cgwin or homebrew) is beyond the scope of what this project tries to do.
If you want to use windows as a host you have two easiest options are:
Use virtual machines eg. VirtualBox or and create a linux virtual machine where you do the building.
You can also simply download and use the precompiled binaries I have made available
No matter what os you use to build under, the resulting binaries can then be copied to windows and used from then on as if you had built on windows to start with (theyre cross compiled for android).

Setting targetSdkVersion and compileSdkVersion for bazel, android tensorflow

I need help in how to set the target and compile Sdk versions separately for bazel.
I want to run tensorflow on the phone following this tutorial. After editing WORKSPACE for bazel as follows:
android_sdk_repository(
name = "androidsdk",
api_level = 24,
build_tools_version = "24.0.1",
path = "/home/Android/Sdk",
)
android_ndk_repository(
name="androidndk",
path="/home/Android/Sdk/ndk-bundle",
api_level=21)
I get PARSE ERROR on the phone upon apk installing:
adb install -r bazel-bin/tensorflow/examples/android/tensorflow_demo.apk
I have usb debugging and 3rd party apk installation enabled. The phone uses Android 4.4.4 so I changed WORKSPACE configuration to match it (tools and API installed by SDK manager properly) as:
android_sdk_repository(
name = "androidsdk",
api_level = 19,
build_tools_version = "19.1.0",
path = "/home/Android/Sdk",
)
android_ndk_repository(
name="androidndk",
path="/home/Android/Sdk/ndk-bundle",
api_level=21)
Upon building as:
bazel build //tensorflow/examples/android:tensorflow_demo
I end up with few errors of that type:
Error at 5 : /tmp/android_resources_tmp7060220119759636814/merged_resources/values-v21/values.xml:5: error: Error retrieving parent for item: No resource found that matches the given name 'android:Theme.Material.Light'.
Following this answer, I should build for compile API version > 21 but at the same time target API version 19. It can be easily set for gradle. However I have not found any clue how to do that for bazel. Any suggestions are appreciated!
If you want to target a lower Android API level, the file you want to edit is actually tensorflow/examples/android/AndroidManifest.xml. Leave the WORKSPACE file settings at the highest API level you have installed via your sdk (APIs can be installed with $ANDROID_HOME/tools/android).
You can lower the min API level to 19 in AndroidManifest.xml, but be aware you will encounter runtime errors on your phone running the demo unless you replace the demo code that interfaces with the camera2 api (which was added with API level 21) with analogous android.hardware.camera code.

Appcelerator studio android app failed to run

I have installed fresh appcelerator studio and titanium CLI and also other dependancies when I am trying to run android app then it showing the following error :
[INFO] : Packaging application: ../sw/android-sdk-macosx/build-tools/24.0.2/aapt "package" "-f" "-m" "-J" "WorkData/Appcelator Projects/test/build/android/gen" "-M" "../Appcelator Projects/test/build/android/AndroidManifest.xml" "-A" "../WorkData/Appcelator Projects/test/build/android/bin/assets" "-S" "../WorkData/Appcelator Projects/test/build/android/res" "-I" "../sw/android-sdk-macosx/platforms/android-23/android.jar" "-F" "../WorkData/Appcelator Projects/test/build/android/bin/app.ap_" "--auto-add-overlay" "--extra-packages" "ti.modules.titanium.ui:android.support.v7.appcompat:android.support.v7.cardview" "-S" "/var/folders/jf/f17wzygx4nbd6fg5wsntf4840000gn/T/116820-1742-1nuy1sx.xxrqp30udi/res" "-S" "/var/folders/jf/f17wzygx4nbd6fg5wsntf4840000gn/T/116820-1742-hop1bc.t53b359udi/res" "-S" "/var/folders/jf/f17wzygx4nbd6fg5wsntf4840000gn/T/116820-1742-6n4mu0.4svn3o9a4i/res"
2016-09-20T06:14:33.921Z | ERROR | An uncaught exception was thrown!
Path must be a string. Received undefined
2016-09-20T06:14:33.922Z | ERROR | Path must be a string. Received undefined
and also I am able to run same project on iPhone.
My machine Configuration is as follows :
Operating System
Name = Mac OS X
Version = 10.11.6
Architecture = 64bit
# CPUs = 4
Memory = 8589934592
Node.js
Node.js Version = 6.5.0
npm Version = 3.10.3
Titanium CLI
CLI Version = 5.0.9
Titanium SDK
SDK Version = 5.5.0.GA
SDK Path = /Users/neosoft/Library/Application Support/Titanium/mobilesdk/osx/5.5.0.GA
Target Platform = android
Command
can anyone help me to resolve issue ...
You appear to be using Build Tools SDK 24.#. This is not yet supported by Appcelerator. You should un-install this version and install 23 (the latest supported by appcelerator).
I recommend watching the Compatibility Matrix from time to time.
After that select the minSDK and targetSDK in Tiapp.xml like this:
<android xmlns:android="http://schemas.android.com/apk/res/android">
<manifest android:versionCode="1"
android:versionName="1.0.0" package="app.my" xmlns:android="http://schemas.android.com/apk/res/android">
<uses-sdk android:minSdkVersion="16" targetSdkVersion="23"/>
</manifest>
</android>
See my Android SDK folder looks like this:
Try to look at your Android SDK folders and check if there is anything related to version 24. And also do these tasks after deleting everything related to 24 version:
Remove the uses-sdk tag from tiapp.xml and let Titanium SDK do stuffs on its own.
Delete build and Resources folders from your Titanium project root directory
Clean and run the project now.
Check your version of node.js with this command:
node -v
If your version is higher than 4.4.2 that's the problem. You can fix it with:
sudo npm cache clean -f
sudo npm install -g n
sudo n 4.4.2
I had the same issue and got resolved after changing my node version to 4.4.2. Just updating it here if that may help anyone.

Rhodes: Can't detect NDK toolchain path (corrupted NDK installation?)

I have installed rhodes and android SDK and NDK
OS: Linux Mint 16 X64, Ruby: ruby 2.1.1p76 (2014-02-24 revision 45161) [x86_64-linux], SDK: Android.SDK.Release.v23.0.2.Linux, NDK: android-ndk32-r10-linux-x86_64 or android-ndk-r7b
and build.yml content:
#sdk: "/home/abolfazl/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/rhodes-3.5.1.12"
sdkversion: 3.5.0
name: testapp
version: 1.0
vendor: rhomobile
build: debug
bbver: 4.6
applog: rholog.txt
iphone:
configuration: Release
sdk: iphonesimulator5.0
provisionprofile:
codesignidentity:
entitlements:
BundleIdentifier: com.rhomobile.testapp
BundleURLScheme: testapp
wp:
productid: '0ed4fa10-0f72-0132-4dc5-3870f4a0dbeb'
symbian:
uid: '0xee1f6bcc'
android:
version: 4.2.2
extensions: ["json", "another-extension"]
sdk manager:
when I run rake run:android:
cd
/home/abolfazl/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/rhodes-3.5.1.12
$app_config['extensions'] : ["json", "another-extension"]
$app_config['capabilities'] : [] $vendor = rhomobile $app_package_name
= com.rhomobile.testapp rake aborted! Can't detect NDK toolchain path (corrupted NDK installation?)
Tasks: TOP => run:android => run:android:emulator =>
config:android:emulator => config:android (See full trace by running
task with --trace)
rhodes gem v3.5 was updated on github some times ago to adapt from changes in the newer NDKs (v3.5 was released around release 7 of the NDK).
Newer rhodes (latest is v5) directly supports the new NDKs.
Another thing is that rhodes still needs Ruby v1.9.3, seems that you're using it under Ruby v2.1.
You need to define path to Android NDK at <rhodes>/rhobuild.yml file. Or just run <rhodes>/bin/rhodes-setup

ERROR!!! API version is not found in installed Android SDK: 2.1

I am starting Android development in Ruby using Rhomobile framework. I am trying to run rake command for android
rake run:android
but I'm getting following error
ERROR!!! API version is not found in installed Android SDK: 2.1
any hint on how to solve it?
also my rhobuild.yml files looks like
env:
app: /Users/bhushan/rhodes_learn/employee_app
paths:
android-ndk: /Users/bhushan/android-ndk-r7
java: /Library/Java/Home/bin
android: /Users/bhushan/android-sdk-macosx
4.6:
jde:
sim: 9000
mds:
cabwiz:
4.2:
jde:
sim: 8100
mds:
excludedirs:
bb:
- public/js/iui
- public/js/jquery*
- public/jqtouch*
- public/js/prototype*
- public/css/iphone*
- public/iwebkit
- public/themes
- "**/jquery*.js"
- "**/*.db"
- public/images/android
- public/images/iphone
all:
- "**/.*.swo"
- "**/.*.swn"
- "**/.DS_Store"
android:
build:
symbianpath: platform/symbian
bb:
bbsignpwd: somepasswordhere
bbpath: platform/bb
wmpath: platform/wm
androidpath: platform/android
wppath: platform/wp7
iphonepath: platform/iphone
Is the actual Android SDK Platform 2.1 installed? You should be able to check it from the SDK Manager tool that came with the Android SDK.
Also, if you've recently updated Rhodes (to 3.3.1, for example) you may need to re-run rhodes-setup and set-rhodes-sdk to update the locations of the tools
HTH,
I had to change the specified Version number in Rhodes Config file.

Categories

Resources