Quantcast
Channel: Ionic Framework - Ionic Forum
Viewing all 48986 articles
Browse latest View live

Error after using CMD: ionic cordova build android --prod --release

$
0
0

@akkaoui wrote:

Hello,

I try to generate apk for android but the message error below after using CMD:
ionic cordova build android --prod --release
thanks for your help

D:\plak>ionic cordova build android --prod --release

ionic-app-scripts build --prod --target cordova --platform android
[12:23:20] ionic-app-scripts 3.2.1
[12:23:20] build prod started …
[12:23:20] clean started …
[12:23:21] clean finished in 92 ms
[12:23:21] copy started …
[12:23:21] deeplinks started …
[12:23:21] deeplinks finished in 145 ms
[12:23:21] ngc started …
[12:23:45] ngc finished in 23.62 s
[12:23:45] preprocess started …
[12:23:45] preprocess finished in 3 ms
[12:23:45] webpack started …
[12:23:45] copy finished in 24.74 s
[12:24:31] webpack finished in 46.51 s
[12:24:31] uglify started …
[12:24:31] sass started …
[12:24:36] sass finished in 5.34 s
[12:24:36] cleancss started …
[12:24:43] cleancss finished in 6.62 s
[12:25:11] uglify finished in 39.95 s
[12:25:11] postprocess started …
[12:25:11] postprocess finished in 34 ms
[12:25:11] lint started …
[12:25:11] build prod finished in 111.02 s
[12:25:21] lint finished in 9.53 s
cordova build android --release

You have been opted out of telemetry. To change this, run: cordova telemetry on.
Android Studio project detected
ANDROID_HOME=C:\Users\AKKAOUI\AppData\Local\Android\sdk
JAVA_HOME=C:\Program Files\Java\jdk1.8.0_191
studio
Subproject Path: CordovaLib
Subproject Path: app
Downloading https://services.gradle.org/distributions/gradle-4.1-all.zip

Starting a Gradle Daemon (subsequent builds will be faster)

FAILURE: Build failed with an exception.

  • What went wrong:
    Unable to start the daemon process.
    This problem might be caused by incorrect configuration of the daemon.
    For example, an unrecognized jvm option is used.
    Please refer to the user guide chapter on the daemon at https://docs.gradle.org/4.1/userguide/gradle_daemon.html
    Please read the following process output to find out more:

Error occurred during initialization of VM
Could not reserve enough space for 2097152KB object heap

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

  • Get more help at https://help.gradle.org
    cmd: Command failed with exit code 1 Error output:
    FAILURE: Build failed with an exception.

  • What went wrong:
    Unable to start the daemon process.
    This problem might be caused by incorrect configuration of the daemon.
    For example, an unrecognized jvm option is used.
    Please refer to the user guide chapter on the daemon at https://docs.gradle.org/4.1/userguide/gradle_daemon.html
    Please read the following process output to find out more:


Error occurred during initialization of VM
Could not reserve enough space for 2097152KB object heap

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

  • Get more help at https://help.gradle.org
    [ERROR] An error occurred while running subprocess cordova.

      cordova build android --release exited with exit code 1.
    
      Re-running this command with the --verbose flag may provide more information.

Posts: 1

Participants: 1

Read full topic


Local Notification Ionic 4

$
0
0

@zedlly94 wrote:

Hello, how to use the local Notification with ionic 4, I tested but there is an error that says do not recognize Cordova as a function!

Posts: 1

Participants: 1

Read full topic

Ionic 4: Unable to change position of picker

$
0
0

@sanesma93 wrote:

Hey everybody.
I am using ion-datetime to select a date, however when the datepicker pops up it’s too low on the screen and I’ve been trying to move it to the center though nothing seems to work.

changing the picker position using top and also translateY but none of them work.
Here’s the relevant HTML line

<ion-label>{{ 'Execution date' | translate }}</ion-label>
          <ion-datetime [disabled]="!getExecLater()" displayFormat="MM/DD/YYYY" [(ngModel)]="transaction.bookingDate" name="bookingDate">

          </ion-datetime>

and here’s the relevant CSS code

page-new-transaction {
 .picker-wrapper {
      top:0px;
      transform: translateY(-50%);
    }
}

Thank you for your help

