Quantcast
Viewing all 49108 articles
Browse latest View live

Ionic cordova build succeeds but ionic cordova run fails for android

@Moh497 wrote:

Hi Team

I am trying to generate a debug apk which I can install on my device but with build release android I am getting unsigned apk. So I searched and ran

ionic cordova run android

The build fails with this exception

Execution failed for task ':CordovaLib:processDebugResources'.
> com.android.ide.common.process.ProcessException: Failed to execute aapt

I am using windows 10 64 bit and here is the package.son info

java version “1.8.0_131”

“dependencies”: {
"@angular/common": “4.1.3”,
"@angular/compiler": “4.1.3”,
"@angular/compiler-cli": “4.1.3”,
"@angular/core": “4.1.3”,
"@angular/forms": “4.1.3”,
"@angular/http": “4.1.3”,
"@angular/platform-browser": “4.1.3”,
"@angular/platform-browser-dynamic": “4.1.3”,
"@ionic-native/core": “3.12.1”,
"@ionic-native/splash-screen": “3.12.1”,
"@ionic-native/status-bar": “3.12.1”,
"@ionic/storage": “2.0.1”,
“chart.js”: “^2.7.1”,
“cordova-plugin-console”: “^1.0.5”,
“cordova-plugin-device”: “^1.1.4”,
“cordova-plugin-splashscreen”: “^4.0.3”,
“cordova-plugin-statusbar”: “^2.2.2”,
“cordova-plugin-whitelist”: “^1.3.1”,
“ionic-angular”: “3.6.0”,
“ionic-plugin-keyboard”: “^2.2.1”,
“ionicons”: “3.0.0”,
“rxjs”: “5.4.0”,
“sw-toolbox”: “3.6.0”,
“zone.js”: “0.8.12”,
“cordova-android”: “~6.3.0”
},
“devDependencies”: {
"@ionic/app-scripts": “2.1.3”,
“ionic”: “3.18.0”,
“typescript”: “2.3.4”
},
“description”: “An Ionic project”,
“cordova”: {
“plugins”: {
“ionic-plugin-keyboard”: {},
“cordova-plugin-whitelist”: {},
“cordova-plugin-console”: {},
“cordova-plugin-statusbar”: {},
“cordova-plugin-device”: {},
“cordova-plugin-splashscreen”: {}
},
“platforms”: [
“android”
]
}
}

target api 23 and min 14
can some direct me to what is going wrong here , since its working with build but failing for run android

Posts: 1

Participants: 1

Read full topic


How correct unaligned highlight in input

@david_bc wrote:

Hi evyone .

Following the documentation, i did a simple Login form .

But the highlight is not aligned with the previous (see screenshot).

How can I override this ? Don’t find nothing in ionic saas variable .

The problem is present in the documentation.

Here is my form :

  <form (ngSubmit)="login()" #registerForm="ngForm">
     <ion-row>
     <ion-col>
      <ion-list>
      <ion-item>
        <ion-label floating><ion-icon name="contact" floating item-left></ion-icon>
        Login</ion-label>
        <ion-input type="text"  name="login" [(ngModel)]="credentials.login" required></ion-input>
      </ion-item>

      <ion-item>
        <ion-label floating><ion-icon name="lock" floating item-left></ion-icon>
        Password</ion-label>
        <ion-input type="password"  name="password" [(ngModel)]="credentials.password" required></ion-input>
      </ion-item>
    </ion-list>
  </ion-col>
</ion-row>
<ion-row>
  <ion-col>
    <button ion-button  color="primary" full type="submit" [disabled]="!registerForm.form.valid">Login</button>
  </ion-col>
</ion-row>

thanks for any help Image may be NSFW.
Clik here to view.
:slight_smile:

Image may be NSFW.
Clik here to view.
bad_highlight

Posts: 1

Participants: 1

Read full topic

Google Maps not working in DevApp

@hardcodet wrote:

Hi all

Is it possible to get native Google Maps to work in DevApp? I just end up with a blank screen and a map that never gets ready. If I build and deploy to my device (Android) directly, the map shows up, so the code should be fine.

The API key I registered with the Google API console is not restricted at this point, so this shouldn’t be an issue. Is it just that DevApp basically is just rendering the browser version, or is there another reason (and possible fix)?

General notice: This probably should go into the docs. I lost hours trying to get my map to work which just didn’t show up.

Thanks for your advice!

Posts: 1

Participants: 1

Read full topic

Ionic tabs not showing

@pablosanchez wrote:

I’m developing an ionic app which has a side menu, and the two first entries have each one an ion-tabs component. The ion-tabs pages are loaded correctly, but the problem is that the root tab of each ion-tabs is not showing properly. When I navigate from page 1 to 2 or from page 2 to 1 (only the pages with tabs), the last selected tab is showing and only when I press the desired tab, the screen is reloaded with the contents of that tab.

Posts: 1

Participants: 1

Read full topic

How to specify which Ionic and Angular version to use

@boussarhane wrote:

I want to create a new Ionic project using Ionic 3 and Angular 4. As you know Angular 5 is out and when I create a new project it’s created with the last version of Angular. This is a part of my package.json :

"dependencies": {
    "@angular/common": "5.0.0",
    "@angular/compiler": "5.0.0",
    "@angular/compiler-cli": "5.0.0",
    "@angular/core": "5.0.0",
    "@angular/forms": "5.0.0",
    "@angular/http": "5.0.0",
    "@angular/platform-browser": "5.0.0",
    "@angular/platform-browser-dynamic": "5.0.0",
    "@ionic-native/core": "4.3.2",
    "@ionic-native/splash-screen": "4.3.2",
    "@ionic-native/status-bar": "4.3.2",
    "@ionic/storage": "2.1.3",
    "angularfire2": "^5.0.0-rc.4",
    "firebase": "^4.6.2",
    "ionic-angular": "3.9.2",
    "ionicons": "3.0.0",
    "rxjs": "5.5.2",
    "sw-toolbox": "3.6.0",
    "zone.js": "0.8.18"
  }

Posts: 1

Participants: 1

Read full topic

Ionic 3 - TypeError: console.log is not a function

@amish_thaker wrote:

I get this weird error that console.log is not a function. I have not clue what’s causing this. It work’s fine in the entire app but throws this error only on a specific screen where I open a modal to edit form data.

core.es5.js:1020 ERROR TypeError: console.log is not a function
at SearchSuburbPage.webpackJsonp.417.SearchSuburbPage.ionViewDidEnter (search-suburb.ts:24)
at ModalImpl.ViewController._lifecycle (view-controller.js:566)
at ModalImpl.ViewController._didEnter (view-controller.js:466)
at OverlayPortal.NavControllerBase._didEnter (nav-controller-base.js:982)
at OverlayPortal.NavControllerBase._transitionFinish (nav-controller-base.js:776)
at nav-controller-base.js:757
at t.invoke (polyfills.js:3)
at Object.onInvoke (core.es5.js:3890)
at t.invoke (polyfills.js:3)
at r.run (polyfills.js:3)

Package.json is as follows:

{
“scripts”: {
“clean”: “ionic-app-scripts clean”,
“build”: “ionic-app-scripts build”,
“lint”: “ionic-app-scripts lint”,
“ionic:build”: “ionic-app-scripts build”,
“ionic:serve”: “ionic-app-scripts serve”
},
“config”: {
“ionic_copy”: “./config/copy.config.js”
},
“dependencies”: {
"@angular/common": “4.4.3”,
"@angular/compiler": “4.4.3”,
"@angular/compiler-cli": “4.4.3”,
"@angular/core": “4.4.3”,
"@angular/forms": “4.4.3”,
"@angular/http": “4.4.3”,
"@angular/platform-browser": “4.4.3”,
"@angular/platform-browser-dynamic": “4.4.3”,
"@ionic-native/core": “4.3.0”,
"@ionic-native/network": “^4.3.2”,
"@ionic-native/splash-screen": “4.3.0”,
"@ionic-native/status-bar": “4.3.0”,
"@ionic/storage": “^2.0.1”,
“cordova-android”: “^6.2.3”,
“cordova-plugin-device”: “^1.1.4”,
“cordova-plugin-ionic-webview”: “^1.1.11”,
“cordova-plugin-network-information”: “^1.3.3”,
“cordova-plugin-splashscreen”: “^4.0.3”,
“cordova-plugin-statusbar”: “git+https://github.com/apache/cordova-plugin-statusbar.git”,
“cordova-plugin-whitelist”: “^1.3.1”,
“font-awesome”: “^4.7.0”,
“ionic-angular”: “3.7.1”,
“ionic-plugin-keyboard”: “^2.2.1”,
“ionicons”: “3.0.0”,
“moment”: “^2.19.1”,
“moment-timezone”: “^0.5.13”,
“rxjs”: “5.4.3”,
“sw-toolbox”: “3.6.0”,
“zone.js”: “0.8.18”
},
“devDependencies”: {
"@ionic/app-scripts": “3.0.1”,
"@types/moment-timezone": “^0.5.1”,
“typescript”: “2.3.4”
},
“description”: “An Ionic project”,
“cordova”: {
“plugins”: {
“cordova-plugin-device”: {},
“cordova-plugin-ionic-webview”: {},
“cordova-plugin-splashscreen”: {},
“cordova-plugin-statusbar”: {},
“cordova-plugin-whitelist”: {},
“ionic-plugin-keyboard”: {},
“cordova-plugin-network-information”: {}
},
“platforms”: [
“android”
]
}
}

Posts: 2

Participants: 2

Read full topic

Impossible de bind toggleSwitch in a segment

@jeandemagny wrote:

Hi,

I implemented a toggle switch in a segment as follow:

<ion-menu [content]="content" side="left" id="menuParameter">
    <ion-header>
        <ion-toolbar color="default">
            <ion-segment [(ngModel)]="menu">
                <ion-segment-button value="segment1">
                    <ion-title>
                        Segment1 without toggle (initialization segment)
                    </ion-title>
                </ion-segment-button>
                <ion-segment-button value="segment2">
                    <ion-title>
                        Segment 2 with toggle switch
                    </ion-title>
                </ion-segment-button>
            </ion-segment>
        </ion-toolbar>
    </ion-header>

    <ion-content>
        <div [ngSwitch]="menu">
        <ion-list *ngSwitchCase="'segment1'">
              By default here we are
        </ion-list>
        <ion-list *ngSwitchCase="'segment2'">
        <!--impossible to bind because by default i am not in segment 2 but in segment 1, so the toggle switch is not set with true value-->
                <ion-item>
                        <ion-label>There will be cake</ion-label>
                        <ion-label> {{isToggledd}} </ion-label>
                        <ion-toggle [(ngModel)]="isToggled" (ionChange)="notify()"></ion-toggle>
                    </ion-item>

            </ion-list>
        </div>
    </ion-content>
</ion-menu>

<ion-nav [root]="rootPage" #content swipeBackEnabled="false"></ion-nav>

here is my controller :

import { Component } from '@angular/core';
import { Platform } from 'ionic-angular';
import { StatusBar } from '@ionic-native/status-bar';


export class AppComponent {
  rootPage:any = HomePage;

  public isToggled: boolean;
  public menu: string = 'segment1'; /*show segment1 by default*/


  constructor(
    public platform: Platform,
    public statusBar: StatusBar) {
    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();
    });


    this.isToggled = true; /*toggle Switch set as TRUE*/

  public notify() {
    console.log("Toggled: "+ this.isToggled);
  }

So doing this I expect in my SEGMENT2 to have this behaviour

Image may be NSFW.
Clik here to view.
Screenshot from 2017-11-19 18:33:15

but the behaviour i get is the following :

Image may be NSFW.
Clik here to view.
Screenshot from 2017-11-19 18:37:47

BUT surprisingly, if a move the toggle switch into the segment 1, the toggle behaviour is ok :

Image may be NSFW.
Clik here to view.
Screenshot from 2017-11-19 18:36:43


Note the Toggle value is always "true".

any help ?

Posts: 1

Participants: 1

Read full topic

Geolocation Issue PWA

@jsauter wrote:

I am having an issue with an app i intend to run in the browser that uses geolocation.

Starting from a Home page, the user can navigate to a map page that displays a map. There is a “Geolocate” button, that should get the user’s geolocation and add a marker to the map.

Everything works fine in the browser. On iOS (safari and chrome) after navigating to the map page and clicking the “Geolocate” button, the navigator.geolocation.getCurrentPosition() method and Geolocation.getCurrentPosition(), return an error (POSITION_UNAVAILABLE)

When the map page is refreshed or entered directly via url everything works fine.

This makes me think that the navigation somehow affects the navigator.geolocation service. ¿any ideas?

Thanks in advance

Posts: 1

Participants: 1

Read full topic


Ionic AOT not injecting AngularFire2 into providers

@mdwagner wrote:

Hello!
I’m having an issue with Ionic 3 AOT where the build succeeds, but when I try to serve it, it doesn’t inject an AngularFire2 instance into my services (providers). Works fine JIT, but not AOT. Also, I’m using lazy-loading for my pages.
Here is my Ionic Info:

cli packages: (/Users/MWagner/.nvm/versions/node/v8.9.0/lib/node_modules)
    @ionic/cli-utils  : 1.18.0
    ionic (Ionic CLI) : 3.18.0
global packages:
    cordova (Cordova CLI) : 7.1.0
local packages:
    @ionic/app-scripts : 3.0.1
    Cordova Platforms  : none
    Ionic Framework    : ionic-angular 3.8.0
System:
    Android SDK Tools : 26.0.2
    Node              : v8.9.0
    npm               : 5.5.1
    OS                : macOS Sierra
    Xcode             : Xcode 8.3.3 Build version 8E3004b
Environment Variables:
    ANDROID_HOME : /Users/MWagner/Library/Android/sdk
Misc:
    backend : pro

Posts: 1

Participants: 1

Read full topic

Website use with grids

@michelled wrote:

Please can I get input regarding the use of ionic components within a grid. I have struggled as it seems that components such as a list does not work. Since I am a newbie I would appreciate hearing from others.

I need to create a website using ionic and would make use of the grid to create margins when viewed on desktop. The entire app will then be built within the center column. Please can I have some advice before I start .

Thanks

Posts: 1

Participants: 1

Read full topic

Code signing is required for product type

@DMoney wrote:

When running:
ionic cordova run ios

I get the following error:
Code Signing Error: Signing for “App” requires a development team. Select a development team in the project editor.
Code Signing Error: Code signing is required for product type ‘Application’ in SDK ‘iOS 11.1’

I’ve seen several posts in this forum but none explain how to apply this fix for an Ionic app. They all reference xCode but I’m not sure how to apply a code signing in xCode that was developed with Visual Code. I can’t even open an Ionic project in xCode. I don’t even have a signing option like displayed on some of the screen shots. Could someone please help with this issue. I’ve been unable to deploy to iOS for over month now and none of the resources online specifically discusses how to resolve this for an ionic app.

Posts: 1

Participants: 1

Read full topic

Assets not cleared

@Rasioc wrote:

I just noticed my latest app production update was 3 times the size it should be. Some investigation showed, that the /assets/ directory in the APK and also in www/assets and platforms\android\assets\www\assets contained a lot of obsolete files, although they are not present anymore in the src/assets folder.

Shouldn’t these files be properly cleaned up?

Posts: 1

Participants: 1

Read full topic

Ionic View App SQLlite limit

@Willcowd wrote:

Hi all.

I’ve got an app working on Chrome using ionic serve and connecting to a WebSql.
When I upload the app to Ionic View, the app appears to freeze on writing 18 long SQLs to SQLlite. The same doesn’t happen on Chrome.

  1. I’m not sure how to debug it from Ionic View.
  2. Does anyone know if there is a limit to Sqllite inside ionic view

Thanks in advance
Mark

Posts: 1

Participants: 1

Read full topic

Installation failed

@khalilben wrote:

Hi,

When i build an APK and want to install it on my phone, it’s fail…
My phone’s version is Marshmallow 6.0

My Android Platform is

{
  "android": "6.3.0"
}

And the AndroidManifest.xml

<uses-sdk android:minSdkVersion="16" android:targetSdkVersion="25" />

Posts: 5

Participants: 2

Read full topic

Deviceready event not firing in Android DevApp (deviceready has not fired after 5 seconds)

@onwk wrote:

So I’m just getting started with Ionic, and I’ve run into the problem that deviceready doesn’t fire (in time), which seems kinda wide spread, at least I could find quite a lot of topics about it all over the net.

I’ve installed a new blank app via ionic start test blank, then I ran it via ionic serve -c --no-open, and finally opened it in the Android Ionic DevApp. The app will open after a few seconds, but the ready() code won’t run.

> ionic serve -c --no-open
Starting app-scripts server: --address 0.0.0.0 --port 8100 --livereload-port 35729 --dev-logger-port 53703 --consolelogs
–nobrowser - Ctrl+C to cancel
[00:18:28] watch started …
[00:18:28] build dev started …
[00:18:28] clean started …
[00:18:28] clean finished in 7 ms
[00:18:28] copy started …
[00:18:28] deeplinks started …
[00:18:28] deeplinks finished in 21 ms
[00:18:28] transpile started …
[00:18:31] transpile finished in 3.28 s
[00:18:31] preprocess started …
[00:18:31] preprocess finished in 2 ms
[00:18:31] webpack started …
[00:18:31] copy finished in 3.45 s
[00:18:37] webpack finished in 6.17 s
[00:18:37] sass started …
[00:18:38] sass finished in 1.01 s
[00:18:38] postprocess started …
[00:18:38] postprocess finished in 7 ms
[00:18:38] lint started …
[00:18:38] build dev finished in 10.66 s
[00:18:39] watch ready in 10.73 s
[00:18:39] dev server running: http://localhost:8100/

[OK] Development server running!
Local: http://localhost:8100
External: http://192.168.2.101:8100, http://192.168.56.1:8100, http://192.168.13.1:8100, http://55.55.55.1:8100,
http://169.254.249.34:8100, http://192.168.144.1:8100, http://192.168.91.1:8100, http://192.168.21.1:8100
DevApp: test@8100 on admin-PC

[00:18:41] lint finished in 2.78 s
[00:18:53] console.log: Angular is running in the development mode. Call enableProdMode() to enable the production
mode.
[00:18:54] console.log: deviceready has not fired after 5 seconds.
[00:18:54] console.log: Channel not fired: onFileSystemPathsReady
[00:18:56] console.warn: Ionic Native: deviceready did not fire within 5000ms. This can happen when plugins are in an
inconsistent state. Try removing plugins from plugins/ and reinstalling them.

I’ve read a bunch of topics about this, but most of them seem to be about running the app via ionic run ..., and all the suggestions like adding/removing a content security policy, adding/removing/adding platforms do not fix the problem for me.

It should also be noted that I do not have any (additional) plugins installed, as it’s just the blank app template, so the suggestion in the warning message isn’t applicable.

So, what is this all about, is there a proper solution for this? Is there a way to debug this further on my end?

> ionic info

cli packages: (C:\Users\admin\AppData\Roaming\npm\node_modules)

@ionic/cli-utils  : 1.18.0
ionic (Ionic CLI) : 3.18.0

local packages:

@ionic/app-scripts : 3.1.2
Ionic Framework    : ionic-angular 3.9.2

System:

Node : v8.9.1
npm  : 5.3.0
OS   : Windows 7

Misc:

backend : pro

Phone Info

OS: OxygenOS 3.1.4
Android-Version: 6.0.1

Posts: 1

Participants: 1

Read full topic


How to use SQLCipher in Ionic2 project

@rajkhowa wrote:

I have implemented a project using Ionic2 and SQLite. Now I want to use SQLCipher for encrypting data. But after installing plugin cordova-sqlcipher-adapter, i am not able to use it. As per documentation, i need to use it like this:

document.addEventListener(‘deviceready’, function() {
db = window.sqlitePlugin.openDatabase({name:
‘demo.db’, key: ‘your-password-here’, location: ‘default’});
});

But during build, i get the error “property sqliteplugin does not exist on type window”.

Please guide in this regard as i am not able to find online tutorial on SQLCipher.

Regards,

Posts: 1

Participants: 1

Read full topic

Bug in Ionic View and DevApp: Different ion-header height in same app

@rfarko wrote:

I recently faced this issue with two of my apps when testing with Ionic View and Dev App. I am using the latest Ionic CLI and templates (v 3.18.0). The problem is that when adding pages to my app, for no reason, pages appear with different header (ion-header) height on the device. This causes the title of some pages overlap with phone status bar.

Here is an example from one of my apps in Ionic DevApp:
The app has a main page (Dashboard), tapping on existing items opens “Page 1” and selecting New Item, opens “Page 2”:

Both pages have exact the same HTML header

<ion-header>
  <ion-navbar  color="primary">
    <ion-title>Page 1</ion-title>
  </ion-navbar>
</ion-header>
<ion-header>
  <ion-navbar  color="primary">
    <ion-title>Page 2</ion-title>
  </ion-navbar>
</ion-header>

and both are navigated to in same way:

this.navCtrl.push('Page1');
this.navCtrl.push('Page2');

In Ionic View I see both pages with the short header!

Please let me know if anybody else is experiencing the same problem.

Posts: 2

Participants: 1

Read full topic

Failed Build - Error: Cannot read property 'text' of undefined

@vicheanak wrote:

Built failed with following message:

ionic serve
Starting app-scripts server: --address 0.0.0.0 --port 8100 --livereload-port 35729 --dev-logger-port 53703 --nobrowser -
Ctrl+C to cancel
[10:49:50]  watch started ...
[10:49:50]  build dev started ...
[10:49:50]  clean started ...
[10:49:50]  clean finished in 1 ms
[10:49:50]  copy started ...
[10:49:50]  deeplinks started ...
Error: Cannot read property 'text' of undefined
    at new BuildError (/Users/macbook/IdeaProjects/Billz/Mobile/billz.io/node_modules/@ionic/app-scripts/dist/util/errors.js:16:28)
    at /Users/macbook/IdeaProjects/Billz/Mobile/billz.io/node_modules/@ionic/app-scripts/dist/deep-linking.js:57:21
    at <anonymous>
[10:49:50]  copy finished in 247 ms

Posts: 1

Participants: 1

Read full topic

Failed to fetch plugin cordova-plugin-mfp for Ionic 2

@sharafatshariff wrote:

I got my error code when trying to add plugin to my Ionic 2 project.

C:\Users\alex\Documents\GitHub\myApp>ionic cordova plugin add cordova-plugin-mfp

cordova plugin add cordova-plugin-mfp --save
Error: Failed to fetch plugin cordova-plugin-mfp via registry.
Probably this is either a connection problem, or plugin spec is incorrect.
Check your connection and plugin name/version/URL.
Error: cmd: Command failed with exit code 4294963248 Error output:
npm ERR! path C:\Users\alex\Documents\GitHub\myApp\node_modules\fsevents\node_modules\rc\node_modules
npm ERR! code EPERM
npm ERR! errno -4048
npm ERR! syscall scandir
npm ERR! Error: EPERM: operation not permitted, scandir 'C:\Users\sharafat.shariff\Documents\GitHub\myApp\node_modules\fsevents\node_modules\rc\node_modules’
npm ERR! { Error: EPERM: operation not permitted, scandir 'C:\Users\sharafat.shariff\Documents\GitHub\myApp\node_modules\fsevents\node_modules\rc\node_modules’
npm ERR! stack: ‘Error: EPERM: operation not permitted, scandir ‘C:\Users\sharafat.shariff\Documents\GitHub\myApp\node_modules\fsevents\node_modules\rc\node_modules’’,
npm ERR! errno: -4048,
npm ERR! code: ‘EPERM’,
npm ERR! syscall: ‘scandir’,
npm ERR! path: ‘C:\Users\alef\Documents\GitHub\myApp\node_modules\fsevents\node_modules\rc\node_modules’ }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.

Can anyone help me with this?

Posts: 1

Participants: 1

Read full topic

Zoom in ionic slides

@chiragebiztrait wrote:

Hello all,

I am developing a project for e-commerce, and in product-detail page,i have one slider with product images. in that user can zoom that image.

my html code
<ion-slides pager="true" style="height:45%" zoom> <ion-slide *ngFor="let slide of selProd.productImages"> <img src="{{slide.image}}"> </ion-slide> </ion-slides>

but when i try to zoom image by pinch or double tap. it gives me error:

swiper-zoom.js:364 Uncaught TypeError: Cannot read property 'getAttribute' of null
    at toggleZoom (swiper-zoom.js:364)

Thank you.

Posts: 1

Participants: 1

Read full topic

Viewing all 49108 articles
Browse latest View live


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