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

Plugins upgrading without consent and causing errors?

$
0
0

@samellis wrote:

Hi all.

I’m not sure what’s going on here… but I continue to get errors when building and adding platform. I’m on latest version of ionic and have tried downgrading too.

This is the error:

Failed to restore plugin “cordova-plugin-media-capture” from config.xml. You might need to try adding it again. Error: Version of installed plugin: “cordova-plugin-file@5.0.0” does not satisfy dependency plugin requirement “cordova-plugin-file@^4.0.0”. Try --force to use installed plugin as dependency.

In my config.xml and package.json I have these dependencies:

And a bunch of other dependencies that also have dependencies for this. However, when the script comes to install cordova-plugin-file plugin, it grabs version 5.0.0. This isn’t compatible with another plugin I’m using so it throws an error - but why is it fetching version 5.0.0 if I’ve explicitly set 4.3.3?

Another plugin has a dependency for cordova-plugin-file, such as this one:

So my guess is that it’s finding this plugin first, and installing the latest version of cordova-plugin-file - and then fails when it gets to another plugin that is dependant on an earlier version… however, moving the cordova-plugin-file dependency to the top of the config.xml doesn’t seem to help.

Does anyone have any suggestions?

Many thanks!

Posts: 1

Participants: 1

Read full topic


You have not accepted the license... Android SDK Platform 26

$
0
0

@jcmag wrote:

I’m updating a 6 months old project, and getting this error when I use: ionic package build android


λ ionic package info 90
√ Retrieving information about build 90 - done!

id | 90
status | FAILED
platform | Android
mode | debug
profile |
started | 2017-11-22T20:15:07.182Z
finished |

output:
Discovered plugin “com.phonegap.plugins.barcodescanner” in config.xml. Adding it to the project
Found phonegap-plugin-barcodescanner is already fetched. Skipped fetching com.phonegap.plugins.barcodescanner
Plugin “phonegap-plugin-barcodescanner” already installed on android.
ANDROID_HOME=/opt/android-sdk
JAVA_HOME=/usr/lib/jvm/java-8-oracle
:wrapper

BUILD SUCCESSFUL

Total time: 0.77 secs
Subproject Path: CordovaLib
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_cms663b5k7ukq3tikhtmdf93g.run(/home/package/workspace/apps-a35e0e54-90/cordova/platforms/android/build.gradle:143)
Checking the license for package Android SDK Platform 26 in /opt/android-sdk/licenses
Warning: License for package Android SDK Platform 26 not accepted.

FAILURE: Build failed with an exception.

  • What went wrong:
    A problem occurred configuring root project ‘android’.

You have not accepted the license agreements of the following SDK components:
[Android SDK Platform 26].
Before building your project, you need to accept the license agreements and complete the installation of the missing components using the Android Studio SDK Manager.
Alternatively, to learn how to transfer the license agreements from one workstation to another, go to http://d.android.com/r/studio-ui/export-licenses.html

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

BUILD FAILED

Total time: 2.138 secs
Error: /home/package/workspace/apps-a35e0e54-90/cordova/platforms/android/gradlew: Command failed with exit code 1 Error output:
FAILURE: Build failed with an exception.

  • What went wrong:
    A problem occurred configuring root project ‘android’.

You have not accepted the license agreements of the following SDK components:
[Android SDK Platform 26].
Before building your project, you need to accept the license agreements and complete the installation of the missing components using the Android Studio SDK Manager.
Alternatively, to learn how to transfer the license agreements from one workstation to another, go to http://d.android.com/r/studio-ui/export-licenses.html

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

I’ve updated Android Studio, Android SDK, npm, ionic, cordova…
and now this error about licenses… (tried other solutions given on the forum but didn’t work)

any help appreciated!

Posts: 2

Participants: 1

Read full topic

Execution failed for task ':CordovaLib:processDebugResources'. - New Ionic 3 Project

$
0
0

@Murlidhar wrote:

I get below error for new Ionic Project, I am unable to do the build, so I cant test on my phone, or emulator, or create APK. there is no error in the code, its a fresh project.

