I've followed build instructions for Chromium for Snapdragon m54 stable build. I've added google play libs manually (as library_project is now missing in SDK). On
ninja -C out/Default swe_browser_apk
i'm getting error that "swe_browser_apk" target is not found.
gn ls out/Default
shows that there are lots of other targets including chrome_public_apk.
Why is swe_browser_apk missing? Any newer instructions since that times?
Update 1: i was unable to find "swe_browser_apk" in .gn files so is build doc outdated/incorrect?
It's much more easier to checkout m58 (instead of m54) branch and modify .gclient file to use git://codeaurora.org/quic/chrome4sdp/chromium/src.git#refs/remotes/origin/m58. Just like it's written in the build instructions you will get SWE_Browser.apk in out/Default/apks (swe_browser_apk target exists).
Related
In Ubuntu 16.04, when running an Android Tensorflow TFDetect implementation using my protobuf file, I received an error stating "No OpKernel was registered to support Op 'ceil'". I had to modify the mobile build to include the proper .cc files and I then proceeded to run the following command to build the jar after rebuilding Tensorflow:
bazel build -c opt
//tensorflow/contrib/android:libtensorflow_inference.so
--crosstool_top=//external:android/crosstool --host_crosstool_top=#bazel_tools//tools/cpp:toolchain --cpu=armeabi-v7a
I then receive the error stating that the build was not complete due to stdlib.h missing:
In file included from
external/androidndk/ndk/sources/cxx-stl/gnu-libstdc++/4.9/include/algorithm:62:
In file included from
external/androidndk/ndk/sources/cxx-stl/gnu-libstdc++/4.9/include/bits/stl_algo.h:59:
external/androidndk/ndk/sources/cxx-stl/gnu-libstdc++/4.9/include/cstdlib:72:10:
fatal error: 'stdlib.h' file not found
I see many others being told to use the prebuilt binaries, but this will not work for me as I need some additional kernels that are stripped for mobile.
Anyone have any ideas as to how I can build the necessary android jar?
Well I found the issue. At the following link below it states that bazel is not supported by NDK version 16. I had originally installed 14b, but at one point when I opened my project in Android Studio, it asked to update the NDK and I upgraded. When I happened to be troubleshooting this issue I noticed that it was version 16 and then ended up removing that and installing version 14. After rebuilding all source and then performing the above call to bazel, everything went through smoothly. Stupid mistake on my part.
https://github.com/tensorflow/tensorflow/blob/master/tensorflow/examples/android/README.md
i'm following this tutorial from firefox android source code https://wiki.mozilla.org/Mobile/Fennec/Android
but, the problem i can't ./mach build, ./mach package, ./mach install and i already create .mozconfig file in mozilla-central but it's can't found the file.
like this:
i'm using Ubuntu 14.04.2
thx for help
You probably had an error during the initial "mach bootstrap" step. Your screenshot tells us, that mach can't find the android sdk tools. It's looking for them under ~/.mozbuild/android-sdk-linux/.
One thing you could do is to manually put your sdk under that directory and then retry "mach bootstrap" from the source dir to resolve the remaining dependencies.
Also see these steps for manual setup of the build tools: https://wiki.mozilla.org/Mobile/Fennec/Android/Detailed_build_instructions
Since updating my Android SDK about a month ago I've had endless problems leaving me with a non-functional development environment.
Initially the problem was with the v7-appcompat support library which threw up about 100 errors relating to various resources. It was fairly obvious they were resources relating to Android v5 and a quick search on Stack Overflow meant I realised the v7-appcompat library was targeting API 19. Changing the relevant settings to target API 21 fixed the resource errors.
However, the problem I've had since then is any attempt to build the library project quickly finishes with...
Error executing aapt: Return code 132
...and the library project isn't built correctly.
My original setup was with Eclipse Kepler but then I tried Android Studio v1.0.1 (same aapt error code) and today I installed Eclipse Luna to a separate directory from Kepler AND a fresh installation of ADT and SDK. Each version of Eclipse also have their own workspaces.
So basically I have two versions of Eclipse (each with their own ADT / SDK setups and workspaces) and Android Studio with its own directory structure and all three exhibit the same problem.
The question is, how do I go about diagnosing this issue? The common denominator is obviously an aapt issue but I have no idea how to fix it.
I'm running on a Debian Wheezy (32-bit) setup and I've got Java 1.7 installed correctly (as recommended).
There seems to be an issue with aapt on some 32 bit systems. It throws an error 132 on app:processDebugResources which is when aapt is 'crunching' png files ready for inclusion in the apk package. You can see more details at https://code.google.com/p/android/issues/detail?id=75110
Some people have reported that 'fixing' the offending png files (e.g. by opening in Gimp and saving) sorts the problem. When they are 'built in' to appcompat it's much harder to do of course.
Before getting into detail can you just say if you are indeed running on a 32 bit processor, and if so which one? use lscpu to find out.
OK, if anyone is interested, here is a work around so you can use your old laptop to build apps with Android Studio. Basically you strip all the png files in the appcompat-v7 library and then do a build using two versions of aapt. Yuk.
Find the appcompat-v7.aar which will be somewhere like ~/Android/Sdk/extras/android/m2repository/com/android/support/appcompat-v7/22.0.0
Extract it (it's a zip file really) to a temporary directory
Strip all the png files: find . -name "*.png" -exec mogrify -strip {} \;
Pack the files back up again: pushd appcompat-v7-22.0.0; zip -r ../appcompat-v7-22.0.0.aar; popd
Move the new aar file to replace the original (that may be enough to get a good build but it wasn't for me)
Now find an old version of aapt (I went to https://dl-ssl.google.com/android/repository/build-tools_r17-linux.zip)
Copy the version of aapt from the zip you've just picked up into the Android/Sdk/build-tools directory as aapt-17 or whatever
Rename the original aapt to aapt-0
Alternate between the two versions of aapt (e.g. ln -sf aapt-17 aapt) and you should find you can get a good build. One version will fail in one place, the other in another, getting you past all the bumps.
I know it stinks but I was desperate!!
Here's what I did, which is enough to get a successful build. Inspired by peterthevicar's answer.
downgrade sdk to 19.1.0, you can install it from studio and then change buildToolsVersion in build.gradle
rename aapt to aapt.bin and put a shell script in its place that intercepts just the png crunch (args: s -i infile -o outfile) and does a simple cp instead. would paste it here but SO's syntax highlighting suuuucks
Update: To clarify, I can build the process successfully. The question is about installing the example project directly on a device (though I'm thinking emulator won't work either).
I developed a module about two years ago that allowed bluetooth connectivity on Android. I believe the latest version of the Titanium SDK at the time was around 2.0. I believe the specifics of the module and the example app are irrelevant to this question. I will ask my question first, and then try and explain the steps that I have gone through to lead me to the actual question.
My question is: is something in my environment misconfigured, or is this a bug in the Titanium SDK?
If it is the latter, I am very surprised that I can't find any information about it, since it prevents android modules from installing with ant in the latest SDK.
Information about my build environment:
Mac OS 10.9.5
Titanium Studio 3.3.0.GA
Ti CLI 3.3.0
Android 19
java -version: java version "1.6.0_65"
Java(TM) SE Runtime Environment (build 1.6.0_65-b14-462-11M4609)
Java HotSpot(TM) 64-Bit Server VM (build 20.65-b04-462, mixed mode)
I am trying to build it now for the latest SDK, 3.3.0 at the time of this writing. I found that when I tried to build (install) with ant, it resulted in the following output:
[exec] [ERROR] /var/folders/x7/h7lgzf1n4nx7fcwr26fdrzxr0000gn/T/mTUYC62ti/testmodule/build/android/res/values-v14/themes_base.xml:133: error: Error: No resource found that matches the given name: attr 'android:actionBarWidgetTheme'.
[exec] [ERROR] /var/folders/x7/h7lgzf1n4nx7fcwr26fdrzxr0000gn/T/mTUYC62ti/testmodule/build/android/res/values-v14/themes_base.xml:148: error: Error retrieving parent for item: No resource found that matches the given name 'android:Theme.Holo.Light.DialogWhenLarge'.
[exec] [ERROR] /var/folders/x7/h7lgzf1n4nx7fcwr26fdrzxr0000gn/T/mTUYC62ti/testmodule/build/android/res/values-v14/themes_base.xml:159: error: Error: No resource found that matches the given name: attr 'android:actionBarWidgetTheme'.
[exec] [ERROR] Error generating R.java from manifest
[exec] [ERROR] Build Failed.
BUILD SUCCESSFUL
Total time: 20 seconds
Not only that, but when creating a brand new mobile module project, and building straightaway with ant:
cd proj/android && ant install
The errors are the same. I should also point out that I reformatted not too long ago, so I find it unlikely that I have borked my titanium installation already. Now, from here, I've gotten into the Titanium build scripts to try and figure out what is happening. First, from the Titanium SDK 3.3.0 release notes:
Due to the addition of the appcompat library, there are a number of behavior changes to the application:
...
The target SDK must be set to API level 14 (Android 4.0.x) or higher, or you must have API level 14 or higher installed.
Now in the build output for my project:
[exec] [TRACE] Writing out AndroidManifest.xml
[exec] [DEBUG] /path/to/my/androidsdk/build-tools/17.0.0/aapt package -m -J /var/folders/x7/h7lgzf1n4nx7fcwr26fdrzxr0000gn/T/mTUYC62ti/testmodule/build/android/gen -M /var/folders/x7/h7lgzf1n4nx7fcwr26fdrzxr0000gn/T/mTUYC62ti/testmodule/build/android/AndroidManifest.xml -S /var/folders/x7/h7lgzf1n4nx7fcwr26fdrzxr0000gn/T/mTUYC62ti/testmodule/build/android/res -I /path/to/my/androidsdk/platforms/android-10/android.jar
Note that it's using the tools for android-10 and not android-14+ which is strange considering the relevant bits of my timodule.xml and build.properties:
timodule.xml:
<uses-sdk android:minSdkVersion="14" android:targetSdkVersion="19" />
<tool-api-level>19</tool-api-level><!-- deprecated - see below -->
build.properties:
titanium.platform=/Users/trey/Library/Application Support/Titanium/mobilesdk/osx/3.3.0.GA/android
android.platform=/Users/trey/sdk/android-sdk-macosx/platforms/android-19
google.apis=/Users/trey/sdk/android-sdk-macosx/add-ons/addon-google_apis-google-19
android.ndk=/Users/trey/sdk/android-ndk-r9d
As it turns out, it seems to be only the deprecated element that matters, and not in timodule.xml at all. Build scripts are found at $titanium_sdk/$os/$version/android/
Observation: Setting MIN_API_LEVEL = 19 (or 14) instead of 10 in builder.py fixes the issue. So the build script is ignoring my configuration and using the default. This seems to happen in the init method of the builder class:
temp_tiapp = TiAppXML(self.project_tiappxml)
if temp_tiapp and temp_tiapp.android:
if 'tool-api-level' in temp_tiapp.android:
self.tool_api_level = int(temp_tiapp.android['tool-api-level'])
tool_api_level_explicit = True
This sets the tool_api_level that the build script uses, but in my case it never gets called because there is not tiapp.xml. So I made a tiapp.xml, and put it in my example project. It has the same configs as the timodule.xml. As part of the build process this gets copied along with the rest of the example project into a temp folder that will be used to build and run the project. self.project_tiappxml in the code above is the root of the project. And there is still no tiapp.xml there, because it was copied to the Resources directory with everything else, so tool_api_level always gets set to the default of 10. That is basically as far as I've gotten.
So, again my question: is my configuration wrong, or is this a bug. It seems to me that if it is a bug, then no one would be able to build android modules, best I can tell. So if it's my fault, what have I done to cause it, and how can I fix it.
Update: If you saw my last edit, that was wrong and I'm sorry - my selected SDK for ti was 3.2.3! Fixed that and it creates the new project fine. It also builds. However, installing the example project still results in the same error as above:
[exec] [ERROR] Error generating R.java from manifest
[exec] [ERROR] Build Failed.
I also added a line above the call to aapt, to clarify that these errors occur while trying to write AndroidManifest.xml for the example project.
Its good you are working with 3.3.0, because from this version Android module creation is relatively easy.by viewing your build.properties i think something is missing or you forgot to add completely here it should be something close to :
titanium.platform=/Users/xxxxxx/Library/Application Support/Titanium/mobilesdk/osx/3.3.0.GA/android
android.platform=/Users/xxxxxx/Documents/adt-bundle-mac/sdk/platforms/android-16
google.apis=/Users/xxxxxx/Documents/adt-bundle-mac/sdk/add-ons/addon-google_apis-google-16
android.ndk=/Users/xxxxxx/Documents/android-ndk
but what i would suggest is check the following things as they get missed often:
you should have android-ndk installed and in the path
you must have gperf installed with your system(for mac comes with xcode command line tools)
Followed by running the following command in your terminal:
ti create -p android -t module -d <WORKSPACE_DIR> -n <MODULE_NAME> -u <MODULE_URL> --id <MODULE_ID>
## Sample Command
ti create -p android -t module -d ~/Documents/Sample_Workspace/ -n calc -u http:// --id org.appcelerator.calc
If everything is alright you will have a module in your Sample_Workspace folder with name calcand the given id.
you can work on it directly by importing it to your eclipse. and once done can build it using ant over the directory.
Hope it helps. Check the module creation guide.
I am trying to build the bitmap-plasma sample that is included with the ndk, but getting an error. I run ndk-build from the samples/bitmap-plasma directory, and the error it displays is that it cannnot locate android/bitmap.h file.
How do i direct the ndk-build script to the file it needs?
Using android-ndk-r4 on Ubuntu Lucid 10.04
Well it's working now, so in case anyone was having my same problem:
There as an android-ndk-r4b bugfix release today, which it seems no longer has this problem.
Available to download here.
http://developer.android.com/sdk/ndk/index.html
With Ubuntu 10.04 and NDK r5b, I have just posted a bug report (with the fix included) for build_platforms.sh. See http://code.google.com/p/android/issues/detail?id=15180 for details. Essentially, the local declarations in the symlink routine must be amended. Otherwise, it only links the first file (alphabetically) from each directory, and truncates the remainder from the list.
Correcting this allowed the symbolic links to be fully populated, thereby filling in the missing header files and libraries and allowing the samples to build successfully.