EDIT: I am not sure if the changes that my css file makes to .picker-wrapper are limited only to this page or to all instances of picker-wrapper along my app, maybe it is a bad idea

Posts: 1

Participants: 1

Read full topic

Material back button

$
0
0

@Ludolefrenchy wrote:

Hello,
how to choose the page or will the back button material?
to be more clear, if I navigate & at times between 2 pages so when I make it back changes every time on its pages but I would not.
i’m use ionic V4
thank you in advance.
ludo

Posts: 1

Participants: 1

Read full topic

2 Columns with ion-virtual-scroll not working

$
0
0

@Diesel555 wrote:

Hello. I just changed my code to have an ng-repeat in my column to this:

<ion-grid>
    <ion-row>
      <ion-virtual-scroll [items]="places" approxItemHeight="200px">
        <ion-col size="12" size-lg="6" *virtualItem="let place">
          <ion-card (click)='viewDetails(place.id)' no-padding no-margin>

When I have ng-repeat in ion-col and no virtual scroll, it works great. There are two columns. When I do it this way it creates one column with 50% width. Do you know what could be causing it to break to a new line even though it is properly doing the column size 6 and 50% max width (Verified by CSS)? Also if I place the ion-card-header before ion-row or ion-grid it creates a lot of errors. Beta 19 here.

Posts: 1

Participants: 1

Read full topic

Main.js, vendor.js gone after Karma, Jasmine installation and webpack update

$
0
0

@elduderino15 wrote:

I added the unit testing framework based on Karma and Jasmine to my ionic 3 project as described here and the refered link. Along the way I had to update webpack to v4 or more because the current Karma or Jasmine version depend on it.

Unit tests now work well but now my whole project fails to run because www/build does not contain main.js, vendor.js and main.css files. The app builds but fails with a blank screen, debugger 404s about the mentioned files.

How can I recreate the files? I can fall back to a previous version before karma and jasmine install and get things back up running, but I would like unit testing run parallel with a working app develop environment…

ionic info

Ionic:

   ionic (Ionic CLI)  : 4.5.0 (/Users/me/node_modules/ionic)
   Ionic Framework    : ionic-angular 3.9.2
   @ionic/app-scripts : 3.2.0

Cordova:

   cordova (Cordova CLI) : 8.1.2 (cordova-lib@8.1.1)
   Cordova Platforms     : android 7.1.4, ios 4.5.5
   Cordova Plugins       : cordova-plugin-ionic-keyboard 2.0.5, cordova-plugin-ionic-webview 1.1.1, (and 9 other plugins)

System:

   NodeJS : v11.4.0 (/Users/me/.nvm/versions/node/v11.4.0/bin/node)
   npm    : 6.4.1
   OS     : macOS Mojave
   Xcode  : Xcode 10.1 Build version 10B61

package.json: ...

"scripts": {
    "start": "ionic-app-scripts serve",
    "clean": "ionic-app-scripts clean",
    "build": "ionic-app-scripts build",
    "lint": "ionic-app-scripts lint",
    "test": "karma start ./test-config/karma.conf.js",
    "test-ci": "karma start ./test-config/karma.conf.js --single-run",
    "test-coverage": "karma start ./test-config/karma.conf.js --coverage",
    "e2e": "npm run e2e-update && npm run e2e-test",
    "e2e-test": "protractor ./test-config/protractor.conf.js",
    "e2e-update": "webdriver-manager update --standalone false --gecko false"
  },
  "dependencies": {
    "@angular/animations": "5.2.11",
    "@angular/common": "5.2.11",
    "@angular/compiler": "5.2.11",
    "@angular/compiler-cli": "5.2.11",
    "@angular/core": "5.2.11",
    "@angular/forms": "5.2.11",
    "@angular/http": "5.2.11",
    "@angular/platform-browser": "5.2.11",
    "@angular/platform-browser-dynamic": "5.2.11",
    "@ionic-native/core": "^4.11.0",
    "@ionic-native/geolocation": "^4.10.0",
    "@ionic-native/google-analytics": "^4.17.0",
    "@ionic-native/google-maps": "^4.9.1",
    "@ionic-native/social-sharing": "^4.12.0",
    "@ionic-native/splash-screen": "~4.10.0",
    "@ionic-native/status-bar": "^4.10.1",
    "@ionic/storage": "^2.1.3",
    "chart.js": "^2.7.2",
    "cordova-android": "7.1.4",
    "cordova-ios": "4.5.5",
    "cordova-plugin-device": "^2.0.2",
    "cordova-plugin-geolocation": "^4.0.1",
    "cordova-plugin-google-analytics": "^1.8.3",
    "cordova-plugin-googlemaps": "^2.3.8",
    "cordova-plugin-googlemaps-sdk": "git+https://github.com/mapsplugin/cordova-plugin-googlemaps-sdk.git#2.7.0",
    "cordova-plugin-ionic-keyboard": "^2.0.5",
    "cordova-plugin-ionic-webview": "^1.1.19",
    "cordova-plugin-splashscreen": "^5.0.2",
    "cordova-plugin-statusbar": "^2.4.2",
    "cordova-plugin-whitelist": "^1.3.3",
    "cordova-plugin-x-socialsharing": "~5.4.0",
    "cordova-sqlite-storage": "^2.3.3",
    "es6-promise-plugin": "^4.2.2",
    "gulp": "^3.9.1",
    "ion2-calendar": "^2.2.0",
    "ionic-angular": "3.9.2",
    "ionicons": "3.0.0",
    "minimist": "^1.2.0",
    "moment": "^2.22.2",
    "ng2-charts": "^1.6.0",
    "rxjs": "5.5.11",
    "sw-toolbox": "3.6.0",
    "webpack": "^4.1.0",
    "xml2js": "^0.4.19",
    "zone.js": "0.8.26"
  },
  "devDependencies": {
    "@ionic/app-scripts": "3.2.0",
    "@types/jasmine": "^3.3.1",
    "@types/node": "^10.12.12",
    "angular2-template-loader": "^0.6.2",
    "html-loader": "^0.5.5",
    "istanbul-instrumenter-loader": "^3.0.1",
    "jasmine": "^3.3.1",
    "jasmine-spec-reporter": "^4.2.1",
    "karma": "^3.1.3",
    "karma-chrome-launcher": "^2.2.0",
    "karma-coverage-istanbul-reporter": "^2.0.4",
    "karma-jasmine": "^2.0.1",
    "karma-jasmine-html-reporter": "^1.4.0",
    "karma-sourcemap-loader": "^0.3.7",
    "karma-webpack": "^3.0.5",
    "null-loader": "^0.1.1",
    "protractor": "^5.4.1",
    "ts-loader": "^5.3.1",
    "ts-node": "^7.0.1",
    "typescript": "^2.8.1"
  },

Posts: 1

Participants: 1

Read full topic

How to compare password using bcryptjs

Ionic 3 network connection check Cant Working on My Localhost

$
0
0

@narendrasai wrote:

I have installed Network library too but If i disable or enable my local network connection not show any response on my console window.
Below is the app.componant file below i have write the code whats wrong with my coding please let me know, Help me to resolved these issue…
Thank you in advance!

import { Component } from ‘@angular/core’;
import { Platform, Events } from ‘ionic-angular’;
import { StatusBar } from ‘@ionic-native/status-bar’;
import { SplashScreen } from ‘@ionic-native/splash-screen’;

import { HomePage } from ‘…/pages/home/home’;
import { Network } from ‘@ionic-native/network’;
import { NetworkProvider } from ‘…/providers/network/network’;
@Component({
templateUrl: ‘app.html’
})
export class MyApp {
rootPage:any = HomePage;

constructor(platform: Platform, statusBar: StatusBar, splashScreen: SplashScreen, public events: Events,
public network: Network,
public networkProvider: NetworkProvider) {
platform.ready().then(() => {

  // Okay, so the platform is ready and our plugins are available.
  // Here you can do any higher level native things you might need.
  statusBar.styleDefault();
  splashScreen.hide();

  this.network.onConnect().subscribe(()=>{
    console.log('network connected!');
    alert('ok');
  });

  this.network.onDisconnect().subscribe(() => {
    console.log('network was disconnected :-(');
    alert('failed');
  });
});

}
}

Posts: 1

Participants: 1

Read full topic


How to give '-'after every three digit in ionic input?

Back button and auth guard

$
0
0

@yns23 wrote:

i implement an authentification page for my app and i use auth guard to prevent access to main page but when the app start , the login page show up then i click back button and main page load

so how can i prevent from back button to bypass auth guard

Posts: 1

Participants: 1

Read full topic

I want to capture image and identify objects from image like window, walls, doors and roof and fill different color for windows doors, and wall

$
0
0

@ishaquemujtaba wrote:

I am working on mobile application using ionic 3, application used for fill colors at walls, doors, roofs or in complete house and I want to identify objects like window, door from image and fill different color inside it and pic another color for walls

please help or suggest any JavaScript framework used with ionic or any tool and suggest me this like app as a reference.

Posts: 1

Participants: 1

Read full topic

Ionic 4 beta - is not working with livereload

$
0
0

@khimgrg wrote:

I am trying ionic 4 beta, and i was using calendar plugin. Everything works fine, even in emulator. Since, i cannot run native plugins in brower I have to use emulator to debug but Ionic 4 app is not working while running it in emulator in debug mode. I tired livereload, l, cl none of them working. I dont see any error, just the app keep loading. But, if i run it without debug mode it works fine.

Posts: 1

Participants: 1

Read full topic

Ion-list fill remaining height

$
0
0

@tontonks wrote:

in my ionic application, i would like that my ion-list takes all the remaining place in height according to others elements of my page.

I have a header-bar, an ion-footer and also a div with some text. Here is what it’s look like :

Thanks !

Posts: 1

Participants: 1

Read full topic

Multiple slides causing crash of app on iOS

$
0
0

@mcihak wrote:

Hi,
in my app I am getting about 4000 items from API in JSON. Each item is in <ion-slide>. Loaded 10 by 10 items when current index is items.length - 5. When I swipe multiple times, the app crash and I get error in xCode console:

Unable to acquire assertion for process with PID 0

Is there anyone who can tell me what this means?

Thanks a lot

Posts: 1

Participants: 1

Read full topic

IOS compilation errors APP

$
0
0

@samircortes wrote:

It does not allow me to upload my application to the AppStore Due to lack of functionality and in the design for general the app in Ios I had to add <preference name = “CordovaWebViewEngine” value = “CDVUIWebViewEngine” /> in the config.xml was what I found to the solution that all requests failed I am clear if it is because of this or if it is because of the very large and visual icons. What should I have at least to authorize it with good functionality? How do I solve the design?

Posts: 1

Participants: 1

Read full topic


Ionic 4 - Tabs data refresh issue

$
0
0

@Vauhtisilakka wrote:

Hello,

I have been practising Ionic 4 for a few days and I have a problem that I can’t solve on my own. Basically I have a tabs app (created with ionic start tabs). I also have a service and in my app and a function in it that returns a string. In my tab controller I declare a new variable and call the service function to assign its return value to the variable. However, this string does not automatically update in the view if it changes. I have tried reassigning the value to it inside ionViewWillEnter but this only gets called when the tab is loaded for the first time. Any ideas how I should address this?

export class Tab3Page {
  constructor (public storage: Storage, public router: Router, public platform: Platform, public ds: DataService) {}
  public loggedUser: any = this.ds.getLoggedUser();
  ionViewWillEnter() {
    this.refresh();
  }

  refresh() {
    let loggedUser = this.ds.getLoggedUser();
    console.log("Logged user: ", loggedUser);
    this.loggedUser = loggedUser;
  }

  logout () {
    //logout stuff
  }
}

In my view I use to display logged user’s username like:

{{ loggedUser.username }}

Thanks.

Posts: 1

Participants: 1

Read full topic

How can Remove the specified permissions for SMS, from app's manifest for an Ionic 3 Android APP

$
0
0

@IonicZb wrote:

I’ve developed for a client an Ionic 3 app that sends informative text messages - SMS to clients.
For this app I received the following Google Play warning:

" Hello Google Play Developer,
In October, we announced updates to our Permissions policy that will limit which apps are allowed to request Call Log and SMS permissions. This is the second notification to let you know that this policy may impact one or more of your apps.

Only an app that has been selected as a user’s default app for making calls or text messages, or whose core functionality is approved for one of the exception use cases, will be able to access Call Log or SMS permissions.

Below, we’ve listed a sample of apps from your catalog which may not meet the requirements for permission requests.

Action required

Please read through the Permissions policy and the Play Console Help Center article, which describes intended uses, exceptions, invalid uses, and alternative options for use of Call Log or SMS permissions, to determine which of the following options apply to your affected app(s):

