Quantcast
Channel: Ionic Forum - Latest topics
Viewing all 70932 articles
Browse latest View live

"ionic cordova build android" Error

$
0
0

@jjnimes wrote:

I’m receiving this error whenever I’m building the app for android.

BUILD FAILED

        Total time: 47.188 secs
        Error: cmd: Command failed with exit code 1 Error output:
        C:\[APP_PATH]\platforms\android\src\com\synconset\cordovahttp\CordovaHttpPlugin.java:68:
        error: constructor CordovaHttpPatch in class CordovaHttpPatch cannot be applied to given types;
                     CordovaHttpPatch patch = new CordovaHttpPatch(urlString, params, serializerName, headers,
        callbackContext);
                                              ^
           required: String,JSONObject,String,JSONObject,CallbackContext,int
           found: String,JSONObject,String,JSONObject,CallbackContext
           reason: actual and formal argument lists differ in length
        Note: Some input files use or override a deprecated API.
        Note: Recompile with -Xlint:deprecation for details.
        Note: Some input files use unchecked or unsafe operations.
        Note: Recompile with -Xlint:unchecked for details.
        1 error

        FAILURE: Build failed with an exception.

        * What went wrong:
        Execution failed for task ':compileDebugJavaWithJavac'.
        > Compilation failed; see the compiler error output for details.

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

Here is my ionic info:

cli packages: (C:\[USER_PATH]\AppData\Roaming\npm\node_modules)

    @ionic/cli-utils  : 1.12.0
    ionic (Ionic CLI) : 3.12.0

global packages:

    cordova (Cordova CLI) : 7.0.1

local packages:

    @ionic/app-scripts : 2.1.4
    Cordova Platforms  : android 6.2.3
    Ionic Framework    : ionic-angular 3.6.1

System:

    Node : v8.4.0
    npm  : 5.3.0
    OS   : Windows 10

Misc:

    backend : pro

My plugins:


cordova-plugin-advanced-http 1.5.10 "Advanced HTTP plugin"
cordova-plugin-compat 1.0.0 "Compat"
cordova-plugin-console 1.0.5 "Console"
cordova-plugin-device 1.1.4 "Device"
cordova-plugin-file 4.3.3 "File"
cordova-plugin-googlemaps 2.0.11 "cordova-plugin-googlemaps"
cordova-plugin-splashscreen 4.0.3 "Splashscreen"
cordova-plugin-statusbar 2.2.2 "StatusBar"
cordova-plugin-whitelist 1.3.1 "Whitelist"
ionic-plugin-keyboard 2.2.1 "Keyboard"

What could be the possible reason/s for this error?

Posts: 1

Participants: 1

Read full topic


Config files for dev and prod, out of repo, for Ionic Pro

$
0
0

@imaatLuciano wrote:

Hi.

I used to have a src/config/config.ts.sample in my repo and in .gitignore a line with src/config/config.ts, so after cloning a project a developer just needed to copy config.ts.sample => config.ts and that’s it, you could have env / prod vars depending on your needs (when building, we just replaced that file with prod values). In Pro (I’ve signed for the paid plan this week), since you have a new repo tu push and it builds from there (unlike before, where ionic upload used to upload the entire project, including the current config.ts), I can’t use this approach anymore. This is because Ionic Pro performs a git checkout and builds from there, instead of the uploaded project, so config.ts won’t exist and fail.

You can’t do a “file exists” with javacsript, so it’s not possible/reliable to try to load a config file in not async mode (and it’s not the purpose either in new standards) and overwrite variables.

I’d like to read suggestions on how do you guys deal with this :slight_smile:

Thanks!

Posts: 1

Participants: 1

Read full topic

Why "Go" instead of "Next" on keyboard?

$
0
0

@kbezold wrote:

For some reason my ionic 3 app started showing “Go” instead of “Next” on the virtual keyboard on my Samsung S7 Edge. It is doing this for all of the ion-input fields on all of the pages. All of the pages have multiple ion-input fields and it used to move to the next field as expected, but now it doesn’t. Some ion-input fields are of type “text” some are of type “tel”.

The ion-textarea has a return button as expected.

Here are the images with the undesirable “Go” keys:
40

26

Other devices and even the emulators display the “Next” button as desired instead of this “Go” button.

Here are some images from the emulator that show what is expected:
Screenshot_1507427187

Screenshot_1507427177

