Command is gradlew assembleQW >a.txt.
When success, the log is all in a.txt.
But when failure, the reason for the failure is printed in the console.
Using > only redirects STDOUT from the console to the file. If you want to also redirect STDERR you will need to use 2>.
See windows or unix
eg:
gradlew assemble 1> a.txt 2>&1
Related
I am making the Android WebRtc source code on Ubuntu 14.4.When I enter the gclient sync,the errors occur:
Failed to fetch file gs://chromium-android-tools/play-services/10.2.0/31843001b7ce94fbdf71f2a9db76b28548a795fa for /tmp/tmpRcl2od/LICENSE, skipping. [Err: Failure: Server presented certificate that does not match host www.googleapis.com:
....
IOError: [Errno 2] No such file or directory: '/tmp/tmpRcl2od/LICENSE'
Error: Command '/usr/bin/python src/build/android/play_services/update.py download' returned non-zero exit status 1 in /home/jack/workdir
You must have ended up in some kind of corrupted state in your checkout.
I suggest trying to wipe third_party/android_tools/sdk/extras/google/m2repository
and manually run
/usr/bin/python build/android/play_services/update.py download --force
See https://cs.chromium.org/chromium/src/build/android/play_services/update.py for details on that script, if needed.
Worst case you might have to start over entirely, but I don't think that should be necessary.
I fix it by add environment variable:
export BOTO_CONFIG=/path/to/boto.proxy
I trying to build chromium android apk with this instruction
But on GN configuration step I have following problem after arguments file editing and saving
ERROR at //build/config/android/internal_rules.gni:1966:13: Script returned non-zero exit code.
exec_script("//build/android/gyp/find.py",
^----------
Current dir: /home/artem/chromium/src/out/Default/
Command: python -- /home/artem/chromium/src/build/android/gyp/find.py ../../third_party/android_tools/sdk/extras/google/google_play_services/libproject/google-play-services_lib/res
Returned 1.
stderr:
../../third_party/android_tools/sdk/extras/google/google_play_services/libproject/google-play-services_lib/res does not exist
See //build/config/android/rules.gni:634:3: whence it was called.
process_resources(process_resources_target_name) {
^-------------------------------------------------
See //third_party/android_tools/BUILD.gn:120:1: whence it was called.
android_resources("google_play_services_default_resources") {
^------------------------------------------------------------
See //base/BUILD.gn:1074:7: which caused the file to be included.
"//third_party/android_tools:cpu_features",
^-----------------------------------------
Then I try manually download google play services with command from this issue thread:
sudo ./build/android/play_services/update.py download
And get this warning:
Your version of the Google Play services library is not up to date. You might run into issues building or running the app. Please run `./build/android/play_services/update.py download` to retry downloading it.
After that I try to build full browser apk
ninja -C out/Default chrome_public_apk
and get error:
ninja: Entering directory `out/Default'
ninja: fatal: chdir to 'out/Default' - No such file or directory
Is there the way to fix this issue and build working apk file?
This works for me:
Run this command at chromium folder:
git rebase-update
gclient sync
Download google play services:
sudo ./build/android/play_services/update.py download
Configure GN: gn args opt/Full
Add this line to file: target_os="android"
Build apk with command: ninja -C opt/Full chrome_public_apk
I'm trying to execute an Android sample that uses JNI to call C code from a Android Java Activity.
( Hello-jni) using Android Studio in ubuntu 15.04
I get the following error while building my project :
Error:Execution failed for task ':app:
compileHello-jniArm64- v8aDebugAllSharedLibraryHello-jniMainC'.
> No tool chain is available to build for platform 'arm64-v8a':
- Tool chain 'ndk-gcc' (GNU GCC): Could not determine GCC version:
failed to execute aarch64-linux-android-gcc -dM -E -.
Running gradle with the --info flag to determine the command being run:
gradlew :app:compileHello-jniArm64- v8aDebugAllSharedLibraryHello-jniMainC --info
In the output you should see a command containing aarch64-linux-android-gcc -dM -E - with a full path. Check that you do actually have this binary at the path shown (it should have been included in the android ndk).
Assuming you do, try running the command yourself. It will read from stdin and print a bunch of constants to stdout (gradle is trying to parse the version from this), but you want to see stderr:
echo '' | ./aarch64-linux-android-gcc -dM -E - 1>/dev/null
If the command fails, an error should be shown which can hint at the problem. In my case it was trying to include a folder 4.9.x but I had a folder named 4.9. Most likely there will be a different problem with your setup.
I'm trying to build the certification apk for Alljoyn 15.09a. I've cloned the source from https://git.allseenalliance.org/gerrit/compliance/tests and followed the instructions from chapter 5 in AllJoyn™ Validation Test User Guide. It has an error in the validation-tests-suites. The error message is:
Failed tests:
ConfigTestSuiteTest.test_26_timedOutWaitingForSessionLost:1511->BaseTestSuiteTest.executeTestMethodFailsAssertion:67 No assertion failure, expecting assertionFailure with message: Timed out waiting for session to be lost
ConfigTestSuiteTest.test_27_configurationNotRetainedOnRestart:1613->BaseTestSuiteTest.executeTestMethodFailsAssertion:73 expected:<[Received About announcement did not contain expected DeviceName expected:<[newD]eviceName> but was:<[d]]eviceName>> but was:<[Value for DeviceName retrieved from GetAboutData() does not match expected value expected:<deviceName> but was:<newD]eviceName>>
ConfigTestSuiteTest.testConfig_v1_33FactoryResetNoUpdateConfiguratins:1752
mockServiceHelper.waitForNextDeviceAnnouncement(
<any>,
<any>,
<any>
);
Wanted 3 times:
-> at org.alljoyn.validation.testing.suites.config.ConfigTestSuiteTest.testConfig_v1_33FactoryResetNoUpdateConfiguratins(ConfigTestSuiteTest.java:1752)
But was 4 times. Undesired invocation:
-> at org.alljoyn.validation.testing.suites.config.ConfigTestSuite.waitForNextDeviceAnnouncement(ConfigTestSuite.java:181)
ConfigTestSuiteTest.testConfig_v1_35FactoryResetResetsPasscode:1830
mockServiceHelper.waitForNextDeviceAnnouncement(
<any>,
<any>,
<any>
);
Wanted 4 times:
-> at org.alljoyn.validation.testing.suites.config.ConfigTestSuiteTest.testConfig_v1_35FactoryResetResetsPasscode(ConfigTestSuiteTest.java:1830)
But was 5 times. Undesired invocation:
-> at org.alljoyn.validation.testing.suites.config.ConfigTestSuite.waitForNextDeviceAnnouncement(ConfigTestSuite.java:181)
ConfigTestSuiteManagerTest.getApplicableTests:86->validateValidationTestGroup:97->validateValidationTestItems:107 expected:<27> but was:<25>
Tests in error:
ConfigTestSuiteTest.test_27_timedOutWaitingForSessionLost:1587->BaseTestSuiteTest.executeTestMethodFailsAssertion:66->executeTestMethod:2394 » NullPointer
Tests run: 674, Failures: 5, Errors: 1, Skipped: 14
I've made sure I have the correct Maven and Java version. I've also tried 14.12 and getting the same issue, so I think my setup is wrong. Can anyone help me with compiling this?
I found the solution. There is another document: AllSeen Alliance Self-Certification User Guide at https://wiki.allseenalliance.org/_media/compliance/allseen_self_certification_program_developer_guide_v5.doc.
It updates the final step to:
$ mvn clean install –Dmaven.test.skip=true -Dandroid.sdk.path=$ANDROID_SDK
which fixed my problem. So the steps I followed were
$ git clone https://git.allseenalliance.org/gerrit/compliance/tests
Copy the libraries listed in the README.txt in $VAL_DIR/java/components/validation-dependencies/libs to $VAL_DIR/java/components/validation-dependencies/libs
$ cd tests/java/components/validation-base/HEAD/
$ mvn clean install
$ cd ../../validation-dependencies/HEAD/
$ mvn clean install
$ cd ../../validation-framework/HEAD/
$ mvn clean install
$ cd ../../validation-tests/HEAD/
$ mvn clean install -Dmaven.test.skip=true -Dandroid.sdk.path=$ANDROID_SDK
I was having an error that is Camera not successful invoked on first try (click) so I tried this solution on stackoverflow Phonegap(3.0.0) Camera not successful on first try.
I followed the steps as mentioned in the answer removed android by cordova platform remove android then I run the second command cordova platform add android ;
Now when I use netbeans to run the cordova application on cordova android decvice this error occurs:
exec: ant debug -f "/var/www/mobile/platforms/android/build.xml"
[ 'ant debug -f "/var/www/mobile/platforms/android/build.xml"',
{ [Error: Command failed:
BUILD FAILED
/var/www/adt-bundle-linux-x86_64-20130917/sdk/tools/ant/build.xml:720: The following error occurred while executing this line:
/var/www/adt-bundle-linux-x86_64-20130917/sdk/tools/ant/build.xml:734: Compile failed; see the compiler error output for details.
Total time: 8 seconds
] killed: false, code: 1, signal: null },
'Buildfile: /var/www/mobile/platforms/android/build.xml\n\n-set-mode-check:\n\n-set-debug-files:\n\n-check-env:\n [checkenv] Android SDK Tools Revision 22.3.0\n [checkenv]
.
.
.**LONG TEXT which I removed from the post **
.
\nBUILD FAILED\n/var/www/adt-bundle-linux-x86_64-20130917/sdk/tools/ant/build.xml:720:
The following error occurred while executing this line:\n/var/www/adt-bundle-linux-x86_64- 20130917/sdk/tools/ant/build.xml:734:
Compile failed; see the compiler error output for details.\n\nTotal time: 8 seconds\n' ]
Error executing "ant debug -f "/var/www/mobile/platforms/android/build.xml"":
BUILD FAILED
/var/www/adt-bundle-linux-x86_64-20130917/sdk/tools/ant/build.xml:720: The following error occurred while executing this line:
/var/www/adt-bundle-linux-x86_64-20130917/sdk/tools/ant/build.xml:734: Compile failed; see the compiler error output for details.
Total time: 8 seconds
child_process.spawn(/var/www/mobile/platforms/android/cordova/build,[]) = 2
/usr/local/lib/node_modules/cordova/node_modules/q/q.js:126
throw e;
Error: An error occurred while building the android project.Error executing "ant debug -f "/var/www/mobile/platforms/android/build.xml"":
BUILD FAILED
/var/www/adt-bundle-linux-x86_64-20130917/sdk/tools/ant/build.xml:720: The following error occurred while executing this line:
/var/www/adt-bundle-linux-x86_64-20130917/sdk/tools/ant/build.xml:734: Compile failed; see the compiler error output for details.
Total time: 8 seconds
at ChildProcess.<anonymous> (/usr/local/lib/node_modules/cordova/src/compile.js:65:22)
at ChildProcess.EventEmitter.emit (events.js:98:17)
at maybeClose (child_process.js:735:16)
at Socket.<anonymous> (child_process.js:948:11)
at Socket.EventEmitter.emit (events.js:95:17)
at Pipe.close (net.js:466:12)
/var/www/mobile/nbproject/build.xml:256: exec returned: 8
BUILD FAILED (total time: 4 minutes 36 seconds)
any idea about this problem?
I was having a similar issue. I ran ant debug -f "/path/to/project/build.xml" from a separate terminal. It displayed a more specific description of the error (which for me wast that there was a space in the project name). This answer also notes:
config.xml can't have a widget id with number as a first character
after a dot. For example: com.42myapp.test or com.myapp.42test won't
work as well as 42com.myapp.test. It will trigger an error from the
compiler.
I was facing similar issues when i started using the CLI to build apps using cordova and started checking the internet for solutions. While i was at it, i discovered the following things that may help you or anyone else facing the same problem can take some hints from this:
These are some very basic checks that you need to take
1. make sure you have all the required sdk's in place (ANT, Java, Android) and is available when you use these commands on the terminal/command $ ant $ java $ adt. if any of these commands are not found, then you need to get it installed or get the class paths fixed.
make sure your project path does not have spaces. i.e. do not have spaces or special characters in directory names. this issue seems to have been fixed on latest versions of cordova and phonegap, but either cases it is a good practice to follow as ant and java paths could be dependent on the folder names you make.
use -d or -v to get extra debug information on the build process to know where and what is causing the issue. $ cordova build android -d or $ cordova build android -v
Make sure you dont use "#" as the link attribute of author tag in the cordova config.xml on the root of the project. This expects the compiler to interpret a hexadecimal color and fails the build. (this was my problem)
Hope this helps.
er... Happy debugging??
Make sure your Ant is 1.8.0 or later version. Cordova 3.3 demands that.
In the past several days, I found that the conflicting files from Dropbox had a very long name. After renaming it, everything worked.