* Option 1) Your app does not require access to Call Log or SMS permissions: Remove the specified permissions from your app’s manifest, or migrate to an alternative implementation by January 9, 2019 . If you require additional time to remove permissions or migrate to an alternative option, submit a Permissions Declaration Form to request an extension until March 9, 2019.

* Option 2) Your app is a default handler, or you believe your app qualifies for an exception: If you haven’t already done so, submit a request using the Permissions Declaration Form by January 9, 2019 . We are currently reviewing submissions and will respond to your request. *Note: You do not need to make changes to your app in order to be eligible to submit a request.*"

It seems that the solution would be " Option 1) Your app does not require access to Call Log or SMS permissions: Remove the specified permissions from your app’s manifest."
But I don’t understand what to do. Where should I change and what? Should I modify my config.xml or the way I use this.sms.send() ? Or something else?

In my app I use SMS Plugin (https://ionicframework.com/docs/native/sms/)

To send the text messages I use a vector and call for each element the sms.send();

  for(var i=0;i<this.v_sms_complet.length;i++){
                if (this.v_sms_complet[i].CHECK_OK==true){
                         v_only_idsms_checked.push(this.v_sms_complet[i].id_sms);
                        
                          //send sms
                          this.sms.send(this.v_sms_complet[i].phone, this.v_sms_complet[i].text_sms);
                          this.sleep(0.5);//0.5 second pause after each sms
                }
        }

Thanks in advance!

Posts: 1

Participants: 1

Read full topic

Make ion-button float right?

$
0
0

@JensOlleOlsson wrote:

Hi,

How would I go about to make a ion-button float right of screen in the following codesnippet?

<ion-row>
  <ion-button id="btnSpara" size="small" color="secondary">Lorem</ion-button>
</ion-row>

All the best!

Posts: 1

Participants: 1

Read full topic

Updating Firebase objects

$
0
0

@MarioRud wrote:

Hi all! I’m quite new to Ionic and I’m working on a simple to-do list app for an assignment. I’m sort of stuck when it comes to updating a task. I’ve gotten as far as to when the user clicks “edit” on a task it present the Edit page along with the parameters passed by NavParams. But when the Update Task button is clicked I get the error: Cannot read property ‘set’ of undefined.

I’m not too sure what is causing this as I have no variable called ‘set’.

Clicking the edit button on a task does the following:

(click)="editTask(task.key, task.taskname, task.taskpriority)"

and the function is as follows:

editTask(id, taskname, taskpriority){
    //console.log(id, taskname, taskpriority);
    this.navCtrl.push(EdittaskPage, {
      key: id,
      taskname: taskname,
      taskpriority: taskpriority
    });  
  }

My EdittaskPage.ts has the following:

export class EdittaskPage {
	myTaskList$: Observable<Task[]>;
	task: Task = {
		id:'',
		taskname:'',
		taskpriority:'',
		listid:1
	}

  constructor(public navCtrl: NavController, public navParams: NavParams, public taskListService: TaskListService, public db: AngularFireDatabase) {

  	this.task.id = this.navParams.get('key'),
  	this.task.taskname = this.navParams.get('taskname'),
  	this.task.taskpriority = this.navParams.get('taskpriority')
  }


  closeModal(){
  this.navCtrl.pop();
  }
 	
  updateTask(task: Task){
  	this.taskListService.updateTask(task);
  }

}

On my EdittaskPage.html I have the following when the “save task” button is clicked:

(click) = "updateTask(task)"

which calls the function from the typescript file above
The function from the EdittaskPage.ts then calls a function from a service as follows:

private taskListRef = this.db.list<Task>
	 ('todoAppdb',ref=>ref.orderByChild("listid").equalTo(1));

	 constructor(private db: AngularFireDatabase){
	 }

     updateTask(task: Task){
	 	return this.taskListRef.update(task.key, task);
	 }

Any help would be much appreciated, thank you!

Posts: 1

Participants: 1

Read full topic

Ionic + Iphone X tab bar

$
0
0

@EnzoDLP wrote:

Hello,

I’m having a problem with the bar at the bottom of iphone X.

Indeed, it is positioned on the TABS and this embarrasses its use …

How to do ?

Posts: 1

Participants: 1

Read full topic

Viewing all 48986 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>