Why is this happening on the Samsung S7 Edge?

Thanks

Posts: 1

Participants: 1

Read full topic

Ionic page not shown properly after print-preview

$
0
0

@RehanHassan wrote:

I’m using this plugin Html-To-Printer in my ionic project. I have two pages. PageA and PageB.

1- First i push PageA
2- Then i push PageB
3- On PageB i press print button which shows me print preview
4- i close the print preview
5- press back from PageB, my page is cut from above, its not shown completely.

Following are the screenshots.

1- Push PageB
image

2- Press Print
image

3- Either save or cancel, its same after returning

4- PageA text is hidden
image

I’ve checked the page’s css by inspecting element, i found that before showing print-preview, page has margin-top: 56px

but when i return from PageB after showing preview, the top-margin of the page is gone.

When i close the print-preview, the CSS properties are removed.

Kindly, check it. Need Help !!!

Posts: 1

Participants: 1

Read full topic

Way to create new channels via CLI?

$
0
0

@rlabs wrote:

I have a project for which I want to create hundreds of channels. Is there a way to create these via CLI and not the dashboard UI?

Using Ionic Pro

Posts: 1

Participants: 1

Read full topic

Can we increase the width of alert button

Tengo un error a la hora de compilar con la consola

$
0
0

@OpsGamer wrote:

tengo este error luego de colocar: ionic cordova build android

Using cordova-fetch for cordova-android@^6.2.3
Error: Failed to fetch platform cordova-android@^6.2.3
Probably this is either a connection problem, or platform spec is incorrect.
Check your connection and platform name/version/URL.
Error: cmd: Command failed with exit code ENOENT

tengo todo completo pero este es el único error que tengo el cual no puedo solucionar y no se como hacerlo,
pido ayuda poder compilar mi aplicación por medio de la consola o símbolo del sistema
les agradecería que e ayudaran a solucionarlo
muchas gracias por su atencion

Posts: 1

Participants: 1

Read full topic

How to run ionic app on android

$
0
0

@imsteve wrote:

Hello everyone i am new to ionic framework i don’t know how to run ionic app on my android device

Posts: 2

Participants: 2

Read full topic


Input getting hidden if we use it in slides

Lazy loading and providers

$
0
0

@reedrichards wrote:

Hi,

Right now, while using lazy loading, I load all my providers in app.module.ts which I guess isn’t maybe the best strategy because this won’t speed up my app boot time, specially because I’ve got something like 50 custom providers (don’t judge me :wink: ).

Therefore I’m asking my self if I should really load all of them for my all app or if I should load them only where I only use them? How are you guyz solving this?

Furthermore, in case I should better not load them for the all app, it’s not clear for me all to solve following:

Let say I’ve got three pages (A,B and C) with their own modules and three providers (1,2 and 3).

A use 1
B use 1, 2, 3
C use 1, 2

I guess, since 1 is use across all the app, I would have to declare it in app.module.ts
Since 3 is only use in page B, I guess I would have to only declare it in B.module.ts

But what about 2. How could I declare it in both B.module.ts and C.module.ts with the goal to share the same provider “memory” (if the provider contains a value, both B and C should see the same object), respectively how I would code that? Simply by injecting the provider “as usual” and angular do the rest?

Thx in advance for any help, would really be appreciated

Posts: 3

Participants: 2

Read full topic

How to use with dynamic values

$
0
0

@balasivagnanam wrote:

I have values fetched from my REST APIs which need to be shown as multiple categories inside the view. So I am trying to use ion-segment, I managed to fetch the values as segments but I am not able to make them show and hide when I click them. With my code, both of them are not shown when I click any of them.

<ion-segment [(ngModel)]="selectedIdx" color="primary">
        <ion-segment-button (click)="changeMenus(i)" [value]="i" *ngFor="let team of teams; let i = index">
          {{team.teamname}}
        </ion-segment-button>
      </ion-segment>

      <div [ngSwitch]="selectedIdx" *ngFor="let team of teams">
          <ion-list *ngSwitchCase="team[i]">
            <ion-item>
              <h2>{{team.teamname}}</h2>
            </ion-item>
          </ion-list>
        </div>
  changeMenus(index:number)
  {
      this.selectedIdx=index;
  }

Posts: 1

Participants: 1

Read full topic

Blank screeen on Andoid app

$
0
0

@cipriancirstea wrote:

Hello,

First time Ionic user. I have an Angular 2 app which I’ve been trying to migrate to Ionic. Everything is OK, but today after building the app with using these instructions: http://ionicframework.com/docs/intro/deploying/ I installed it on a Samsung S7 running Android 7.0 and an S5 with 6.0.1.
Running it showed a splash screen and then a blank white screen. If I do ionic serve it runs great in the browser.

How can this be fixed?

I read that installing cordova crosswalk helped with version 4.1 … but that doesn’t seem applicable in my case.

config.xml

<preference name="ScrollEnabled" value="false" />
<preference name="android-minSdkVersion" value="16" />
<preference name="webviewbounce" value="false" />
<preference name="UIWebViewBounce" value="false" />
<preference name="DisallowOverscroll" value="true" />
<preference name="BackupWebStorage" value="none" />
<preference name="SplashMaintainAspectRatio" value="true" />
<preference name="FadeSplashScreenDuration" value="300" />
<preference name="ShowSplashScreen" value="false" />
<preference name="SplashShowOnlyFirstTime" value="false" />
<preference name="SplashScreen" value="screen" />
<preference name="SplashScreenDelay" value="3000" />

package.json

“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/splash-screen": “4.3.0”,
"@ionic-native/status-bar": “4.3.0”,
"@ionic/storage": “2.0.1”,
“angularfire2”: “^5.0.0-rc.1”,
“cordova-android”: “^6.2.3”,
“cordova-ios”: “^4.5.1”,
“cordova-plugin-device”: “^1.1.4”,
“cordova-plugin-ionic-webview”: “^1.1.14”,
“cordova-plugin-splashscreen”: “^4.0.3”,
“cordova-plugin-statusbar”: “git+https://github.com/apache/cordova-plugin-statusbar.git”,
“cordova-plugin-whitelist”: “^1.3.1”,
“firebase”: “^4.5.0”,
“ionic-angular”: “3.7.1”,
“ionic-plugin-keyboard”: “^2.2.1”,
“ionicons”: “3.0.0”,
“rxjs”: “5.4.3”,
“sw-toolbox”: “3.6.0”,
“zone.js”: “0.8.18”
},

Posts: 1

Participants: 1

Read full topic

Ionic framework developer license & creator

$
0
0

@thecurtis wrote:

Hi guys!

I just came across the ionic framework and I am fascinated!
I want to start working with it but I have some questions. Maybe you can help me out :slight_smile:

What kind of creator license is included with the ionic framework developer license? ( the Basic or Pro?)

Do you suggest working with the creator?

Sorry if my english isn’t that good. I hope you will understand the questions :smile:

Thanks,
Curtis

Posts: 1

Participants: 1

Read full topic

Lazy loading 3rd party component in loaded page

$
0
0

@mnzl16 wrote:

The app working when i run ionic cordova run android --device but gives error when i try ionic cordova run android --prod --release

I am trying use ng2-qrcode into my lazy loaded page

Error: Unexpected value ‘QRCodeComponent in D:/qrstore/node_modules/ng2-qrcode/dist/ng2-qrcode.d.ts’ declared by the module ‘ItemDetailPageModule in
D:/qrstore/src/pages/item-detail/item-detail.module.ts’. Please add a @Pipe/@Directive/@Component annotation.
at Error (native)
at syntaxError (D:\qrstore\node_modules@angular\compiler\bundles\compiler.umd.js:1729:34)
at D:\qrstore\node_modules@angular\compiler\bundles\compiler.umd.js:15625:40
at Array.forEach (native)
at CompileMetadataResolver.getNgModuleMetadata (D:\qrstore\node_modules@angular\compiler\bundles\compiler.umd.js:15607:54)
at addNgModule (D:\qrstore\node_modules@angular\compiler\bundles\compiler.umd.js:24403:58)
at D:\qrstore\node_modules@angular\compiler\bundles\compiler.umd.js:24414:14
at Array.forEach (native)
at _createNgModules (D:\qrstore\node_modules@angular\compiler\bundles\compiler.umd.js:24413:26)
at analyzeNgModules (D:\qrstore\node_modules@angular\compiler\bundles\compiler.umd.js:24288:14)

ionic info
@ionic/cli-utils : 1.12.0
ionic (Ionic CLI) : 3.12.0

global packages:

cordova (Cordova CLI) : 7.0.1

local packages:

@ionic/app-scripts : 3.0.0
Cordova Platforms  : android 6.2.3
Ionic Framework    : ionic-angular 3.7.1

System:

Android SDK Tools : 25.2.3
Node              : v6.9.4
npm               : 3.10.8
OS                : Windows 10

Misc:

backend : pro

item detail module

import { NgModule } from '@angular/core';
import { IonicPageModule } from 'ionic-angular';
import { ItemDetailPage } from './item-detail';
import { HttpModule, Http } from '@angular/http';

//native
import { File } from '@ionic-native/file';
import { FilePath } from '@ionic-native/file-path';
import { SQLite } from '@ionic-native/sqlite';

//providers
import { ItemsProvider, LabelsProvider, SQLiteDatabaseProvider } from '../../providers/providers';

//components
import { ItemCreatePage } from '../item-create/item-create';
import { QRCodeComponent } from 'ng2-qrcode'

//directive
import { AbsoluteDragDirective } from '../../directives/absolute-drag/absolute-drag';

@NgModule({
  declarations: [
    ItemDetailPage,
    QRCodeComponent,
    AbsoluteDragDirective
  ],
  imports: [
    IonicPageModule.forChild(ItemDetailPage),
    HttpModule
  ],
  exports: [
    ItemDetailPage
  ],
  entryComponents: []
  ,
  providers:[
    ItemsProvider,
    SQLite,
    SQLiteDatabaseProvider,
    File,
    FilePath
  ]
})
export class ItemDetailPageModule {}

Posts: 1

Participants: 1

Read full topic

A workable solution for pinch and zoom images on pages

$
0
0

@danzac wrote:

Since I had a hard time finding a simple solution, I thought I should post How i worked out this issue.

  1. In your page, use the drag and drop to insert your image.
  2. Click on the image and choose “convert to html” convert it.
  3. In the resulting html wrap it with the following code:
<ion-scroll zooming="true" direction="xy"> </ion-scroll>

It’s not pretty, but it does the job.

Posts: 1

Participants: 1

Read full topic


Underline spelling errors

$
0
0

@bmagne wrote:

Hi !

I am facing a problem with the spellchek html attribute, but when there is a spelling mistake, the word is not underlined in red, here is how i made :

        <ion-row>
            <ion-col col-sm-6 offset-sm-3>
                <ion-list>
                    <ion-item no-lines>
                        <ion-textarea autocorrect="on" autocomplete="on" spellcheck="on" class="evaluation-comment" [(ngModel)]="comment" placeholder="..."></ion-textarea>
                    </ion-item>
                </ion-list>
            </ion-col>
        </ion-row>

The error is found, i can click on it and a correction is proposed but the word is not underlined in red.

Thanks in advance,

Ben

Posts: 1

Participants: 1

Read full topic

Error when i build project ionic 3

Dashboard.ionicjs.com Build Failed

$
0
0

@pyav wrote:

I’ve got Build Failed.

Can you add feature “retry” ?

Had go back, add useless fake changes, commit and push.

May be any solutions, how manage such cases more easy?

Posts: 1

Participants: 1

Read full topic

Ionic TranslateService http.get

$
0
0

@nogstudio wrote:

Hi. I’ve just finished to translate all my app in multiple languages and now I want to get the specific content for each language but it doesn’t work and I don’t know why.
Here is my code.

  import { TranslateService } from '@ngx-translate/core';
 public dblanguage;
  constructor(private translate: TranslateService)
  {
  this.translate.get('Language.db').subscribe(translated => {
   this.dblanguage = translated;
  });
  this.http.get('https://www.url.com/app.php?lang='this.dblanguage)
  .map(res => res.json())
  .subscribe(data => {
        this.posts = data;
    },
    err => {
        //
    });

  }
  navigate(link)
   {
     this.navCtrl.push(PlaytestPage,{
     url: link,
     lang: this.dblanguage
    })
    }

Something is wrong but I can’t figure out what!
Thank you!

Edit: It seems that this is not working on first tab land. If I use this on the second tab is working. But one thing is also not working. The http.get is not updating after I change the language from my account only the images where I have pic_{{‘Language.db’ | translate}}.jpg ( language.db = en, es, pt )

Posts: 1

Participants: 1

Read full topic

Ionic InAppBrowser hide the toolbar

Viewing all 70932 articles
Browse latest View live


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