Quantcast
Channel: Ionic Forum - Latest posts
Viewing all 228532 articles
Browse latest View live

Ionic Android 5.1.1 SyntaxError: Use of const in strict mode

$
0
0

I can find in my GIT history that I had to do 2 things to solve issues with old Android phones:

  • change new Headers({'Content-Type': 'application/json'}) to new HttpHeaders().set('Content-Type', 'application/json');
  • create a new project using the /src folder

Ionic 4.6 - Carbon

$
0
0

So enhancement states we can gain some free performance?:slight_smile:

When i am building Ionic 4 for android and running the build on android studio 3.4.1 , it gave me error?

$
0
0

means when i am running the command “ionic cordova build android” then i am running into the android studio it is not running on android studio.

Cannot find type definition file for '@types'

$
0
0

Better still, you can use the latest app scripts still if you add this to your tsconfig.json file:

{
  "compilerOptions": {
    ...
    "types": [
      "node"
    ]
  },
  ...
}

This might depend on your project @types but give it a go, worked for me.

How to display image(taking with camera) on canvas (signature pad)

Position: sticky doesnt work for element inside

$
0
0

I have implemented a table, which is very wide (much wider than the screen), and the user can scroll horizontally.

At the far left, is a task-row component which has an element with a “sticky” header (.task-row_main class), which doesnt move when scrolling horizontally, by using the css `position: sticky .

.task-row_main {
    display: flex;
    align-items: center;
    max-width: 230px;
    flex-shrink: 1;
    flex-grow: 1;
    position: -webkit-sticky;
    position: sticky;
    left: 1px;
}

When I add my task-row component into ion-item , the sticky header breaks, and I cannot figure out how to get around this.

<ion-item>
    <task-row>
    </task-row>
</ion-item>

How do I make it so that position: sticky works for element inside an <ion-item>?

Translation custom loader CORS issue when reading from data directory

$
0
0

I have no idea, but have you checked that res is actually in json format? Maybe you need to use parse? JSON.parse(res)?

Ionic app android build failure and environment version mismatch

$
0
0

Hi all, We have an Ionic web and mobile application we were using node 6 earlier and then we updated to node 10.16.0 and updated ionic, cordova environment also, now the problem is my project is not building neither dev nor prod for android platform. I think there is some version mis-match which I am unable to figure out. I’ve attached my ionic info screenshot. can someone help me how do I fix this? I also tried to remove and add android platform , node-modules, package-lock.json nothing is wokring… Or should I leave configuring environment to build ionic 3 app and migrate my existing ionic 3 app to ionic 4?

Ionic info:

Ionic:

Ionic CLI : 5.1.0 (/usr/local/lib/node_modules/ionic)
Ionic Framework : ionic-angular 3.3.0
@ionic/app-scripts : 3.2.4

Cordova:

Cordova CLI : 8.1.2 (cordova-lib@8.1.1)
Cordova Platforms : android 6.4.0
Cordova Plugins : no whitelisted plugins (23 plugins total)

Utility:

cordova-res : not installed
native-run : not installed

System:

NodeJS : v10.16.0 (/usr/local/bin/node)
npm : 6.9.0
OS : macOS High Sierra
Xcode : Xcode 9.2 Build version 9C40b


Execution failed for task ':app:fabricGenerateResourcesDebug'. ionic 4

$
0
0

Hi everyone,
I want to create .apk file but I get this error.

BUILD FAILED in 15s
27 actionable tasks: 4 executed, 23 up-to-date
C:\Users\tagi.a\desktop\maximum-app\platforms\android\gradlew: Command failed with exit code 1 Error output:
FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:fabricGenerateResourcesDebug'.
> Crashlytics Developer Tools error.

* 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 15s
[ERROR] An error occurred while running subprocess cordova.

        cordova.cmd build android exited with exit code 1.

        Re-running this command with the --verbose flag may provide more information.

My project.properties

target=android-28
android.library.reference.1=CordovaLib
android.library.reference.2=app
cordova.system.library.1=com.android.support:support-annotations:+
cordova.system.library.2=com.google.android.gms:play-services-base:+
cordova.system.library.3=com.google.android.gms:play-services-ads:+
cordova.gradle.include.1=cordova-plugin-firebase/news-build.gradle
cordova.system.library.4=com.google.android.gms:play-services-tagmanager:+
cordova.system.library.5=com.google.firebase:firebase-core:+
cordova.system.library.6=com.google.firebase:firebase-messaging:+
cordova.system.library.7=com.google.firebase:firebase-config:+
cordova.system.library.8=com.google.firebase:firebase-perf:+

IONIC INFO

Ionic:

   Ionic CLI                     : 5.0.2 (C:\Users\tagi.a\node_modules\ionic)
   Ionic Framework               : @ionic/angular 4.5.0
   @angular-devkit/build-angular : 0.13.9
   @angular-devkit/schematics    : 7.3.9
   @angular/cli                  : 7.3.9
   @ionic/angular-toolkit        : 1.5.1

Capacitor:

   Capacitor CLI   : not installed
   @capacitor/core : not installed

Cordova:

   Cordova CLI       : 9.0.0 (cordova-lib@9.0.1)
   Cordova Platforms : android 8.0.0
   Cordova Plugins   : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 4.1.0, (and 6 other plugins)

Utility:

   cordova-res : not installed
   native-run  : 0.2.6

System:

   Android SDK Tools : 26.1.1 (C:\Users\tagi.a\AppData\Local\Android\Sdk)
   NodeJS            : v10.15.3 (C:\Program Files\nodejs\node.exe)
   npm               : 6.9.0
   OS                : Windows 10

Ionic app android build failure and environment version mismatch

$
0
0

Hi,

try to update npm:

npm i npm

install node_modules packages for your project (delete the folder node_modules first):

npm i

You might need to remove android platform and add it again:

ionic cordova platform rm android

then add:

ionic cordova platform add android

good luck

Are you waiting for Ionic Vue 1.0?

$
0
0

I have been using Vue for 2 years now, and I don’t want to go back to Angular for my next Ionic App as Ionic Vue is not quite ready for production yet.

Ionic React is on a good way to 1.0 but Ionic Vue is still on in alpha and according to Mike in The Ionic Show of June 12th 2019 :

[Vue] is the least on the priority list for us.

So if you are also waiting for Ionic Vue stable release, express yourself and show this post some love with a :heart: so the Ionic team can raise priority for Vue !

How to check if Filesystem functions are working?

$
0
0

I figured out how to do this. If you are copying files to the FilesystemDirectory.Data area, then in Android Studio you can see them by doing this:

  • Connect your device to your computer
  • Open View -> Tool Windows -> Device File Explorer
  • Go to data / data / <yourappid> / files

You can even download them to your computer and view them there, if you want.

Hope this helps someone.

Providers in ionic 3 ||can anyone help me out ||use of

$
0
0

use of export class User
`import { Injectable } from ‘@angular/core’;

export class User {
id: number;
name: string;
}

@Injectable({
providedIn: ‘root’,
})
export class UserService {

constructor() { }

getUsers(): Promise<User> {
return Promise.resolve([
{ id: 1, name: ‘Maria’ },
{ id: 2, name: ‘Alex’ },
{ id: 3, name: ‘Chuntao’ },
{ id: 4, name: ‘Béatrice’ },
{ id: 5, name: ‘Sarah’ },
{ id: 6, name: ‘Andrés’ },
{ id: 7, name: ‘Abdul’ },
{ id: 8, name: ‘Pierre’ },
{ id: 9, name: ‘Jiao’ },
{ id: 10, name: ‘Seth’ }
]);
}

}

/*
Copyright Google LLC. All Rights Reserved.
Use of this source code is governed by an MIT-style license that
can be found in the LICENSE file at http://angular.io/license
*/`

Ionic app android build failure and environment version mismatch

$
0
0

Thanks for your response, I’ve already tried it but din’t work… Can you please provide any other solution?

Ionic app android build failure and environment version mismatch

$
0
0

capture the error message and post it here


PWA - How to access Cordova plugins in PWA web applications ?

$
0
0

And If I want firebase serve?
Is there a way to include the Cordova ?
I need for camera, google maps … local notifications would be great

Background image cant show in device android marshmallow? IONIC 4

$
0
0

I successfully displayed the background image in another device. but on android 6 it doesn’t work. Help me someone. Thank you in advance

Execution failed for task ':app:fabricGenerateResourcesDebug'. ionic 4

$
0
0

Remove cordova-plugin-firebase

download the Firebase SDK config for test project (which is required to make the build succeed)

curl https://raw.githubusercontent.com/dpa99c/cordova-plugin-firebase-test/master/www/google-services.json -o google-services.json

add the latest cordova-android platform (v8.0.0)

cordova platform add android@latest

add my fork of this plugin

cordova plugin add cordova-plugin-firebasex

add plugin to enable AndroidX in the project

cordova plugin add cordova-plugin-androidx

add plugin to patch existing plugin source that uses the Android Support Library to use AndroidX

cordova plugin add cordova-plugin-androidx-adapter

build!

cordova build android

Execution failed for task ':app:fabricGenerateResourcesDebug'. ionic 4

$
0
0

I get this error now:

Failed to capture fingerprint of input files for task ':app:preDebugBuild' property 'compileManifests' during up-to-date check.
> The library com.google.android.gms:play-services-base is being requested by various other libraries at [[11.0.4,11.0.4]], but resolves to 17.0.0. Disable the plugin and check your dependencies tree using ./gradlew :app:dependencies.

Horizontal scrolling grid

$
0
0

It works! But if you use overflow-x: visible!important; the scrollbar is not visible if it is not necessary.

overflow-x: visible!important;

Thank you!

Viewing all 228532 articles
Browse latest View live


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