-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
@nativescript/core 8.5.4+: ReferenceError androidApp is not defined #10323
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Labels
Comments
The attached app runs without errors for me, only changed the const applicationModule = require("@nativescript/core/application");
const connectivityModule = require("@nativescript/core/connectivity");
applicationModule.on(applicationModule.suspendEvent, function(args) {
connectivityModule.stopMonitoring();
});
applicationModule.on(applicationModule.resumeEvent, function(args) {
connectivityModule.startMonitoring(function(newConnectionType) {
console.log('Connection type changed', newConnectionType);
});
});
applicationModule.run({ moduleName: 'app-root' }); Webpack compilation complete. Watching for file changes.
Successfully transferred bundle.js on device emulator-5554.
Restarting application on device emulator-5554...
+ Connection type changed 1
device: emulator-5554 debug port: 40000
To start debugging, open the following URL in Chrome:
devtools://devtools/bundled/inspector.html?ws=localhost:40000
Successfully synced application org.nativescript.nsandroidcrash on device emulator-5554. Do note that deep imports into the import { Application, Connectivity } from "@nativescript/core";
Application.on(Application.suspendEvent, () => {
Connectivity.stopMonitoring();
})
Application.on(Application.resumeEvent, () => {
Connectivity.startMonitoring((newConnectionType) => {
console.log('Connection type changed', newConnectionType);
});
});
Application.run({ moduleName: 'app-root' }); |
Edit: Sorry, I missed the android 8 or below part - let me run that. |
rigor789
added a commit
that referenced
this issue
Jun 23, 2023
5 tasks
NathanWalker
added a commit
that referenced
this issue
Jun 23, 2023
fixes #10323 Co-authored-by: Nathan Walker <walkerrunpdx@gmail.com>
Now it's working, thanks for the quick fix! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Issue Description
After upgrading @nativescript/core from 8.5.3 to 8.5.4 (or latest 8.5.6), our Android app is crashing for Android 8 and below when calling the connectivity startMonitoring method.
Reproduction
app for reproduction:
nsandroidcrash.zip
Just start the app on Android 8 or below, then you will see the crash.
Relevant log output (if applicable)
Environment
Dependencies
Please accept these terms
The text was updated successfully, but these errors were encountered: