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

Blobal css dynamically

$
0
0

@Alexdragneel wrote:

Hello,
I would like to change with a button, all the font of my application that includes AlertCtrl.
Is there a solution to insert scss code dynamically as in web? The dynamic theme solution on ion-nav does not include everything.
Thank you.

Posts: 1

Participants: 1

Read full topic


Name on Buttons are not aligned

$
0
0

@Ressaq wrote:

I created a page which has multiple buttons in vertical position.
However the name of all buttons are not aligned in the same position. For eg. the button name (Optimus XL Stents) on top have some wide space compared to the button on the bottom button name (AltoSa XL PTA Balloons).
Please help me.

type or paste code here

file.html

<ion-content>
  <div class ="custom-padding">
    <div *ngFor = 'let product of productList'>
      <button ion-button color="buttoncolor" round (click)="onProductClick(product.id)" style="text-transform: none;" margin-bottom="10px" margin-left="10px" class="btn block">
        {{product.name}}
        <ion-icon ios="ios-arrow-dropright-circle" md="md-arrow-dropright-circle" class="icn"></ion-icon>
      </button>
    </div>
  </div>
</ion-content>

file.ts

type or paste code here![butexport class ProductsPage {

  constructor(public navCtrl: NavController, public navParams: NavParams) {
  }

  pageTitle: string = 'Products';

  productList: any[] = [
    {
      "id" : "Optimus",
      "name": "Optimus XL Stents"
    },
    {
      "id" : "AltoSa",
      "name": "AltoSa XL PTA Balloons"
    },
    {
      "id" : "Pillar",
      "name": "Pillar Bifurcation Stents"
    },
    {
      "id" : "Exeter",
      "name": "Exeter Retrieval Devices"
    }
  ];

Please check the image for reference

Posts: 1

Participants: 1

Read full topic

He hacked Ionic to create this viral game?

$
0
0

@Runald12 wrote:

Project Hyrax [iOS], a game was built using Ionic only! Impressive work!
There is even 3D elements in it without compromising the performance of the game.

The game developer revealed that he used IONIC to build the entire game.
I never thought we could build a game using Ionic framework. I tested the app and it’s working flawlessly!

Guys, you must check it out as well… it’s inspiring us as developers !
Link to the app - App Store

+1 from me!

Posts: 1

Participants: 1

Read full topic

Ion-list scroll on item not work

$
0
0

@iacotp wrote:

I need show on modal dialog a list of element and scroll this list on selected element

this is my html

<!--
  Generated template for the EditDoublePage page.

  See http://ionicframework.com/docs/components/#navigation for more info on
  Ionic pages and navigation.
-->
<ion-header>
  <ion-toolbar>
    <ion-buttons start>
      <button ion-button (click)="close()">Cancel</button>
    </ion-buttons>
    <ion-title>{{dialogTitle}}</ion-title>
  </ion-toolbar>
</ion-header>


<ion-content >
    <ion-list radio-group >
       <ion-list-header>
           Timezones
       </ion-list-header>
       <ion-item *ngFor="let item of timezones" [id]="item.index">
           <ion-label>{{ item.tz.formatted() }}</ion-label>
           <ion-radio [checked]="item.tz.formatted() == timezone.formatted()" value="item" (click)="selectTimezone(item)"></ion-radio>
       </ion-item>
    </ion-list>
   </ion-content>

this is my ts file

import { FormBuilder } from '@angular/forms';
import { IonicPage, NavController, NavParams, ViewController, Content } from 'ionic-angular';
import { Component, ViewChild } from '@angular/core';
import { TimeZone } from '../../data/timezone';
// import { isDefined } from '@angular/compiler/src/util';

/**
 * Generated class for the EditTimezonePage page.
 *
 * See https://ionicframework.com/docs/components/#navigation for more info on
 * Ionic pages and navigation.
 */
const LOG_TAG = 'EditTimezonePage';

@IonicPage()
@Component({
  selector: 'page-edit-timezone',
  templateUrl: 'edit-timezone.html',
})

export class EditTimezonePage {

  timezone: TimeZone;
  timezones = [];
  dialogTitle: string;
  index = -1;

  @ViewChild(Content) content: Content;

  constructor(public navCtrl: NavController, public navParams: NavParams, public view: ViewController, public formBuilder: FormBuilder) {
    this.timezone = new TimeZone(this.navParams.get('timezone'));
    this.dialogTitle = this.navParams.get('title');
    var timeformat = this.navParams.get('timeformat');
    console.log(LOG_TAG + ' timezone ' + this.timezone.toString());
    console.log(LOG_TAG + ' timeformat ' + timeformat);
    this.initTimezones(timeformat);
  }

  ionViewDidLoad() {
    console.log(LOG_TAG + ' ionViewDidLoad');
    console.log("index " + this.index)
    if (this.index != -1) {
      var e = document.getElementById(this.index + "");
      if (e) {
        let yOffset = e.offsetTop;
        console.log("yOffset " + yOffset);
        this.content.scrollTo(0, 100, 0);
      } else {
        console.error("index " + this.index + " not found");
      }
    }
  }

  initTimezones(timeformat){
    var tz = new TimeZone(-12);
    var deltaTz = 60;
    if (timeformat == 3) {
      deltaTz = 15;
    }
    var i = 0;

    while (tz.getValue() < 12.0) {
      var tzp = new TimeZone(tz.getValue());
      this.timezones.push({ 'index': i, 'tz': tzp });
      if (this.timezone.formatted() == tzp.formatted())
        this.index = i;
      i++;
      tz.addMinute(deltaTz);
    }
  }


  selectTimezone(tz) {
    this.view.dismiss(tz);
  }

  close() {
    this.view.dismiss();
  }

}

this is my console log

edit-timezone.ts:34 EditTimezonePage timezone TimeZone{h=0, m=0}
edit-timezone.ts:35 EditTimezonePage timeformat 2
edit-timezone.ts:40 EditTimezonePage ionViewDidLoad
edit-timezone.ts:41 EditTimezonePage index 12
edit-timezone.ts:46 EditTimezonePage yOffset 568

the yOffset is founded but i can see the scroll.

Posts: 1

Participants: 1

Read full topic

Insert data from page to other page

$
0
0

@RenzoM78 wrote:

Hello all,

I have a listpage which I can fill with items by a insert input field on that same page. Also I have a page which have many items and I want that when I click on a button that is by an item the title is inserted in the list on the listPage. What is the simplest to do that?

I thought that something like this.navCtrl.push was good enough but then I only go to that page but see no item inserted in the list

Posts: 1

Participants: 1

Read full topic

In Ionic HTML inside how to break text lines?

$
0
0

@umeshionic1234 wrote:

am entering some data inside text-area field of my webpage and I want to enter data on next line…But that data is displaying on same line (please see below image )
.how to display data to next line ?..please help me
image

Posts: 1

Participants: 1

Read full topic

Ionic leaflet map with search bar

$
0
0

@elduderino15 wrote:

I am using Leafletjs to display a map view in one of my pages.
I would like to overlay a search bar on top how google maps has it. However, with the below code
the ion-content will always end up overlaying my search bar, even when I set the z-index.
The search bar is visible before the map fully loads, but then is in the background when map loading is finished.

Is there way how to make the search bar stick on top? I am overlaying fabs and those are visible.
Any property I could add to the search bar to stick above all?

<ion-content id="map" style="z-index: -1">

  <ion-searchbar style="z-index: 1"></ion-searchbar>

 <ion-fab bottom center>
    <button ion-fab (click)="fun()"><b>Hi</b></button>
  </ion-fab>


Posts: 1

Participants: 1

Read full topic

Empty field inserted instead of a name

$
0
0

@RenzoM78 wrote:

I load a list with items from firebase and behind every result i have a button. When I push the button the item is pushed to another list only there is an empty field inserted instead of the product.name in it. I know I do something wrong and send an empty field but can not figure it out.

<ion-item *ngFor="let product of products | async">
    {{product.name}} <button ion-button color="secondary" (click)="onSubmit(product.name)" name="add"> --> </button>
  </ion-item>

Posts: 1

Participants: 1

Read full topic


Error error error

Can't create alert inside onFail function of http request

$
0
0

@codetrekk wrote:

So I’m using the native HTTP cordova plugin for my http requests. But I can’t seem to wrap my head around a problem where I can’t create an alert inside the onFail function. Anyone else experienced this?

The error says:

Error in Error callbackId: CordovaHttpPlugin1608257770 : TypeError: Cannot
read property ‘alertCtrl’ of undefined
Here’s how I structured my code:

cordova.plugin.http.sendRequest('http://127.0.0.1:5000/api/login/', options, function(response) {

    try {   //onSuccess
        response.data = JSON.parse(response.data);

        localStorage.setItem('token', JSON.stringify(response.data.token));

      } catch(e) {
        console.error('JSON parsing error');
      }
    },  function(response) {    //onFail
        console.log('403');

        let alert = this.alerts.create({
            title: 'Error',
            subTitle: 'Username/password is invalid!',
            buttons: ['Dismiss']
        });
        alert.present();

    }
);

Here’s how my constructor looks like:

constructor(public navCtrl: NavController,
        private alerts: AlertController, 
        private http: HTTP, 
        private store: Storage, 
        ) {}

What’s causing it to not work? Been stuck for days on this. Please help

Posts: 2

Participants: 2

Read full topic

Dynamic key value for SQLite storage?

$
0
0

@jamesharvey wrote:

Hello guys,

I’m trying to save several data array object to sqlite storage.
I can manage to save just one but whenever I try to save another one, it overrides previous one with the same key name. I have to make the key value dynamic. How can I do that?

Here’s my data provider ts file.

private options: any[] = [

    {
      "name": "option 01",
      "website": "www.google.com",
      "about": "choose this option 01",
      "id": "1"
    },

    {
      "name": "option 02",
      "website": "www.yahoo.com",
      "about": "choose this option 02",
      "id": "2"
    },
    {
      "name": "option 03",
      "website": "www.bing.com",
      "about": "choose this option 03",
      "id": "3"
    },
    {
      "name": "option 04",
      "website": "www.stackoverflow.com",
      "about": "choose this option 04",
      "id": "4"
    }
]

and here’s my home.ts file. It saves data object well but right now, it can save only one.
I want to be able to save several and delete each dynamically using different key value per a data object.


  setValue(){
    this.storage.set("object",this.option).then((successData)=>{
      console.log("Data Stored!");
      console.log(successData);
    })
  }
  getValue(){
    this.storage.get("object").then((data)=>{
      console.log(data);
    })
  }

  removeValue() {
    this.storage.remove("object").then((data)=> {
      console.log("data removed!");
    })
  }

Thanks in advance, Ideally, I’m looking into save several data objects into the same key value with different ids… but unfortunately, if a key value is same, it will override the previous data object.

or is there any way to use data object’s name as key value?
For instance, I would like to use {{ option.name }} as unique key value for data object so I can later easily erase it too.

Posts: 7

Participants: 2

Read full topic

Background Image fading

$
0
0

@Silverbugnz wrote:

Hey All,

I’m working on an app where i want to have background images fade from one to another.
I’ve got it working nicely using standard css transition fading, however when I look at it in Ionic View the images don’t fade, rather flash on and off a couple of times and then suddenly change.

I’m just wondering if anyone has gotten image transitioning working, and if they used css or some other means?

Posts: 1

Participants: 1

Read full topic

Not able to store to storage after http request

$
0
0

@codetrekk wrote:

I already read the docs regarding Ionic Storage and have already imported what is needed. But still can’t seem to get it to work. When I check the localStorage of chrome (I use ‘ionic cordova run browser’), it’s empty.

Here’s my code:

cordova.plugin.http.sendRequest('http://127.0.0.1:5000/api/login/', options, function(response) {
       
        try {   //onSuccess
            response.data = JSON.parse(response.data);
            
            this.store.set('token', JSON.stringify(response.data.token));
            
            this.navCtrl.setRoot(HomePage);

          } catch(e) {
            console.error('JSON parsing error');
          }
        },  function(response) {    //onFail
            console.log('403');
            alert.present();

        }
    );

My constructor looks like this:

constructor(public navCtrl: NavController,
            private alerts: AlertController, 
            private http: HTTP, 
            private store: Storage, 
            ) {}

When I run it, it throws an error and shows ‘JSON parsing error’ instead of setting a value to the ‘token’ key and rerouting to HomePage. What am I doing wrong here? Please help

Posts: 7

Participants: 2

Read full topic

How to implement Ionic 4 UI components API methods/properties and events without Angular?

$
0
0

@razaviv wrote:

Since Angular 5 is super heavy and re-build time takes over 10 seconds, I decided to try Ionic 4 core UI Components with another framework.

I think about the old and the good AngularJS or maybe Vue.js.

When loading the CSS Components its easy and I can use the reference from the Ionic website. But I do not handle to find any documentation about methods/properties and events without Angular.

For example, I want to pop the modal programatically.

Where can I find some documentation on how to run Ionic 4 without Angular? Will Ionic team provide a reference for each framework in future when Ionic 4 version will be released (since now its on alpha).

Thanks.

Posts: 2

Participants: 2

Read full topic

Missing mandatory "onFail" callback function

$
0
0

@codetrekk wrote:

I’m using the advanced-http cordova plugin. Followed all their steps in their github repo (https://github.com/silkimen/cordova-plugin-advanced-http#post)

But when I try to run my code an error pops up:

missing mandatory "onFail" callback function

Here’s how my code looks like:

 cordova.plugin.http.post('http://127.0.0.1:5000/api/register', {
        username: this.username, 
        password: this.password,
        firstname: this.firstname,
        middlename: this.middlename,
        lastname: this.lastname,
        birthday: this.birthday,
        age: this.age,
        contact: this.contact,
        address: this.address,
        prisoner: this.prisoner
    }, response => {
        
        try {
            response.data = JSON.parse(response.data);
            // prints test
            console.log(response.data.message);
          } catch(e) {
            console.error('JSON parsing error');
          }
        }, response => {
          // prints 403
          console.log(response.status);

          //prints Permission denied
          console.log(response.error);
        });

What am I missing here? :thinking: Please help

Posts: 1

Participants: 1

Read full topic


Populate a list with data from SQlite?

$
0
0

@jamesharvey wrote:

Hello guys,

How can I populate an *ngFor list with all data from SQlite?
For example, let’s say I have several data objects stored with different keys inside SQlite.
and I want to call all of them up on an html list like this:

<div *ngFor="let item of items">
   <h1>{{ item.name }}</h1>
<p> {{ item.about }} </p>
</div>

and here’s my ts file for that:

  ionViewDidLoad() {

      this.storage.get(item);
   
  }

This ts code will not work… I don’t know how to get all items in sqlite at a time.

Please help.

Thanks

Posts: 1

Participants: 1

Read full topic

Unable to build. Error: values_values.arsc.flat: error: failed to open

$
0
0

@oldskolkoder wrote:

I’m having trouble building the my ionic app. it’s saying values_values.arsc.flat: error: failed to open.

at 1st I thought something wrong with my code. however I tried a super project ionic start testionic super and the result is same

>ionic cordova build android
Running app-scripts build: --platform android --target cordova
[18:59:39]  build dev started ...
[18:59:39]  clean started ...
[18:59:39]  clean finished in 12 ms
[18:59:39]  copy started ...
[18:59:40]  deeplinks started ...
[18:59:40]  deeplinks finished in 130 ms
[18:59:40]  transpile started ...
[18:59:45]  transpile finished in 4.87 s
[18:59:45]  preprocess started ...
[18:59:45]  preprocess finished in 1 ms
[18:59:45]  webpack started ...
[18:59:45]  copy finished in 5.26 s
[18:59:51]  webpack finished in 6.20 s
[18:59:51]  sass started ...
Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.
[18:59:52]  sass finished in 1.50 s
[18:59:52]  postprocess started ...
[18:59:52]  postprocess finished in 56 ms
[18:59:52]  lint started ...
[18:59:52]  build dev finished in 13.01 s
> cordova build android

You have been opted out of telemetry. To change this, run: cordova telemetry on.
Android Studio project detected

ANDROID_HOME=C:\Users\chork\AppData\Local\Android\sdk
JAVA_HOME=C:\Program Files\Java\jdk1.8.0_161
studio
Subproject Path: CordovaLib
Subproject Path: app
[18:59:58]  lint finished in 5.88 s
publishNonDefault is deprecated and has no effect anymore. All variants are now published.

The Task.leftShift(Closure) method has been deprecated and is scheduled to be removed in Gradle 5.0. Please use Task.doLast(Action) instead.
        at build_4xnuhzb3luga1t2qz5dqg9aor.run(C:\Users\chork\Documents\Projects\testionic\platforms\android\app\build.gradle:143)
:CordovaLib:preBuild UP-TO-DATE
:CordovaLib:preDebugBuild UP-TO-DATE
:CordovaLib:compileDebugAidl

UP-TO-DATE
:CordovaLib:compileDebugRenderscript
 UP-TO-DATE
:CordovaLib:checkDebugManifest UP-TO-DATE
:CordovaLib:generateDebugBuildConfig UP-TO-DATE
:CordovaLib:prepareLintJar UP-TO-DATE
:CordovaLib:generateDebugResValues UP-TO-DATE
:CordovaLib:generateDebugResources UP-TO-DATE
:CordovaLib:packageDebugResources UP-TO-DATE
:CordovaLib:platformAttrExtractor UP-TO-DATE
:CordovaLib:processDebugManifest UP-TO-DATE
:CordovaLib:processDebugResources

:CordovaLib:generateDebugSources

:CordovaLib:javaPreCompileDebug UP-TO-DATE
:CordovaLib:compileDebugJavaWithJavac
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.

:CordovaLib:processDebugJavaRes NO-SOURCE
:CordovaLib:transformClassesAndResourcesWithPrepareIntermediateJarsForDebug

:app:preBuild UP-TO-DATE
:app:preDebugBuild

UP-TO-DATE
:app:compileDebugAidl UP-TO-DATE
:CordovaLib:packageDebugRenderscript
 NO-SOURCE
:app:compileDebugRenderscript

UP-TO-DATE
:app:checkDebugManifest UP-TO-DATE
:app:generateDebugBuildConfig
 UP-TO-DATE

:app:prepareLintJar UP-TO-DATE
:app:generateDebugResValues UP-TO-DATE
:app:generateDebugResources UP-TO-DATE
:app:mergeDebugResources
values_values.arsc.flat: error: failed to open.


Error: java.util.concurrent.ExecutionException: com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details
:app:mergeDebugResources

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:mergeDebugResources'.
> Error: java.util.concurrent.ExecutionException: com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details

* 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

BUILD FAILED in 6s
FAILED
21 actionable tasks: 4 executed, 17 up-to-date
(node:4212) UnhandledPromiseRejectionWarning: Error: cmd: Command failed with exit code 1 Error output:
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
values_values.arsc.flat: error: failed to open.


FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:mergeDebugResources'.
> Error: java.util.concurrent.ExecutionException: com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details

* 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

BUILD FAILED in 6s
    at ChildProcess.whenDone (C:\Users\chork\Documents\Projects\testionic\platforms\android\cordova\node_modules\cordova-common\src\superspawn.js:169:23)
    at emitTwo (events.js:126:13)
    at ChildProcess.emit (events.js:214:7)
    at maybeClose (internal/child_process.js:925:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
(node:4212) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:4212) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

here is the ionic info

>ionic info

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

    @ionic/cli-utils  : 1.19.2
    ionic (Ionic CLI) : 3.20.0

global packages:

    cordova (Cordova CLI) : 8.0.0

local packages:

    @ionic/app-scripts : 3.1.9
    Cordova Platforms  : android 7.0.0
    Ionic Framework    : ionic-angular 3.9.2

System:

    Node : v8.10.0
    npm  : 5.6.0
    OS   : Windows 10

Environment Variables:

    ANDROID_HOME : not set

Misc:

    backend : pro

Posts: 1

Participants: 1

Read full topic

Unable to build apk from ionic

$
0
0

@ashish0212 wrote:

I am unable to build apk from ionic project pls check my errors and suggest me the solution.

C:\Windows\System32\baechat>ionic cordova build android

cordova build android
Android Studio project detected

cp: copyFileSync: could not write to dest file (code=EPERM):C:\Windows\System32
baechat\platforms\android\app\src\main\assets\www\img\Thumbs.db

Running command: “C:\Program Files\nodejs\node.exe” C:\Windows\System32\baechat
hooks\after_prepare\010_add_platform_class.js C:\Windows\System32\baechat

ANDROID_HOME=C:\Users\win8\android-sdks
JAVA_HOME=C:\Program Files\Java\jdk1.8.0_161
studio
Subproject Path: CordovaLib
Subproject Path: app
publishNonDefault is deprecated and has no effect anymore. All variants are now
published.

The Task.leftShift(Closure) method has been deprecated and is scheduled to be re
moved in Gradle 5.0. Please use Task.doLast(Action) instead.

    at build_4wecvt8k0hv9cy72vm8pbizq0.run(C:\Windows\System32\baechat\platf

orms\android\app\build.gradle:144)
Configuration ‘compile’ in project ‘:app’ is deprecated. Use ‘implementation’ in
stead.

:CordovaLib:preBuild
UP-TO-DATE
:CordovaLib:preDebugBuild UP-TO-DATE

:CordovaLib:compileDebugAidl

UP-TO-DATE
:CordovaLib:compileDebugRenderscript

UP-TO-DATE
:CordovaLib:checkDebugManifest
UP-TO-DATE
:CordovaLib:generateDebugBuildConfig

UP-TO-DATE
:CordovaLib:prepareLintJar

UP-TO-DATE
:CordovaLib:generateDebugResValues
UP-TO-DATE
:CordovaLib:generateDebugResources
UP-TO-DATE
:CordovaLib:packageDebugResources

UP-TO-DATE
:CordovaLib:platformAttrExtractor
UP-TO-DATE
:CordovaLib:processDebugManifest
UP-TO-DATE
:CordovaLib:processDebugResources
UP-TO-DATE
:CordovaLib:generateDebugSources
UP-TO-DATE
:CordovaLib:javaPreCompileDebug
UP-TO-DATE
:CordovaLib:compileDebugJavaWithJavac

UP-TO-DATE
:CordovaLib:processDebugJavaRes NO-SOURCE
:CordovaLib:transformClassesAndResourcesWithPrepareIntermediateJarsForDebug
UP-TO-DATE
:app:preBuild UP-TO-DATE
:app:preDebugBuild
UP-TO-DATE

:app:compileDebugAidl

UP-TO-DATE

:CordovaLib:packageDebugRenderscript
NO-SOURCE

:app:compileDebugRenderscript

UP-TO-DATE
:app:checkDebugManifest
UP-TO-DATE
:app:generateDebugBuildConfig

UP-TO-DATE
:app:prepareLintJar UP-TO-DATE
:app:generateDebugResValues
UP-TO-DATE
:app:generateDebugResources UP-TO-DATE

:app:mergeDebugResources
C:\Windows\System32\baechat\platforms\android\app\build\intermediates\res\merged
\debug: error: directory does not exist.

Error: java.util.concurrent.ExecutionException: com.android.tools.aapt2.Aapt2Exc
eption: AAPT2 error: check logs for details
:app:mergeDebugResources FAILED

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ‘:app:mergeDebugResources’.

Error: java.util.concurrent.ExecutionException: com.android.tools.aapt2.Aapt2E
xception: AAPT2 error: check logs for details

  • Try:
    Run with --stacktrace
    21 actionable tasks: 1 executed, 20 up-to-date
    option to get the stack trace. Run with --info or --debug option to get more lo
    g output.

  • Get more help at https://help.gradle.org

BUILD FAILED in 4s
(node:5540) UnhandledPromiseRejectionWarning: Error: cmd: Command failed with ex
it code 1 Error output:
C:\Windows\System32\baechat\platforms\android\app\build\intermediates\res\merged
\debug: error: directory does not exist.

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ‘:app:mergeDebugResources’.

Error: java.util.concurrent.ExecutionException: com.android.tools.aapt2.Aapt2E
xception: AAPT2 error: check logs for details

  • 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

BUILD FAILED in 4s
at ChildProcess.whenDone (C:\Windows\System32\baechat\platforms\android\cord
ova\node_modules\cordova-common\src\superspawn.js:117:23)
at ChildProcess.emit (events.js:180:13)
at maybeClose (internal/child_process.js:936:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:220:5)
(node:5540) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This
error originated either by throwing inside of an async function without a catch
block, or by rejecting a promise which was not handled with .catch(). (rejection
id: 1)
(node:5540) [DEP0018] DeprecationWarning: Unhandled promise rejections are depre
cated. In the future, promise rejections that are not handled will terminate the
Node.js process with a non-zero exit code.

C:\Windows\System32\baechat>ionic info cli packages: (C:\Users\User\AppData\Roaming\npm\node_modules) @ionic/cli-utils : 1.19.2
ionic (Ionic CLI) : 3.20.0

global packages: cordova (Cordova CLI) : 8.0.0
Gulp CLI : not installed globally

local packages: Cordova Platforms : android 7.0.0
Ionic Framework : ionic1 1.3.1

System: Node : v9.9.0
npm : 5.6.0
OS : Windows 8.1

Environment Variables: ANDROID_HOME : C:\Users\win8\android-sdks;C:\Users\win8\android-sdks\platform-tools;C:\Users\win8\android-sdks\tools

Misc: backend : pro

C:\Windows\System32\baechat>cordova requirements

Android Studio project detected

Requirements check results for android:
Java JDK: installed 1.8.0
Android SDK: installed true
Android target: installed android-27,android-26,android-25
Gradle: installed C:\Program Files\Android\Android Studio\gradle\gradle-4.4\bin
gradle

Posts: 1

Participants: 1

Read full topic

Saving image from base64togallery

$
0
0

@pradeepaanu wrote:

this.base64ToGallery[‘base64ToGallery’](this.photonew, { prefix: ‘_img’ }).then(
res => console.log('Saved image to gallery ', res),
err => console.log('Error saving image to gallery ', err)
);

Argument of type ‘{ prefix: string; }’ is not assignable to parameter of type ‘Base64ToGalleryOptions’.
Property ‘mediaScanner’ is missing in type ‘{ prefix: string; }’.

Posts: 1

Participants: 1

Read full topic

Change icon in check box

$
0
0

@Dedoo wrote:

HTML

<ion-item>
                <ion-label>Daenerys Targaryen</ion-label>
                <ion-checkbox color="dark" checked="true"></ion-checkbox>
            </ion-item>

scss

   .checkbox-icon {
                border-color: #999 !important;
                background-color: #fff!important;
            }
            .checkbox-checked {
                background-color: #a71818!important;
                border-color: #a71818 !important;
            }

1

Posts: 1

Participants: 1

Read full topic

Viewing all 49259 articles
Browse latest View live


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