Build aosp(android13.0.0.r12) fail after "test android/soong/apex" - android

After "test android/soong/apex", the terminal flashback automatically.
Environment:
Ubuntu22.04 + android13.0.0.r12
log:
There is nothing after testing android/soong/apex.
And the window of terminal destroyed.
What steps can compile smoothly after going through?

Related

Reading build config file build.json freezes while cordova run android. #Cordova-developers: Any ideas?

I'm setting up my first hybrid app using cordova / framework7-cli....
all fine, except
cordova run android
freezes with:
"Reading build config file: C:\...\APP\build.json . . . . . . "
and many many more dots.
Tried to
1. cordova build android --release
2. Moved build.json, take a look inside, ok...
3. built a new apk, built a new session, tried another avd ...
build.json:
{
"ios": {
"release": {
"buildFlag": [
"-UseModernBuildSystem=0"
]
},
"development": {
"buildFlag": [
"-UseModernBuildSystem=0"
]
},
"debug": {
"buildFlag": [
"-UseModernBuildSystem=0"
]
}
}
}
However, this freeze causes to break my build-process and nothing happens. normally i can see my app on the selected device...
Does anybody got the same issue?
If using Android Virtual Device make sure to run "Cold Boot Now". This fixed the issue for me

Android studio: JUNIT test, everytime I select to run single method, it keeps running the entire package test folder

I am trying to run unit test from android studio. I select Run "methodnametest" and it runs the entire package test. What to do? I just want to run methodnametest method.
Configuration:
Test kind: method
repeat: once
class: unittestclass
method: methodnametest
vm options: -ea
working directory: path/to/app
enrivonment variables: empty
use classpath of module: app
jre: default
shorten command line: user-local default: none
before launch: gradle-aware make:
gradle-aware make.

CodePushHash not found working with Code Push

So I'm trying to deploy my React Native app using the App Center and integrate Code Push.
I installed the App Center SDK and workds properly but the problem comes when I add the Code Push plugin. It compiles the project nicely and does the sync too, but when I try to install it on my device the build falis saying:
"Process 'command 'node'' finished with non-zero exit value 1"
and "Error: ENOENT: no such file or directory, open '/home/balistic/Documents/sharryup/android/app/build/intermediates/assets/debug/CodePushHash'"
I'm using React Native 0.56.
There is a workaround for this:
In {project_dir}/node_modules/react-native-code-push/android/codepush.gradle (~86-90) just add this three lines:
generateBundledResourcesHash = tasks.create(
name: "generateBundledResourcesHash${targetName}",
type: Exec) {
+doFirst {
+jsBundleDir.mkdirs()
+}
commandLine (*nodeExecutableAndArgs, "${nodeModulesPath}/react-native-code-push/scripts/generateBundledResourcesHash.js", resourcesDir, jsBundleFile, jsBundleDir, resourcesMapTempFileName)
}

Remove console logs from ionic app (release)

How do I get rid of console logs from an ionic 2 release application?
I am developing an ionic 2 app. When I build the release apk and run on a device, I can still attach to the process from chrome://inspect, and view console logs. I have tried removing the cordova-plugin-console, but that makes no difference.
Edit: I found a package that can remove console logs: https://www.npmjs.com/package/remove-console-logs
Just not sure how I can use it to automatically remove them when I build release. Please help.
Thanks.
You can use uglifyjs.config.js for drop all console logs when is a production build.
1 . Copy uglifyjs.config.js from node_modules into your project folder
2 . In the new config file set the flag drop_console to true if production
var isProduction = process.env.IONIC_ENV === 'prod';
...
compress: {
drop_console: isProduction
}
3 . Set your custom configuration in the package.json
"config": { "ionic_uglifyjs": "uglifyjs.config.js" },
And that's all !
If you can still connect with the debugger then it is not a release build - sounds like you may be unintentionally installing the debug build OR connecting to some other app.
EDIT; Above is not necessarily true - there are instances where you can debug the js/html/css content via chrome in a release build ; specifically if the webview debuggability flag is set in code / not set by the build system etc. - this flag is seperate from the application debug flags so if not properly set you will be able to debug a "release" build / not be able to debug a "debug" build - see remote debugging webviews.
END OF EDIT.
( note you have to sign a release build before it will install )
Is it possible the release install failed and you're still looking at a previous debug build ?
Assuming you have a release build and can't connect to see logs via chrome inspect then ;
console.log calls will still be in the release build unless you comment them out - and possibly visible in other ways eg. android tools sdk\tools\monitor - The only way to be sure they aren't visible is to comment them out. You could use something like ;
console.log = function(){} ;
at the end of your device ready function after any plugins have done anything they're likely to do - though there's still no 100% guarantee with this as a badly behaving 3rd party plugin or library might reassign it later and then your calls will still happen - to be absolutely sure you will need to comment them out.
Have you tried remove console logs ?
cordova plugin rm cordova-plugin-console
Then
cordova build --release android

App fails in release mode. How to know why?

I have 2 days of react-native experience and just learned how to build & install app to real device. I signed up apk with key.
executing of:
react-native run-android
works fine on real device, i even can't see any errors in remote debugger
but launching
gradlew installRelease // or
gradlew assembleRelease // plus manually installation
== Unfortunately, App has stopped.
P.S. i can't share code, because it's under NDA, but i use only
redux, react-native-router-flux
and have only 2 simple pages
UP
after launching installation commit after commit starting from empty project, i have found, commit that breaks app on release on device:
i added .babelrc:
"presets": [
"es2015",
"stage-0",
"react-native"
]
}
installed new packages for tests:
"babel-core": "6.11.4",
"babel-loader": "6.2.4",
"babel-preset-es2015": "6.9.0",
"babel-preset-react-native": "1.9.0",
"babel-preset-stage-0": "6.5.0",
"chai": "3.5.0",
"enzyme": "2.4.1",
"eslint-plugin-react": "5.2.2",
"mocha": "2.5.3",
"mockery": "1.7.0",
"react-addons-test-utils": "15.2.1",
"react-dom": "15.2.1",
"react-native-mock": "0.2.5"
After removing
"es2015", "stage-0" from .babelrc app started work on real device also. It would be good to understand why :)

Categories

Resources