You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 8, 2023. It is now read-only.
Make sure to check the demo app(s) for sample usage
Make sure to check the existing issues in this repository
If the demo apps cannot help and there is no issue for your problem, tell us about it
Please, ensure your title is less than 63 characters long and starts with a capital
letter.
Which platform(s) does your issue occur on?
iOS/Android/Both - Android
iOS/Android versions - 7.1
emulator or device. What type of device? Device
Please, provide the following version numbers that your issue occurs with:
CLI: (run tns --version to fetch it) - 3.4.2
Cross-platform modules: (check the 'version' attribute in the node_modules/tns-core-modules/package.json file in your project) 3.4.1
Runtime(s): (look for the "tns-android" and "tns-ios" properties in the package.json file of your project) "tns-android": "3.4.2"
Plugin(s): (look for the version numbers in the package.json file of your
project and paste your dependencies and devDependencies here)
"dependencies": {
"@angular/animations": "~5.2.0",
"@angular/common": "~5.2.0",
"@angular/compiler": "~5.2.0",
"@angular/core": "~5.2.0",
"@angular/forms": "~5.2.0",
"@angular/http": "~5.2.0",
"@angular/platform-browser": "~5.2.0",
"@angular/platform-browser-dynamic": "~5.2.0",
"@angular/router": "~5.2.0",
"nativescript-angular": "~5.2.0",
"nativescript-geolocation": "^4.2.4",
"nativescript-google-maps-sdk": "^2.5.0",
"nativescript-plugin-firebase": "^5.1.8",
"nativescript-theme-core": "~1.0.4",
"reflect-metadata": "~0.1.8",
"rxjs": "~5.5.2",
"tns-core-modules": "~3.4.0",
"zone.js": "~0.8.2"
},
"devDependencies": {
"babel-traverse": "6.4.5",
"babel-types": "6.4.5",
"babylon": "6.4.5",
"lazy": "1.0.11",
"nativescript-dev-typescript": "~0.6.0",
"typescript": "~2.6.2"
}
Please, tell us how to recreate the issue in as much detail as possible.
Describe the steps to reproduce it.
Created default nativescript agular application.
In items.component.ts, add below function in ngOnInit
geolocation.isEnabled().then(function (isEnabled) {
if (!isEnabled) {
geolocation.enableLocationRequest().then(function () {
}, function (e) {
console.log("!!!Error: " + (e.message || e));
});
}
}, function (e) {
console.log("!!Error: " + (e.message || e));
});
Issue is
JS: ERROR Error: Uncaught (in promise): Error: Cannot enable the location service. TypeError: com.google.android.gms.location.LocationRequest is not a constructor
Here is my observation.
When enableLocationRequest() function is called, it pops up permission dialog. However promise returns with error in background with error
Error: [object Object]
On Approving the permissions I get below issue
JS: ERROR Error: Uncaught (in promise): Error: Cannot enable the location service. TypeError: com.google.android.gms.location.LocationRequest is not a constructor
JS: Error: Cannot enable the location service. TypeError: com.google.android.gms.location.LocationRequest is not a constructor
JS: at file:///data/data/com.nativescr.adsample/files/app/tns_modules/nativescript-geolocation/geolocation.js:187:28 [angular]
JS: at Object.onInvoke (file:///data/data/com.nativescr.adsample/files/app/tns_modules/@angular/core/bundles/core.umd.js:4787:33) [angular]
JS: at Object.onInvokeTask (file:///data/data/com.nativescr.adsample/files/app/tns_modules/@angular/core/bundles/core.umd.js:4778:33) [angular]
Executing after-watch hook from C:\Rajan\NativeScript\AdMobSample\hooks\after-watch\nativescript-dev-typescript.js
Executing after-watch hook from C:\Rajan\NativeScript\AdMobSample\hooks\after-watch\nativescript-dev-typescript.js
Is there any code involved?
provide a code example to recreate the problem
(EVEN BETTER) provide a .zip with application or refer to a repository with application where the problem is reproducible.
Code provided above in ngOnInit
The text was updated successfully, but these errors were encountered:
This is a known issue related to the NativeScript app build. Try removing your platforms folder and making a clean app build as described in this issue comment. You could also track the issue progress there.
Make sure to check the demo app(s) for sample usage
Make sure to check the existing issues in this repository
If the demo apps cannot help and there is no issue for your problem, tell us about it
Please, ensure your title is less than 63 characters long and starts with a capital
letter.
Which platform(s) does your issue occur on?
Please, provide the following version numbers that your issue occurs with:
tns --version
to fetch it) - 3.4.2node_modules/tns-core-modules/package.json
file in your project) 3.4.1"tns-android"
and"tns-ios"
properties in thepackage.json
file of your project) "tns-android": "3.4.2"package.json
file of yourproject and paste your dependencies and devDependencies here)
"dependencies": {
"@angular/animations": "~5.2.0",
"@angular/common": "~5.2.0",
"@angular/compiler": "~5.2.0",
"@angular/core": "~5.2.0",
"@angular/forms": "~5.2.0",
"@angular/http": "~5.2.0",
"@angular/platform-browser": "~5.2.0",
"@angular/platform-browser-dynamic": "~5.2.0",
"@angular/router": "~5.2.0",
"nativescript-angular": "~5.2.0",
"nativescript-geolocation": "^4.2.4",
"nativescript-google-maps-sdk": "^2.5.0",
"nativescript-plugin-firebase": "^5.1.8",
"nativescript-theme-core": "~1.0.4",
"reflect-metadata": "~0.1.8",
"rxjs": "~5.5.2",
"tns-core-modules": "~3.4.0",
"zone.js": "~0.8.2"
},
"devDependencies": {
"babel-traverse": "6.4.5",
"babel-types": "6.4.5",
"babylon": "6.4.5",
"lazy": "1.0.11",
"nativescript-dev-typescript": "~0.6.0",
"typescript": "~2.6.2"
}
Please, tell us how to recreate the issue in as much detail as possible.
Describe the steps to reproduce it.
geolocation.isEnabled().then(function (isEnabled) {
if (!isEnabled) {
geolocation.enableLocationRequest().then(function () {
}, function (e) {
console.log("!!!Error: " + (e.message || e));
});
}
}, function (e) {
console.log("!!Error: " + (e.message || e));
});
Issue is
JS: ERROR Error: Uncaught (in promise): Error: Cannot enable the location service. TypeError: com.google.android.gms.location.LocationRequest is not a constructor
Here is my observation.
When enableLocationRequest() function is called, it pops up permission dialog. However promise returns with error in background with error
Error: [object Object]
On Approving the permissions I get below issue
JS: ERROR Error: Uncaught (in promise): Error: Cannot enable the location service. TypeError: com.google.android.gms.location.LocationRequest is not a constructor
JS: Error: Cannot enable the location service. TypeError: com.google.android.gms.location.LocationRequest is not a constructor
JS: at file:///data/data/com.nativescr.adsample/files/app/tns_modules/nativescript-geolocation/geolocation.js:187:28 [angular]
JS: at Object.onInvoke (file:///data/data/com.nativescr.adsample/files/app/tns_modules/@angular/core/bundles/core.umd.js:4787:33) [angular]
JS: at Object.onInvokeTask (file:///data/data/com.nativescr.adsample/files/app/tns_modules/@angular/core/bundles/core.umd.js:4778:33) [angular]
Executing after-watch hook from C:\Rajan\NativeScript\AdMobSample\hooks\after-watch\nativescript-dev-typescript.js
Executing after-watch hook from C:\Rajan\NativeScript\AdMobSample\hooks\after-watch\nativescript-dev-typescript.js
Is there any code involved?
Code provided above in ngOnInit
The text was updated successfully, but these errors were encountered: