@mehraj786 wrote:
hi i am using authguard after login if i minimize or close the app. again when i open it loads 2 second login page then loads dashboard how to prevent to load login page can anyone give me solution please
Posts: 1
Participants: 1
@mehraj786 wrote:
hi i am using authguard after login if i minimize or close the app. again when i open it loads 2 second login page then loads dashboard how to prevent to load login page can anyone give me solution please
Posts: 1
Participants: 1
@wojtekkabat wrote:
Hello everyone! In this difficult time of covid quarantine, I thought I’d make a mobile game!
I decided to go for Ionic, as I made some apps with Ionic before and it worked great, even though the framework isn’t necessarily meant for game-dev
Please check it out, and let me know what you think! Links to Google Play and App Store below:
Thanks!
Posts: 1
Participants: 1
@transitlounge wrote:
Hi, I’m running in to an error when building my ios app in xcode, i get:
duplicate symbols for architecture arm64I’ve tried to delete the “ios” directory and run ionic capacitor add and open ios again, but I get the same error.
When I look into the ios/App/Pods directory I see that most files are double, also the .podspec files in the capacitor-cordova-ios-plugins folder, so I’m guessing this might have something to do with it.
Unfortunately I have limited understanding of this part of the process, could anyone tell me how I can avoid this duplication?
Posts: 1
Participants: 1
@AvkAvk wrote:
BilingPage.html:16 ERROR TypeError: Cannot read property ‘open’ of undefined
at BilingPage.payMonthlySubscription (VM6093 biling-biling-module.js:192)
at Object.eval [as handleEvent] (VM6398 BilingPage.ngfactory.js:47)
at handleEvent (VM5872 vendor.js:77277)
at callWithDebugContext (VM5872 vendor.js:78896)
at Object.debugHandleEvent [as handleEvent] (VM5872 vendor.js:78531)
at dispatchEvent (VM5872 vendor.js:64364)
at VM5872 vendor.js:76209
at HTMLElement. (VM5872 vendor.js:90060)
at ZoneDelegate.invokeTask (VM5869 polyfills.js:3741)
at Object.onInvokeTask (VM5872 vendor.js:73280)
View_BilingPage_0 @ BilingPage.html:16
proxyClass @ compiler.js:19671
logError @ core.js:45546
handleError @ core.js:6066
dispatchEvent @ core.js:29808
(anonymous) @ core.js:42925
(anonymous) @ platform-browser.js:2668
invokeTask @ zone-evergreen.js:391
onInvokeTask @ core.js:39680
invokeTask @ zone-evergreen.js:390
runTask @ zone-evergreen.js:168
invokeTask @ zone-evergreen.js:465
invokeTask @ zone-evergreen.js:1603
globalZoneAwareCallback @ zone-evergreen.js:1629
BilingPage.html:16 ERROR CONTEXT DebugContext_ {view: {…}, nodeIndex: 18, nodeDef: {…}, elDef: {…}, elView: {…}}my code
ionViewDidLoad(){
const data = JSON.parse(localStorage.getItem(‘userData’));
setTimeout(() => {
this.handler = StripeCheckout.configure({
key: 'pk_live_EycRreERERdDFSJrPNbDVj', image: 'https://nautalert.com/images/NautSmallIcon.png', // Picture you want to show in pop up locale: 'auto', email: data.userData.email, token: token => { // Handle Stripe response token["plan"] = this.plan_id; token["user_id"] = data.userData.user_id; console.log(token); this.httpClient.post('https://nautalert.com/store/jsoncharge.php', JSON.stringify(token)) .subscribe(res => { var response: any; response = res; console.log(response.message); console.log(response.success); if (response.success) { this.vesselProvider.getVesselData(data.userData).subscribe(vData => { console.log("Vessel data retrieved"); this.vesselData = <any>vData; if (this.vesselData.completed == false) // this.navCtrl.setRoot(VesselPage); this.navCtrl.navigateRoot('vessel'); else // this.navCtrl.setRoot(HomePage); this.navCtrl.navigateRoot('tab1'); }, (err) => { console.log("No vessel data"); // this.navCtrl.setRoot(VesselPage); this.navCtrl.navigateRoot('vessel'); }) } else { // let alert= this.alertCtrl.create({ // header: 'Subscription Error', // message: response.message, // buttons:['ok'] // }); // alert.present(); } }); }})
}, 1000)
}
@HostListener(‘window:popstate’)
onPopstate() {
this.handler.close(); // To close the pop-up
}
payMonthlySubscription() {
//this.plan_id = ‘plan_G2WNMSQmsr4XOf’;
this.plan_id = ‘M’;
this.handler.open({
name: ‘NautAlert Monthly’, // Pass your application name
amount: 1500 // Pass your billing amount
});
}
paySeasonalSubscription() {
//this.plan_id = ‘plan_G2WN5N3b0HNSeU’;
this.plan_id = ‘S’;
this.handler.open({
name: ‘NautAlert Seasonal’, // Pass your application name
amount: 9900 // Pass your billing amount
});
}
payYearlySubscription() {
//this.plan_id = ‘plan_G2WNVMjVxbEkRA’;
this.plan_id = ‘Y’;
this.handler.open({
name: ‘NautAlert Seasonal’, // Pass your application name
amount: 14900 // Pass your billing amount
});
}
please help
Posts: 1
Participants: 1
@Shashanksr wrote:
Hi Team,
filter(value) { this.loading.show();//shows loading circle this.videos = [];//defines this.videos as an empty array let temp = this.ytProvider.getVideos(value);//defines temp as our http call in yt provider //we subscrive to videos of category value here temp.subscribe(data => { data.forEach(res => { //if video is not present in videos array, we push it into the array if (this.videos.indexOf(res) == -1) { this.videos.push(res); } }); this.loading.hide();// hides loading circle }, err => { //shows error alert if there is an issue with our subscription let alert = this.alertCtrl.create({ message: JSON.stringify(err), buttons: ['OK'] }); this.loading.hide();//hides loading circle }); }Here I am getting this error.
Property ‘subscribe’ does not exist on type ‘void’.
Posts: 1
Participants: 1
@indraraj26 wrote:
Is anybody tried making this kind of tab? through some idea
Posts: 1
Participants: 1
@AIBug wrote:
I’m trying to use Sendgrid (mailing service) for my contact page in my app. But… I’m not sure how… I think I’m close. Can anyone help me?
This is the code when the user hits the submission button…
async submit(form: NgForm) { this.submitted = true; if (form.valid) { this.supportMessage = ''; this.submitted = false; const toast = await this.toastCtrl.create({ message: 'Your support request has been sent.', duration: 3000 const sgMail = require('@sendgrid/mail'); sgMail.setApiKey(process.env.SENDGRID_API_KEY); msg = { to: 'test@example.com', from: 'test@example.com', subject: 'Sending with Twilio SendGrid is Fun', text: 'and easy to do anywhere, even with Node.js', html: '<strong>and easy to do anywhere, even with Node.js</strong>', }; this.sgMail.send(msg); }); await toast.present(); } }
I also added a picture so you could see the error.
Sorry if I’m wasting your time over something that’s simple.
Hope you can help
Posts: 1
Participants: 1
@PanJanPan wrote:
Hello,
I am building an app (Ionic 5 + Angular 9 + Capacitor) where I have long lists of cards containing images and short description.
So, in this case I have to use virtual scroll because the pages with long lists are loading too slow otherwise.
The problem is that the same images (from outside url) are loading again every time you scroll down and up so, it’s really bad if you use mobile connection (3G etc.) and also I would like to use these images if you are offilne/loose the connection.I have it solved somehow, however, if you scroll too fast down and up the right images are replaced with wrong ones. It is because of virtual scroll.
So, do you know any good solution which I could use for images caching and their offline use if I use virtual scroll?
First, I wanted to use ServiceWorker but it doesn’t work if you build an app on a device. See more about the issue here: https://github.com/ionic-team/ionic/issues/20890
I have also found this plugin https://github.com/zyra/ionic-image-loader but it does not work with Ionic 5 and Capacitor.
So, my solution for now is something like that:
home.page.html:
<ion-virtual-scroll class="scroll" [items]="_filteredEvents" approxItemHeight="126px"> <app-event-list-card *virtualItem="let event" [event]="event" [networkStatus]="_networkStatus" style="opacity:1"></app-event-list-card> </ion-virtual-scroll>event-list-card.component.ts:
ngOnChanges(changes: SimpleChanges) { Storage.get({key: 'img' + this.event.id}).then((image) => { if (image.value) { this.event.image = image.value; // todo: do not assign a variable to event object this.changeDetectorRef.markForCheck(); } else if(this.networkStatus) { this.convertImageToBase64(this.event.image).then((dataUrl: string) => { Storage.set({key: 'img' + this.event.id, value: dataUrl}); }); this.changeDetectorRef.markForCheck(); } else { this.event.image = this.transparentImage; } }); } private async convertImageToBase64(url): Promise<any> { const response = await fetch(url); const blob = await response.blob(); const result = new Promise((resolve, reject) => { if (blob.type === 'text/html') { resolve(this.transparentImage); } else { const reader = new FileReader(); reader.onloadend = () => resolve(reader.result); reader.onerror = () => reject; reader.readAsDataURL(blob); } }); return await result; }event-list-card-component.html:
<ion-card *ngIf="event" [routerLink]="'/event-details/' + event.id" [class]="event.cancelled == 1 ? 'event-card__card event-card__card--cancelled' : 'event-card__card'"> <ion-card-content class="event-card__inner"> <ion-grid class="ion-no-padding"> <ion-row class="ion-align-items-center"> <ion-col size="5"> <ion-thumbnail class="event-card__thumb"> <!--<ion-img [src]="event.image" (ionError)="loadDefaultImage($event)" alt="Image - {{ event.name}}"></ion-img>--> <img [src]="sanitizer.bypassSecurityTrustResourceUrl(event.image)" onerror="this.src='data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7'" crossorigin="anonymous"> </ion-thumbnail> </ion-col> <ion-col size="7" class="event-card__description ion-no-padding"> <ion-row class="ion-text-center"> <h2 class="event-card__title">{{ (event.name) }}</h2> </ion-row> <ion-row class="ion-text-center"> <h4 class="event-card__category">{{ event.event_type }}</h4> </ion-row> <ion-row class="ion-text-center"> <h3 class="event-card__location">{{ event.location }}</h3> </ion-row> </ion-col> </ion-row> </ion-grid> </ion-card-content> </ion-card>I am using onChanges here because if you use onInit with virtual scroll it will be executed only about 10 times even if you have 100 items – virtual scroll is replacing the cards instead of creating new ones.
Posts: 1
Participants: 1
@peterkhang69 wrote:
HelloWorld[3422:896522] [access] This app has crashed because it attempted to access privacy-sensitive data without a usage description. The app’s Info.plist must contain an NSFaceIDUsageDescription key with a string value explaining to the user how the app uses this data.
ionic cordova plugin addhttps://github.com/simon-ntitle/cordova-plugin-keychain-touch-id.git--variable FACEID_USAGE_DESCRIPTION="For easy authentication"From Baako in slack chnnel.
Probably codova plugin don’t add FACEID_USAGE_DESCRIPTION into info.plist of iOS Project sources auto generated.
Posts: 1
Participants: 1
@shinix wrote:
Hi everybody,
For my mobile app (iOS and Android), i’m working to change a little bit the design of tab bar. After some search, i have see nothing to make that free, so i’ve decided to publish my code here to help the community.
Here’s the result of the tab bar (on iPhone 11 Pro Max emulator)
Modify your tabs.page.html with:
<ion-tabs> <ion-fab vertical="bottom" horizontal="center" translucent="true"> <ion-fab-button (click)="goToPictures()"> <ion-icon name="camera"></ion-icon> </ion-fab-button> </ion-fab> <ion-tab-bar slot="bottom" class="ion-no-border"> <ion-tab-button tab="tab-encounters"> <ion-icon name="compass"></ion-icon> </ion-tab-button> <ion-tab-button tab="tab-conversations" class="comments"> <ion-icon name="chatbubbles"></ion-icon> <ion-badge *ngIf="new_message">{{new_message}}</ion-badge> </ion-tab-button> <svg height="50" viewBox="0 0 100 50" width="100" xmlns="http://www.w3.org/2000/svg"><path d="M100 0v50H0V0c.543 27.153 22.72 49 50 49S99.457 27.153 99.99 0h.01z" fill="red" fill-rule="evenodd"></path></svg> <ion-tab-button tab="tab-notifications" class="notifs"> <ion-icon name="notifications"></ion-icon> <ion-badge *ngIf="new_activities">{{new_activities}}</ion-badge> </ion-tab-button> <ion-tab-button tab="tab-profile"> <ion-icon name="person"></ion-icon> </ion-tab-button> </ion-tab-bar> </ion-tabs>Change tab url and remove badges if not necessary and then you can create on tabs.page.ts
goToPictures()function.After that, you can simply add on tabs.page.scss
ion-tabs{ ion-fab { margin-bottom: env(safe-area-inset-bottom); /* fix notch ios*/ ion-fab-button { --box-shadow: none; } } ion-tab-bar { --border: 0; --background: transparent; position: absolute; bottom: 0; left:0; right: 0; width: 100%; &:after{ content: " "; width: 100%; bottom: 0; background: var(--ion-color-light); height: env(safe-area-inset-bottom); position: absolute; } ion-tab-button { --background: var(--ion-color-light); } ion-tab-button.comments { margin-right: 0px; border-top-right-radius: 18px; } ion-tab-button.notifs { margin-left: 0px; border-top-left-radius: 18px; } svg { width: 72px; margin-top: 19px; path{ fill: var(--ion-color-light); } } } }Tell my if you make some change
and a little screenshot with your app make me happy
If you want to change tab bar color, modify only all
var(--ion-color-light);
@indraraj26 to see my post
Posts: 1
Participants: 1
@alitalaee wrote:
Hi Everyone
I want to create a slider in ionic, then change slidesPerView depend on device or browser Size;
for example I want when device size in 360 or lower , slidesPerView = 4 and when device size between 360 and 400 it is slidesPerView = 6 and so on …
like below image…![]()
I tried below solution and thats work, but it is not async… I need Async way
slideOpts = { initialSlide: 1, slidesPerView: this.checkScreen(), speed: 600, slideShadows: true, spaceBetween: this.spaceBetween }; checkScreen() { let innerWidth = window.innerWidth; switch (true) { case 340 <= innerWidth && innerWidth <= 400: return 4; case 401 <= innerWidth && innerWidth <= 700: return 5; case 701 <= innerWidth && innerWidth <= 900: return 6; case 901 <= innerWidth: return 8; } }thanks
Posts: 1
Participants: 1
@wozom wrote:
When I run the below code on a browser; it works like fine and when I click the buttons they trigger the functions, but when I deploy it on ios emulator then the click does not work at all. This is on ionic 5.
HTML:
<ion-content padding> <ion-button expand="block" (click)="triggerThis()">Add Developer Info</ion-button> <ion-button expand="block" (click)="gotoNextPage()">Goto Next Page</ion-button> <h5>{{changevar}}</h5> </ion-content>TypeScript:
import { DatabaseService, Dev } from './../../services/database.service'; import { Component, OnInit } from '@angular/core'; import { Observable } from 'rxjs'; import {AlertController} from '@ionic/angular'; import {NavController} from '@ionic/angular'; import { Router } from '@angular/router'; @Component({ selector: 'app-test-template', templateUrl: './testTemplate.page.html', styleUrls: ['./testTemplate.page.scss'], }) export class DevelopersPage implements OnInit { // tslint:disable-next-line:ban-types changevar: String = '<<<<<<<>>>>>>>>'; constructor(private db: DatabaseService, private alertController: AlertController, private route: Router) { } gotoNextPage() { this.route.navigate(['/page2']); } triggerThis() { this.changevar = 'This is a message set easily '; this.openAlertBox(); } async openAlertBox() { const openAlertVar = await this.alertController.create({ header: 'Insert your text', message: 'enter your text' , buttons: [{ text: 'Cancel' }, { text: 'OK' } ] // tslint:disable-next-line:no-shadowed-variable }); await openAlertVar.present(); } }
Posts: 1
Participants: 1
@azharalikasuri wrote:
I want to make a profile upload and camera icon like this but spinner in the ! center of person image while.
Annotation 2020-04-04 230805|189x155
Posts: 1
Participants: 1
@Wannen wrote:
I tried using gl-ionic-background-video to use a video as a background , it works perfectly on Browser . but throws Err_File_Not_Found on Android Device and Display White screen .
So Far the application is simple, no plugins or any packages added .
followed this Tuto starting from Part HOW TO USE IT IN YOUR ANGULAR IONIC 4 PROJECT : https://geeklearning.io/how-to-create-a-reusable-web-component-with-stenciljs-and-use-it-in-your-ionic-4-application/what i tried :
- removed (someone suggested it)
- changed to (someone suggested it)
- deleted Node_modules and npm i again
- used src=“assets/video/file.mp4” and src="./assets/video/file.mp4" and other variation
info:
Ionic:
Ionic CLI : 5.4.16 (/usr/local/lib/node_modules/ionic)
Ionic Framework : @ionic/angular 5.0.7
@angular-devkit/build-angular : 0.803.26
@angular-devkit/schematics : 8.3.26
@angular/cli : 8.3.26
@ionic/angular-toolkit : 2.2.0Cordova:
Cordova CLI : 9.0.0 (cordova-lib@9.0.1)
Cordova Platforms : android 8.1.0, browser 6.0.0
Cordova Plugins : cordova-plugin-ionic-keyboard 2.2.0, cordova-plugin-ionic-webview 4.1.3, (and 5 other plugins)Utility:
cordova-res (update available: 0.11.0) : 0.8.1
native-run (update available: 1.0.0) : 0.2.8System:
NodeJS : v12.13.0 (/usr/local/bin/node)
npm : 6.12.0
OS : Linux 5.3help please & Thanks in advanced
Posts: 1
Participants: 1
@MustafaMohamed1996 wrote:
this.diagnostic.getExternalStorageAuthorizationStatus().then(s => console.log('sss', s)) this.diagnostic.getExternalSdCardDetails().then(d => { let filePath = d.filter(c => c.type === 'root')[0].filePath + '/'; this.file.listDir(filePath, '').then(folders=> { console.log(folders) //[] empty array :( }) }) })
Posts: 1
Participants: 1
@simonioannides wrote:
Hello i want to make a function that will open tabs when a user clicks the right arrow as shown on image
Posts: 4
Participants: 2
@armanfantasy wrote:
Hello everyone please help me i made a capacitor plugin for handling firebase dynamic link
i managed ios but now i’m stuck on androidthis is in my MainActivity
this.init(savedInstanceState, new ArrayList<Class<? extends Plugin>>() {{ // Additional plugins you've installed go here // Ex: add(TotallyAwesomePlugin.class); add(FirebaseDynamicLink.class); }});and when i get the dynamic link on android i get the link and then on my plugin i do
JSObject ret = new JSObject(); ret.put("deeplink", url); Log.i("welcome","got it"); notifyListeners(EVENT_FIREBASE_DYNAMIC_LINK, ret,true);but on log i get
Notifying listeners for event onOpenWithDynamicLink
No listeners found for event onOpenWithDynamicLinkand on my app.compnent file i do this
FirebaseDynamicLink.addListener('onOpenWithDynamicLink',(value)=>{ let deeplink = value.deeplink; console.log(deeplink); this.parsDynamicLink(deeplink); })and i do not get anything because on android studio log i got that log which i mentioned
Posts: 1
Participants: 1
@sheikhm wrote:
Hi,
I’m new to ionic, and start really enjoying it but i’m stuck how to make ion-virtual-scroll to move horizontally in ionic-v4. Can i get a sample code for this, any help would be appreciated.
Thanks
Posts: 1
Participants: 1
@Abraham94 wrote:
Hi!
Im learning ionic but I have a problem, I have been trying to solve this, but I dont know how.When I launch:
sudo ionic cordova run androidin my app I recieve that error:
`
Configure project :app
±----------------------------------------------------------------
| cordova-android-support-gradle-release: 27.+
±----------------------------------------------------------------Task :app:preBuild UP-TO-DATE
Task :CordovaLib:preBuild UP-TO-DATE
Task :CordovaLib:preDebugBuild UP-TO-DATE
Task :CordovaLib:checkDebugManifest UP-TO-DATE
Task :CordovaLib:processDebugManifest UP-TO-DATE
Task :app:preDebugBuild UP-TO-DATE
Task :CordovaLib:compileDebugAidl NO-SOURCE
Task :app:compileDebugAidl NO-SOURCE
Task :CordovaLib:packageDebugRenderscript NO-SOURCE
Task :app:compileDebugRenderscript UP-TO-DATE
Task :app:checkDebugManifest UP-TO-DATE
Task :app:generateDebugBuildConfig UP-TO-DATE
Task :app:prepareLintJar UP-TO-DATE
Task :app:generateDebugSources UP-TO-DATE
Task :CordovaLib:compileDebugRenderscript UP-TO-DATE
Task :CordovaLib:generateDebugBuildConfig UP-TO-DATE
Task :CordovaLib:generateDebugResValues UP-TO-DATE
Task :CordovaLib:generateDebugResources UP-TO-DATE
Task :CordovaLib:packageDebugResources UP-TO-DATE
Task :CordovaLib:generateDebugRFile UP-TO-DATE
Task :CordovaLib:prepareLintJar UP-TO-DATE
Task :CordovaLib:generateDebugSources UP-TO-DATE
Task :CordovaLib:javaPreCompileDebug UP-TO-DATE
Task :CordovaLib:compileDebugJavaWithJavac UP-TO-DATE
Task :CordovaLib:processDebugJavaRes NO-SOURCE
Task :CordovaLib:transformClassesAndResourcesWithPrepareIntermediateJarsForDebug UP-TO-DATE
Task :app:javaPreCompileDebug UP-TO-DATE
Task :app:mainApkListPersistenceDebug UP-TO-DATE
Task :app:generateDebugResValues UP-TO-DATE
Task :app:generateDebugResources UP-TO-DATE
Task :app:mergeDebugResources UP-TO-DATE
Task :app:createDebugCompatibleScreenManifests UP-TO-DATE
Task :app:processDebugManifest UP-TO-DATE
Task :app:processDebugResources UP-TO-DATETask :app:compileDebugJavaWithJavac FAILED
/home/abraham/Escritorio/vengavamoh/SafeJewellery/platforms/android/app/src/main/java/com/zencity/cordova/bgloc/LocationUpdateService.java:6: error: package org.apache.http does not exist
import org.apache.http.HttpResponse;
^
/home/abraham/Escritorio/vengavamoh/SafeJewellery/platforms/android/app/src/main/java/com/zencity/cordova/bgloc/LocationUpdateService.java:7: error: package org.apache.http.client.methods does not exist
import org.apache.http.client.methods.HttpPost;
^
/home/abraham/Escritorio/vengavamoh/SafeJewellery/platforms/android/app/src/main/java/com/zencity/cordova/bgloc/LocationUpdateService.java:8: error: package org.apache.http.entity does not exist
import org.apache.http.entity.StringEntity;
^
/home/abraham/Escritorio/vengavamoh/SafeJewellery/platforms/android/app/src/main/java/com/zencity/cordova/bgloc/LocationUpdateService.java:9: error: package org.apache.http.impl.client does not exist
import org.apache.http.impl.client.DefaultHttpClient;
^
/home/abraham/Escritorio/vengavamoh/SafeJewellery/platforms/android/app/src/main/java/com/zencity/cordova/bgloc/LocationUpdateService.java:662: error: cannot find symbol
DefaultHttpClient httpClient = new DefaultHttpClient();
^
symbol: class DefaultHttpClient
location: class LocationUpdateService
/home/abraham/Escritorio/vengavamoh/SafeJewellery/platforms/android/app/src/main/java/com/zencity/cordova/bgloc/LocationUpdateService.java:662: error: cannot find symbol
DefaultHttpClient httpClient = new DefaultHttpClient();
^
symbol: class DefaultHttpClient
location: class LocationUpdateService
/home/abraham/Escritorio/vengavamoh/SafeJewellery/platforms/android/app/src/main/java/com/zencity/cordova/bgloc/LocationUpdateService.java:663: error: cannot find symbol
HttpPost request = new HttpPost(url);
^
symbol: class HttpPost
location: class LocationUpdateService
/home/abraham/Escritorio/vengavamoh/SafeJewellery/platforms/android/app/src/main/java/com/zencity/cordova/bgloc/LocationUpdateService.java:663: error: cannot find symbol
HttpPost request = new HttpPost(url);
^
symbol: class HttpPost
location: class LocationUpdateService
/home/abraham/Escritorio/vengavamoh/SafeJewellery/platforms/android/app/src/main/java/com/zencity/cordova/bgloc/LocationUpdateService.java:677: error: cannot find symbol
StringEntity se = new StringEntity(params.toString());
^
symbol: class StringEntity
location: class LocationUpdateService
/home/abraham/Escritorio/vengavamoh/SafeJewellery/platforms/android/app/src/main/java/com/zencity/cordova/bgloc/LocationUpdateService.java:677: error: cannot find symbol
StringEntity se = new StringEntity(params.toString());
^
symbol: class StringEntity
location: class LocationUpdateService
/home/abraham/Escritorio/vengavamoh/SafeJewellery/platforms/android/app/src/main/java/com/zencity/cordova/bgloc/LocationUpdateService.java:691: error: cannot find symbol
HttpResponse response = httpClient.execute(request);
^
symbol: class HttpResponse
location: class LocationUpdateService
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: /home/abraham/Escritorio/vengavamoh/SafeJewellery/platforms/android/app/src/main/java/org/apache/cordova/file/AssetFilesystem.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
11 errorsFAILURE: Build failed with an exception.
- What went wrong:
Execution failed for task ‘:app:compileDebugJavaWithJavac’.Compilation failed; see the compiler error output for details.
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.Get more help at https://help.gradle.org
BUILD FAILED in 4s
24 actionable tasks: 1 executed, 23 up-to-date
/home/abraham/Escritorio/vengavamoh/SafeJewellery/platforms/android/gradlew: Command failed with exit code 1 Error output:
/home/abraham/Escritorio/vengavamoh/SafeJewellery/platforms/android/app/src/main/java/com/zencity/cordova/bgloc/LocationUpdateService.java:6: error: package org.apache.http does not exist
import org.apache.http.HttpResponse;
^
/home/abraham/Escritorio/vengavamoh/SafeJewellery/platforms/android/app/src/main/java/com/zencity/cordova/bgloc/LocationUpdateService.java:7: error: package org.apache.http.client.methods does not exist
import org.apache.http.client.methods.HttpPost;
^
/home/abraham/Escritorio/vengavamoh/SafeJewellery/platforms/android/app/src/main/java/com/zencity/cordova/bgloc/LocationUpdateService.java:8: error: package org.apache.http.entity does not exist
import org.apache.http.entity.StringEntity;
^
/home/abraham/Escritorio/vengavamoh/SafeJewellery/platforms/android/app/src/main/java/com/zencity/cordova/bgloc/LocationUpdateService.java:9: error: package org.apache.http.impl.client does not exist
import org.apache.http.impl.client.DefaultHttpClient;
^
/home/abraham/Escritorio/vengavamoh/SafeJewellery/platforms/android/app/src/main/java/com/zencity/cordova/bgloc/LocationUpdateService.java:662: error: cannot find symbol
DefaultHttpClient httpClient = new DefaultHttpClient();
^
symbol: class DefaultHttpClient
location: class LocationUpdateService
/home/abraham/Escritorio/vengavamoh/SafeJewellery/platforms/android/app/src/main/java/com/zencity/cordova/bgloc/LocationUpdateService.java:662: error: cannot find symbol
DefaultHttpClient httpClient = new DefaultHttpClient();
^
symbol: class DefaultHttpClient
location: class LocationUpdateService
/home/abraham/Escritorio/vengavamoh/SafeJewellery/platforms/android/app/src/main/java/com/zencity/cordova/bgloc/LocationUpdateService.java:663: error: cannot find symbol
HttpPost request = new HttpPost(url);
^
symbol: class HttpPost
location: class LocationUpdateService
/home/abraham/Escritorio/vengavamoh/SafeJewellery/platforms/android/app/src/main/java/com/zencity/cordova/bgloc/LocationUpdateService.java:663: error: cannot find symbol
HttpPost request = new HttpPost(url);
^
symbol: class HttpPost
location: class LocationUpdateService
/home/abraham/Escritorio/vengavamoh/SafeJewellery/platforms/android/app/src/main/java/com/zencity/cordova/bgloc/LocationUpdateService.java:677: error: cannot find symbol
StringEntity se = new StringEntity(params.toString());
^
symbol: class StringEntity
location: class LocationUpdateService
/home/abraham/Escritorio/vengavamoh/SafeJewellery/platforms/android/app/src/main/java/com/zencity/cordova/bgloc/LocationUpdateService.java:677: error: cannot find symbol
StringEntity se = new StringEntity(params.toString());
^
symbol: class StringEntity
location: class LocationUpdateService
/home/abraham/Escritorio/vengavamoh/SafeJewellery/platforms/android/app/src/main/java/com/zencity/cordova/bgloc/LocationUpdateService.java:691: error: cannot find symbol
HttpResponse response = httpClient.execute(request);
^
symbol: class HttpResponse
location: class LocationUpdateService
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: /home/abraham/Escritorio/vengavamoh/SafeJewellery/platforms/android/app/src/main/java/org/apache/cordova/file/AssetFilesystem.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
11 errorsFAILURE: Build failed with an exception.
- What went wrong:
Execution failed for task ‘:app:compileDebugJavaWithJavac’.Compilation failed; see the compiler error output for details.
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.Get more help at https://help.gradle.org
BUILD FAILED in 4s
[ERROR] An error occurred while running subprocess cordova.cordova build android --device exited with exit code 1. Re-running this command with the --verbose flag may provide more information.`How can I solve it? I was searching on internet but any solution works for me
Thanks!
Posts: 1
Participants: 1