[ERROR] An error occurred while running cordova build android (exit code 1):


        ANDROID_HOME=C:\Users\username\AppData\Local\Android\Sdk
        JAVA_HOME=C:\Program Files\Java\jdk1.8.0_121
        :wrapper

        BUILD SUCCESSFUL in 1s
        1 actionable task: 1 executed
        Subproject Path: CordovaLib
        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_agprj4r3f53ndc1g298x4j1sy.run(C:\Users\murli\IonicProjects\toDo\platforms\android\build.gradle:137)
        The JavaCompile.setDependencyCacheDir() method has been deprecated and is scheduled to be removed in Gradle 4.0.
        Incremental java compilation is an incubating feature.
        The TaskInputs.source(Object) method has been deprecated and is scheduled to be removed in Gradle 4.0. Please
        use TaskInputs.file(Object).skipWhenEmpty() instead.
        :preBuild UP-TO-DATE
        :preDebugBuild UP-TO-DATE
        :checkDebugManifest
        :CordovaLib:preBuild UP-TO-DATE
        :CordovaLib:preDebugBuild UP-TO-DATE
        :CordovaLib:checkDebugManifest
        :CordovaLib:prepareDebugDependencies
        :CordovaLib:compileDebugAidl
        :CordovaLib:compileDebugNdk UP-TO-DATE
        :CordovaLib:compileLint
        :CordovaLib:copyDebugLint UP-TO-DATE
        :CordovaLib:mergeDebugShaders
        :CordovaLib:compileDebugShaders
        :CordovaLib:generateDebugAssets
        :CordovaLib:mergeDebugAssets
        :CordovaLib:mergeDebugProguardFiles
        :CordovaLib:packageDebugRenderscript UP-TO-DATE
        :CordovaLib:compileDebugRenderscript
        :CordovaLib:generateDebugResValues
        :CordovaLib:generateDebugResources
        :CordovaLib:packageDebugResources
        :CordovaLib:processDebugManifest
        :CordovaLib:generateDebugBuildConfig
        :CordovaLib:processDebugResources FAILED

        FAILURE: Build failed with an exception.

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

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

        BUILD FAILED

        Total time: 6.58 secs
        Error: cmd: Command failed with exit code 1 Error output:
        FAILURE: Build failed with an exception.

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

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

I guess the issue is with my setup or something. it cant be ionic issue.

Environment Variables

3

SDK Platforms

SDK TOOLS

Posts: 1

Participants: 1

Read full topic

ngClass with condition

$
0
0

@arsene123 wrote:

hello, here is my code :

<ion-item *ngFor="let m of messages | async">
        <div [ngClass]="{ 'from': m.from === 'bot','to':   m.from === 'user' }">
          <div class="chat-bubble">
            <p class="message">{{ m.msg }} </p>
          </div>
      </div>
    </ion-item>

possible to put css with *ngIf ?

Posts: 2

Participants: 2

Read full topic

inAppBrowser stopped working

$
0
0

@jcmag wrote:

My app uses the Cordova plugin inAppBrowser. I’ve updated my ionic & cordova environment; and updated cordova-plugin-inappbrowser to version 1.7.2

Now this line of code does nothing:
$cordovaInAppBrowser.open(targetPath, “_system”, { location: ‘no’, clearcache: ‘yes’, toolbar: ‘yes’, closebuttoncaption: $translate.instant(“SCAN.BACK”), EnableViewPortScale:‘yes’ });

I don’t get any error in the console (when I run the app using: ionic cordova run android -lc), and nothing happens…
How can I know what’s wrong?

Posts: 1

Participants: 1

Read full topic

IONIC typecscript changes not appearing on ios build on iphone

$
0
0

@sirsaula wrote:

I am having a weird issue occur i am using XCODE 9.1 and IONIC

cli packages: (/usr/local/lib/node_modules)

@ionic/cli-utils  : 1.15.1
ionic (Ionic CLI) : 3.15.1

global packages:

cordova (Cordova CLI) : 7.1.0

local packages:

@ionic/app-scripts : 3.1.2
Cordova Platforms  : ios 4.5.4
Ionic Framework    : ionic-angular 3.9.2

System:

Android SDK Tools : 25.2.5
ios-deploy        : 1.9.2
ios-sim           : 5.0.13
Node              : v6.9.4
npm               : 3.10.10
OS                : macOS Sierra
Xcode             : Xcode 9.1 Build version 9B55

However look at the typescript code i have in visual studio before running ionic cordova platform add ios

now look at the code that gets deploy to my iphone using safari debugger to view it… you see code changes are missing such as the this.initpush() . How can i resolve?

Posts: 1

Participants: 1

Read full topic

Page Does Not Pop Off Stack When Back Button Pressed

$
0
0

@PizzaStick wrote:

I am loading a webpage with an iFrame. When I click any links on the website in the iFrame then hit the ionic back button, the page doesn’t pop off to the page before. It stays on my iframePage but says undefined. How do I make it pop off the stack instead of stay on my iframePage?

Thanks

Posts: 1

Participants: 1

Read full topic

Can I matching fingerscan data with fingerscan data from tools finger?

$
0
0

@anggaerlangga wrote:

I want to build fingerscan authentication on ionic and authentication process will compare with fingerscan data from fingerscan devices with template standard ISO/IEC 19794-2:2005 & ANSI/INCITS 378:2004 … My question is can i compare / matching both of them ? If can, what the plugin who i need ? thank you.

Posts: 1

Participants: 1

Read full topic


Should i use Ionic for Web App?

$
0
0

@duannx wrote:

Hi, i am planing to use Ionic 3 to create a website.

As i know, if i use Ionic for website, the route would be a problem. I will have to handle many case of deeplinks to make the website work probperly but i think it is ok.
My consideration is: Is there any other issues that i didn’t know? I don’t want spend much time to build a website with Ionic then face some un-resolvable issuse.

Please share your experience. Any help would be appreciated. Many thanks!

Posts: 1

Participants: 1

Read full topic

Is there a way to show footer only on iphonex?

$
0
0

@rkhaili wrote:

Hello,

My app uses cards, and they are on a single page, scrollable.

The issue is with the new gestures/return to home on the iphonex, it actually clicks on the card and then goes back out to the home screen.

When I added an empty footer, it is fine and looks good. However, that shows up for all other devices - and messes up the experience there.

Or am I tackling this in the wrong way?

Because by default I do not use any footers.

Thanks.

Posts: 1

Participants: 1

Read full topic

Facebook camera filters clone application

$
0
0

@pendora7 wrote:

Hey ! I want to make an Ionic 2/3 application just like Facebook or Snapchat photo filters.
I need my app to change background, Add caps, mustache, beards etc.
What should i do or is there any library available for that ?

Posts: 1

Participants: 1

Read full topic

Explain why your app needs the user permission

'mergeDebugResources' isuue

$
0
0

@flycoders_sourav wrote:

when i’m try to build my app showing this error.

        FAILURE: Build failed with an exception.

        * What went wrong:
        Execution failed for task ':mergeDebugResources'.
        > Error: Failed to crunch file
        E:\IONIC_2\ionstore2\app\platforms\android\build\intermedia
tes\exploded-aar\com.google.android.gms\play-services-base\11.2.2\res\drawable-x
xhdpi-v4\common_google_signin_btn_icon_light_normal_background.9.png

ionic info:

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


    @ionic/cli-utils  : 1.19.0
    ionic (Ionic CLI) : 3.19.0

System:

    Node : v8.6.0
    npm  : 5.5.1
    OS   : Windows 7

Misc:

    backend : pro

please guide me.

Posts: 1

Participants: 1

Read full topic

setRoot() deletes Session Cookies

$
0
0

@felix9607 wrote:

I sadly found out, that Session Cookies get deleted, if you use navCtrl.setRoot().

This is a Problem for me, because I Need them for futher XHR.
I think it makes sense the set the new Root after the Login page (where I execute an external <form> to get the Session-Cookie) to the Home Page, else you navigate with the devices back Buttons back to the Login and that feels bad (and a few other situations).

Btw will the Http Native Plugin use Session Cookies of an other Domain (not localhost:8100) to Access the same Domain?

Any Suggestion or tipps? :slight_smile:

Posts: 1

Participants: 1

Read full topic

Bash: ionic: command not found after unsuccessful update of Ionic CLI

$
0
0

@jmmaguigz wrote:

Hello after running ionic cordova build --release android and after unsuccessful update Ionic CLI message bash: ionic: command not found has appeared. I tried ionic -v and ionic info but same result.

Posts: 1

Participants: 1

Read full topic


Upload Image using Rest api

$
0
0

@vnyksj wrote:

Hi all,

I am trying to upload an Image to the server using rest api, I followed couple of docs for this like, this one and this one But no matter what I try, I end up with status code 500, I checked it in rest client whether the service is working fine or not and its working perfectly there, only if I didn’t add the image then it throws me status code 500. I want some thing like this below in the request payload to work it properly .

------WebKitFormBoundaryJDEAxq1EUq1a6g4W
Content-Disposition: form-data; name="image"; filename="3DView.png"
Content-Type: image/png


------WebKitFormBoundaryJDEAxq1EUq1a6g4W--

Please help me out guys, I’m trying from last 3 days…

Posts: 1

Participants: 1

Read full topic

Multi select list item

$
0
0

@dipankar123 wrote:

hi guys,
i am new in ionic 2,
i have created a list using

<div style="height:40%; overflow-y: scroll">
      <h5 *ngFor="let item of array" ion-item>
        <div style="float:left; width:20%"> {{item.empID}}</div>
        <div style="float:left; width:40%">{{item.empName}}</div>
        <div style="float:left; width:40%">{{item.status}}</div>
      </h5>
    </div>

now i want to use gmail style multiple select list item on holding a list item
now i have this:


want this type select list item on holding a list item

Posts: 1

Participants: 1

Read full topic

AppPreferences async operation

$
0
0

@HamdySdiri wrote:

I store a value on the service provider and then I get it from a component by using AppPreferences plugin.
the problem is async operation.

fetchKeysAppPreferences(){
  this.appPreferences.fetch("key1").then(
    (res) => {
        this.key.push(JSON.parse(res));
        console.log(this.key); //is definded
        return this.key;
      }
   );
   console.log(this.key); // undefined
}

I called the fetchKeysAppPreferences() from the home component. I get undefinded value because the async operation. How can I resolve this problem?

Posts: 1

Participants: 1

Read full topic

Display Home Page only after all data is loaded

$
0
0

@Vartex05 wrote:

Hi, i mhave problem in my app, when i run it, the splash screen shows, and when it hides and HomePage shows up, data(on this data depends some ngIf and NgFor) in Home Page are not already loaded. After a short moment, data shows too, but it just feel weird. Is there any way i can show home page AFTER everything is loaded and ready?

Posts: 1

Participants: 1

Read full topic

Having issues with Instance Variabled

$
0
0

@Mwzeyxaexia wrote:

Hi guys, I am so confused.
this is my second Ionic application and its really killing me cause i don’t know what i am doing wrong.

this is my TS class
import { Component } from ‘@angular/core’;
import { IonicPage, NavController, NavParams } from ‘ionic-angular’;
import { Storage } from ‘@ionic/storage’;
import {AppEngineProvider} from ‘…/…/providers/app-engine/app-engine’;
import ‘rxjs/Rx’;

/**

@IonicPage()
@Component({
selector: ‘page-orders’,
templateUrl: ‘orders.html’,
})
export class OrdersPage {
public Orders:any;
public userid:any;
public clientid:any;

constructor(public navCtrl: NavController, public navParams: NavParams,public storage:Storage,public engine:AppEngineProvider) {

}

ionViewDidLoad(){
console.log(‘ionViewDidLoad OrdersPage’);
this.getorders();
console.log(“orders”+this.Orders); this returns undefined

}

getorders(){
this.storage.ready().then(() => {
this.storage.get(‘user’).then((data)=>{
let dataz=JSON.parse(JSON.stringify(data));
let userid=dataz[0].user_id;
let clientid=dataz[0].workingfor;
this.engine.getorders(userid,clientid).subscribe(data=>{
this.Orders=data;
console.log(this.Orders); this logs the data
});
});
});

}

}

Posts: 1

Participants: 1

Read full topic

Viewing all 49110 articles
Browse latest View live


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