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

Ionic HTTP POST reply net::ERR_NAME_NOT_RESOLVED

$
0
0

@nomanshah wrote:

My Ionic Info is below:

cli packages: (C:\Windows\System32\node_modules)

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

global packages:

cordova (Cordova CLI) : not installed

local packages:

@ionic/app-scripts : 3.1.11
Cordova Platforms  : android 7.0.0 browser 5.0.4
Ionic Framework    : ionic-angular 3.9.2

System:

Android SDK Tools : 26.1.1
Node              : v8.11.3
npm               : 6.3.0
OS                : Windows 7

Hi, I have built an app and it is working fine on the browser. But on the mobile I am getting this error, screenshot is below.

Below is the reply on the browser which is working fine.

  1. I have restarted my phone.
  2. I have cleared the app memory.
  3. My config.xml is below.

The reply from the server is below.

**"HTTP/1.1 200 OK\r\nContent-Type: text/plain\r\nContent-Length: 10\r\nAccess-Control-Allow-Origin: \r\nAccess-Control-Allow-Headers: \r\n\r\n" + ipStr + “”;

As you can see, i have the Access Control Allow Origin there also.
Please help as I cant seem to solve the problem.

Posts: 1

Participants: 1

Read full topic


Convert a service provider

$
0
0

@blondie63 wrote:

Hi all,
I need to convert a service provider that use Http to HttpClient, some one can help me? also for fee…
Please contact me in private

Posts: 1

Participants: 1

Read full topic

Problem with build android after add plugin-firebase-dynamiclinks

$
0
0

@ahmadklsany wrote:

hello everyone
i have problem with build android after add cordova-plugin-firebase-dynamiclinks
i don’t have any idea about this problem
help please

this is problem

D:\ionic\basabiso>ionic cordova build android

ionic-app-scripts build --target cordova --platform android
[10:47:01] ionic-app-scripts 3.2.0
[10:47:01] build dev started …
[10:47:01] clean started …
[10:47:01] clean finished in 8 ms
[10:47:01] copy started …
[10:47:01] deeplinks started …
[10:47:01] deeplinks finished in 37 ms
[10:47:01] transpile started …
[10:47:14] transpile finished in 12.34 s
[10:47:14] preprocess started …
[10:47:14] preprocess finished in 1 ms
[10:47:14] webpack started …
[10:47:14] copy finished in 13.51 s
[10:47:24] webpack finished in 9.95 s
[10:47:24] sass started …
[10:47:27] sass finished in 3.71 s
[10:47:27] postprocess started …
[10:47:27] postprocess finished in 11 ms
[10:47:27] lint started …
[10:47:27] build dev finished in 26.49 s
[10:47:33] lint finished in 6.08 s
cordova build android
cordova-android-support-gradle-release: Android platform: cordova-android@7
cordova-android-support-gradle-release: Wrote custom version ‘27.+’ to D:\ionic\basabiso\platforms\android\app\build.gradle
cordova-android-support-gradle-release: Wrote custom version ‘27.+’ to D:\ionic\basabiso\platforms\android\app\cordova-android-support-gradle-release\properties.gradle
Android Studio project detected
cordova-android-support-gradle-release: Android platform: cordova-android@7
cordova-android-support-gradle-release: Wrote custom version ‘27.+’ to D:\ionic\basabiso\platforms\android\app\build.gradle
cordova-android-support-gradle-release: Wrote custom version ‘27.+’ to D:\ionic\basabiso\platforms\android\app\cordova-android-support-gradle-release\properties.gradle
Preparing Firebase on Android
ANDROID_HOME=C:\Users\ahmadklsany\AppData\Local\Android\sdk
JAVA_HOME=C:\Program Files\Java\jdk1.8.0_91
studio
Subproject Path: CordovaLib
Subproject Path: app
publishNonDefault is deprecated and has no effect anymore. All variants are now published.
Configuration ‘compile’ in project ‘:app’ is deprecated. Use ‘implementation’ instead.
±----------------------------------------------------------------
| cordova-android-support-gradle-release: 27.+
±----------------------------------------------------------------
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_b35xubhbwry0787n2j1bzz2ig.run(D:\ionic\basabiso\platforms\android\app\build.gradle:169)

FAILURE: Build failed with an exception.

  • Where:
    Script ‘D:\ionic\basabiso\platforms\android\cordova-support-google-services\basabiso-build.gradle’ line: 16

  • What went wrong:
    A problem occurred evaluating project ‘:app’.

Failed to apply plugin [class ‘com.google.gms.googleservices.GoogleServicesPlugin’]
Cannot add extension with name ‘googleServices’, as there is an extension already registered with that name.

  • 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 2s
(node:3548) UnhandledPromiseRejectionWarning: Error: cmd: Command failed with exit code 1 Error output:
FAILURE: Build failed with an exception.

  • Where:
    Script ‘D:\ionic\basabiso\platforms\android\cordova-support-google-services\basabiso-build.gradle’ line: 16

  • What went wrong:
    A problem occurred evaluating project ‘:app’.

Failed to apply plugin [class ‘com.google.gms.googleservices.GoogleServicesPlugin’]
Cannot add extension with name ‘googleServices’, as there is an extension already registered with that name.

  • 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 2s
at ChildProcess.whenDone (D:\ionic\basabiso\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)

ionic info :

Ionic:

ionic (Ionic CLI) : 4.1.2 (C:\Users\ahmadklsany\AppData\Roaming\npm\node_modules\ionic)
Ionic Framework : ionic-angular 3.9.2
@ionic/app-scripts : 3.2.0

Cordova:

cordova (Cordova CLI) : 8.0.0
Cordova Platforms : android 7.0.0
Cordova Plugins : cordova-plugin-ionic-keyboard 2.1.2, cordova-plugin-ionic-webview 2.1.3, (and 15 other plugins)

System:

Android SDK Tools : 25.2.3 (C:\Users\ahmadklsany\AppData\Local\Android\sdk)
NodeJS : v8.11.4 (C:\Program Files\nodejs\node.exe)
npm : 5.6.0
OS : Windows 10

thanks :slightly_smiling_face:

Posts: 1

Participants: 1

Read full topic

Compatible node/npm versions

$
0
0

@ChristianStr wrote:

Hey,

I lately updated homebrew and now my build is breaking.

When I do “ionic cordova build ios” the build is stopping at “lint finished” and I am getting no error.
(Please see attachment below).
Therefore I am thinking the issue was caused by the update.

My versions:
Ionic: 3.20.0
Cordova: 7.1.0
Node: v8.12.0
npm: 6.4.1

Which version do I need to change to make it work again?

Would mean a lot if someone could help me because I found nothing on the internet regarding this problem.
Thanks in advance. (Sorry for the bad English)

[11:37:02]  build dev started ... 
[11:37:02]  clean started ... 
[11:37:02]  clean finished in 3 ms 
[11:37:02]  copy started ... 
[11:37:02]  deeplinks started ... 
[11:37:03]  deeplinks finished in 338 ms 
[11:37:03]  transpile started ... 
[11:37:08]  transpile finished in 5.72 s 
[11:37:08]  preprocess started ... 
[11:37:08]  preprocess finished in less than 1 ms 
[11:37:08]  webpack started ... 
[11:37:08]  copy finished in 6.27 s 
[11:37:18]  webpack finished in 9.93 s 
[11:37:18]  sass started ... 
Witout `from` option PostCSS could generate wrong source map or do not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning
[11:37:21]  sass finished in 2.43 s 
[11:37:21]  postprocess started ... 
[11:37:21]  postprocess finished in 186 ms 
[11:37:21]  lint started ... 
[11:37:21]  build dev finished in 18.82 s 
> cordova build ios
Building for iPhone XS Max Simulator

Building project: /Users/christianstruckmann/Desktop/OSS/App/OSS/platforms/ios/OSS.xcworkspace

	Configuration: Debug
	Platform: emulator
Build settings from command line:
    CONFIGURATION_BUILD_DIR = /Users/christianstruckmann/Desktop/OSS/App/OSS/platforms/ios/build/emulator
    SDKROOT = iphonesimulator12.0
    SHARED_PRECOMPS_DIR = /Users/christianstruckmann/Desktop/OSS/App/OSS/platforms/ios/build/sharedpch

Build settings from configuration file '/Users/christianstruckmann/Desktop/OSS/App/OSS/platforms/ios/cordova/build-debug.xcconfig':
    CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = YES
    CODE_SIGN_ENTITLEMENTS = $(PROJECT_DIR)/$(PROJECT_NAME)/Entitlements-$(CONFIGURATION).plist
    CODE_SIGN_IDENTITY = iPhone Developer
    ENABLE_BITCODE = NO
    GCC_PREPROCESSOR_DEFINITIONS = DEBUG=1
    HEADER_SEARCH_PATHS = "$(TARGET_BUILD_DIR)/usr/local/lib/include" "$(OBJROOT)/UninstalledProducts/include" "$(OBJROOT)/UninstalledProducts/$(PLATFORM_NAME)/include" "$(BUILT_PRODUCTS_DIR)"
    OTHER_LDFLAGS = -ObjC
    SWIFT_OBJC_BRIDGING_HEADER = $(PROJECT_DIR)/$(PROJECT_NAME)/Bridging-Header.h

Posts: 3

Participants: 2

Read full topic

WebpackJson is not Defined

$
0
0

@9971343358 wrote:

WebpackJson not defined
@http://localhost:8100/build/main.js:1:1,

In my project i checked all the path on index page is written.
All the files is presnet in www/build folder.

But still the vendor file is not loading,
I check in inspect : sourece tab => pages => build
There is only two or three filed found,
Which is except vendor.js file.

This is my system confuguraion.
Cordova CLI: 7.1.0
Gulp version: CLI version 3.9.1
Gulp local:
Ionic CLI Version: 1.7.16
Ionic App Lib Version: 0.7.3
OS: Distributor ID: Ubuntu Description: Ubuntu 16.04.5 LTS
Node Version: v7.4.0

Please hep.

Posts: 1

Participants: 1

Read full topic

Widget from issue in build creating by cmd

$
0
0

@jaswantrathore wrote:

Hello I am training to generate my project build in windows by below CMD

ionic Cordova build android

but below error is coming

pruning at selector widget from PROJECT/platforms/android/res/xml/config.xml went bad

Screenshot_4

Posts: 1

Participants: 1

Read full topic

I want to set both back and menu button in same page

$
0
0

@balajisengottuvell wrote:

On the same page, I have to show the back button and also with the menu button based on the condition.I have the page to get user id and contact no after that I have to validate and show user information by hiding the user input and show the user details. When I show the user details the menu button gets to hide and show the back button. In this scenario, I handle all the view on the same page

Posts: 1

Participants: 1

Read full topic

AlertController/Ionic 4 Beta 7 - Navigation triggered outside Angular zone, did you forget to call 'ngZone.run()'?

$
0
0

@rtpHarry wrote:

I’m finally building an app with Ionic and I decided to start with Ionic 4.

I have put a reset button on and then used the docs to get the snippet below:

  async buttonCancel() {
    const alert = await this.alertCtrl.create({
      header: 'Reset',
      message: 'Do you want to reset back to the homepage?',
      buttons: [
        { 
          text: 'No',
          role: 'cancel',
          cssClass: 'secondary'
        }, {
          text: 'Yes',
          handler: () => {
            this.myDataService.resetOffers();
            this.navCtrl.navigateForward("/");
          }
        }
      ]
    });

    await alert.present();
  }

My code is in the handler, which is causing the following warning to appear in the console:

Navigation triggered outside Angular zone, did you forget to call 'ngZone.run()'?

This seems like a bug but I just wanted to check before I submitted it in GitHub. Am I doing something wrong?

My ionic info is:

Ionic:

   ionic (Ionic CLI)          : 4.1.2 (C:\Users\user\AppData\Roaming\npm\node_modules\ionic)
   Ionic Framework            : @ionic/angular 4.0.0-beta.7
   @angular-devkit/core       : 0.7.5
   @angular-devkit/schematics : 0.7.5
   @angular/cli               : 6.1.5
   @ionic/ng-toolkit          : 1.0.8
   @ionic/schematics-angular  : 1.0.6

System:

   NodeJS : v8.12.0 (C:\Program Files\nodejs\node.exe)
   npm    : 6.4.1
   OS     : Windows 10

Posts: 1

Participants: 1

Read full topic


Ionic camera upload AWS3 - File transfer deprecated

$
0
0

@joker84a wrote:

I’m trying to upload an image by camera to AWS3 but I have found only tutorials about file transfer.
I read that file transfer is now deprecated, how could I solve this problem ?

Posts: 1

Participants: 1

Read full topic

Ionicons 4.4.3 not showing on Android

$
0
0

@ioclaudio wrote:

Hi,
after upgrading ionicons from 4.4.2 to 4.4.3 they are not longer displayed on Android.
I can see these icons if I use the browser (ionic serve -lcs) and if I use the simulator “Ionic DevApp”.
But if i create a package with:
ionic cordova build android --prod
and I install the app on Android I can’t see them.
It seems thay are not present in the app.

If I downgrade ionicons from 4.4.3 to 4.4.2 they are displayed again.
I’m using ionic 4.1.2.

Which could be the problem?

cld

Posts: 1

Participants: 1

Read full topic

Set corret marker rotation in Google Maps

$
0
0

@Kyrax80 wrote:

I am making an Ionic App which is a GPS-Like and using this plugin https://github.com/ionic-team/ionic-native-google-maps/blob/master/documents/README.md

I need the marker, which is an arrow, that represents the user’s position to point at the same direction where user is looking

I have been like 3 days and can’t figure out how to do this. I prefer not to use a gyroscope bec many smartphones don’t have this (mine included which isn’t so old).

Can anyone give me a hand here?

Thanks!

Posts: 1

Participants: 1

Read full topic

Ionic 3 ios can't find sourcemaps and banner not clickable

$
0
0

@lolaswift wrote:

Anyone’s facing the same issues?

Failed to load resource: the server responded with a status of 404 (Not Found) http://localhost:8080/plugins/cordova-plugin-admob-free/www/admob.js.map

Failed to load resource: the server responded with a status of 404 (Not Found) http://localhost:8080/polyfills/promise-7.0.4.min.js.map

Banner shows but not clickable.
Interstitial works perfectly.

$ ionic info
:heavy_check_mark: Gathering environment info - done!

Ionic:

ionic (Ionic CLI) : 4.1.2 (/usr/local/lib/node_modules/ionic)
Ionic Framework : ionic-angular 3.9.2
@ionic/app-scripts : 3.2.0

Cordova:

cordova (Cordova CLI) : 8.0.0
Cordova Platforms : android 6.3.0, ios 4.5.5
Cordova Plugins : cordova-plugin-ionic-keyboard 2.1.2, cordova-plugin-ionic-webview 2.1.4, (and 18 other plugins)

System:

ios-deploy : 1.9.2
ios-sim : 5.0.6
NodeJS : v8.11.1 (/usr/local/bin/node)
npm : 6.4.1
OS : macOS Sierra
Xcode : Xcode 9.2 Build version 9C40b

Can anyone please help?

Posts: 1

Participants: 1

Read full topic

MobileIron

$
0
0

@mdline wrote:

Hello,

has anybody have experience using Anroid app with MobileIron.
I buil an apk, wreapped with MobileIron. But my requests do not go through.
Should I use any other plugin to make requests?

Posts: 1

Participants: 1

Read full topic

Build failing

$
0
0

@Kyrax80 wrote:

Hi, my project was working fine some days ago but now when I try to build it I am getting the following errors. Have to say that we are team so I am not sure if it’s someone who fked up. This is my output when trying to build for android:

:compileDebugJavaWithJavac

:compileDebugJavaWithJavac - is not incremental (e.g. outputs have changed, no previous execution, etc.).
C:\a\platforms\android\src\com\ionicframework\common\IonicCordovaCommon.java:72: error: strings in switch are not supported in
-source 1.6
    switch(action) {
          ^
  (use -source 7 or higher to enable strings in switch)
C:\a\platforms\android\src\com\ionicframework\common\IonicCordovaCommon.java:144: error: cannot find symbol

    SharedPreferences prefs = this.cordova.getContext().getSharedPreferences("com.ionic.deploy.preferences", Context.MODE_PRIVATE);
                                          ^
  symbol:   method getContext()
  location: variable cordova of type CordovaInterface
C:\a\platforms\android\src\com\ionicframework\common\IonicCordovaCommon.java:201: error: cannot find symbol
    SharedPreferences prefs = this.cordova.getContext().getSharedPreferences("com.ionic.deploy.preferences", Context.MODE_PRIVATE);
                                          ^
  symbol:   method getContext()
  location: variable cordova of type CordovaInterface
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.
3 errors
:compileDebugJavaWithJavac
FAILED

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.

BUILD FAILED

Total time: 25.731 secs
(node:1620) 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.
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
C:\a\platforms\android\src\com\ionicframework\common\IonicCordovaCommon.java:72: error: strings in switch are not supported in
-source 1.6
    switch(action) {
          ^
  (use -source 7 or higher to enable strings in switch)
C:\a\platforms\android\src\com\ionicframework\common\IonicCordovaCommon.java:144: error: cannot find symbol
    SharedPreferences prefs = this.cordova.getContext().getSharedPreferences("com.ionic.deploy.preferences", Context.MODE_PRIVATE);
                                          ^
  symbol:   method getContext()
  location: variable cordova of type CordovaInterface
C:\a\platforms\android\src\com\ionicframework\common\IonicCordovaCommon.java:201: error: cannot find symbol
    SharedPreferences prefs = this.cordova.getContext().getSharedPreferences("com.ionic.deploy.preferences", Context.MODE_PRIVATE);
                                          ^
  symbol:   method getContext()
  location: variable cordova of type CordovaInterface
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.
3 errors

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.
    at ChildProcess.whenDone (C:\a\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:1620) 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:1620) [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.

My Ionic info is:

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

    @ionic/cli-plugin-proxy : 1.5.8
    @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.10
    Cordova Platforms  : android 6.3.0
    Ionic Framework    : ionic-angular 3.9.2

System:

    Android SDK Tools : 26.1.1
    Node              : v8.11.1
    npm               : 5.6.0
    OS                : Windows 10

Environment Variables:

    ANDROID_HOME     : C:\Users\UsuarioDT01\AppData\Local\Android\Sdk
    HTTP_PROXY       : not set
    http_proxy       : not set
    HTTPS_PROXY      : not set
    https_proxy      : not set
    IONIC_HTTP_PROXY : not set
    PROXY            : not set
    proxy            : not set

Misc:

    backend : pro

Please help, this is urgent

Thanks!

Posts: 1

Participants: 1

Read full topic

Running time consuming plugin in separate thread

$
0
0

@posapp wrote:

We are building an app which we are using a cordova plugin that runs heavy duty job. The app is being built using Ionic 3. Currently, we are using the current single thread mechanism. Now we think to move in multi-threading and obviously Web Worker. Assume the code looks like:

@Component(…)
export class BasketComponent {

async doHeavyJob() {
await this.heavyJobService.firstStepOfHeavyJob();
await this.heavyJobService.secondStepOfHeavyJob();
}
}

and the heavy service looks like:

import { PrintTable } from “./printTable”;
import { Pro } from “@ionic/pro”;
import { ErrorLoggingService } from “…/…/services/ErrorLoggingService”;

export class HeavyJobService {
heavyCordovaPlugin: any;

constructor() {
    this.heavyCordovaPlugin = (<any>window).heavyCordovaPlugin;
}

firstStepOfHeavyJob() {
    this.heavyCordovaPlugin.firstStepOfHeavyJob()

}

secondStepOfHeavyJob() {
    this.heavyCordovaPlugin.firstStepOfHeavyJob()

}
}

and firstStepOfHeavyJob will call Cordova plugin which looks like:

var exec = require(‘cordova/exec’);

var PLUGIN_NAME = ‘posprinter’;

var posprinter = {

firstStepOfHeavyJob: function () {
return new Promise(function (successCallback, errorCallback) {
exec(successCallback, errorCallback, PLUGIN_NAME, ‘firstStepOfHeavyJob’, []);
});
},
secondStepOfHeavyJob: function () {
return new Promise(function (successCallback, errorCallback) {
exec(successCallback, errorCallback, PLUGIN_NAME, ‘secondStepOfHeavyJob’, []);
});
},
};

module.exports = heavyCordovaPlugin;

Now my question is how I can fit Web Worker into our solution?

Posts: 1

Participants: 1

Read full topic


Geolocation not Works on Android!

$
0
0

@eduardochiletto wrote:

Can some Ionic engineer or anyone else explain to me why a basic feature like Geo Location does not work on Android? This left me disappointed with Ionic to the point that I was considering throwing my entire project off a few days ago from the official release.

This is my code:

  getLocation() {
    return new Promise((resolve, reject) => {
      this.geolocation.getCurrentPosition({timeout: 10000, enableHighAccuracy: true}).then((resp) => {
        resolve(resp.coords);
       }).catch((error) => {
         // console.log('Error getting location', error);
         resolve(undefined);
       });
    });
  }

What is going on

In Android devices, the getCurrentPosition method returns nothing in the Then or Catch.

What I’ve already tried

I have read a lot of articles here in the forum, in stackoverflow and elsewhere and tried to apply everything that was tip to solve this problem. I already put it inside the “platform.ready ()”. Nothing, absolutely nothing solves that mistake!

I already came back version of Ionic Cli. I have already reinstalled entire node_modules.

This is frustrating and disappointing. Where is the Ionic engineering that does not solve this for the developer community? :rage:

Posts: 1

Participants: 1

Read full topic

Hi, my project was working fine some days ago but now when I try to build it I am getting the following errors. This is my output when trying to create android

$
0
0

@alexbentomelo wrote:

C:\Desenvolvimento\petbin>ionic cordova platform add android

cordova platform add android --save
Using cordova-fetch for cordova-android@~7.0.0
Adding android project…
Creating Cordova project for the Android platform:
Path: platforms\android
Package: com.startapplabs.ion2FullApp.elite
Name: Petbin
Activity: MainActivity
Android target: android-26
Subproject Path: CordovaLib
Subproject Path: app
Android project created with cordova-android@7.0.0
Android Studio project detected
Android Studio project detected
Installing “call-number” for android
Installing “com-badrit-base64” for android
Installing “com.synconset.imagepicker” for android
Error during processing of action! Attempting to revert…
Failed to install ‘com.synconset.imagepicker’: Error: Uh oh!
ENOENT: no such file or directory, open ‘C:\Desenvolvimento\petbin\platforms\android\AndroidManifest.xml’
at Object.fs.openSync (fs.js:663:18)
at Object.fs.readFileSync (fs.js:568:33)
at Object.parseElementtreeSync (C:\Desenvolvimento\petbin\platforms\android\cordova\node_modules\cordova-common\src\util\xml-helpers.js:180:27)
at new AndroidManifest (C:\Desenvolvimento\petbin\platforms\android\cordova\lib\AndroidManifest.js:29:20)
at AndroidProject.getPackageName (C:\Desenvolvimento\petbin\platforms\android\cordova\lib\AndroidProject.js:99:12)
at AndroidProject.getCustomSubprojectRelativeDir (C:\Desenvolvimento\petbin\platforms\android\cordova\lib\AndroidProject.js:105:28)
at install (C:\Desenvolvimento\petbin\platforms\android\cordova\lib\pluginHandlers.js:106:46)
at ActionStack.process (C:\Desenvolvimento\petbin\platforms\android\cordova\node_modules\cordova-common\src\ActionStack.js:56:25)
at PluginManager.doOperation (C:\Desenvolvimento\petbin\platforms\android\cordova\node_modules\cordova-common\src\PluginManager.js:114:20)
at PluginManager.addPlugin (C:\Desenvolvimento\petbin\platforms\android\cordova\node_modules\cordova-common\src\PluginManager.js:144:17)
(node:16660) UnhandledPromiseRejectionWarning: Error: Uh oh!
ENOENT: no such file or directory, open ‘C:\Desenvolvimento\petbin\platforms\android\AndroidManifest.xml’
at Object.fs.openSync (fs.js:663:18)
at Object.fs.readFileSync (fs.js:568:33)
at Object.parseElementtreeSync (C:\Desenvolvimento\petbin\platforms\android\cordova\node_modules\cordova-common\src\util\xml-helpers.js:180:27)
at new AndroidManifest (C:\Desenvolvimento\petbin\platforms\android\cordova\lib\AndroidManifest.js:29:20)
at AndroidProject.getPackageName (C:\Desenvolvimento\petbin\platforms\android\cordova\lib\AndroidProject.js:99:12)
at AndroidProject.getCustomSubprojectRelativeDir (C:\Desenvolvimento\petbin\platforms\android\cordova\lib\AndroidProject.js:105:28)
at install (C:\Desenvolvimento\petbin\platforms\android\cordova\lib\pluginHandlers.js:106:46)
at ActionStack.process (C:\Desenvolvimento\petbin\platforms\android\cordova\node_modules\cordova-common\src\ActionStack.js:56:25)
at PluginManager.doOperation (C:\Desenvolvimento\petbin\platforms\android\cordova\node_modules\cordova-common\src\PluginManager.js:114:20)
at PluginManager.addPlugin (C:\Desenvolvimento\petbin\platforms\android\cordova\node_modules\cordova-common\src\PluginManager.js:144:17)
(node:16660) 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:16660) [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.
ionic cordova resources android --force
√ Collecting resource configuration and source images - done!
√ Filtering out image resources that do not need regeneration - done!
√ Uploading source images to prepare for transformations: 2 / 2 complete - done!
√ Generating platform resources: 18 / 18 complete - done!
√ Modifying config.xml to add new image resources - done!

Posts: 1

Participants: 1

Read full topic

Ionic cordova run : big problem

$
0
0

@blondie63 wrote:

I’ve a very strange problem from some days…
I’m working on a Ionic 3 Angular 5 app
I make some changes on code, save it and run:
npm i
ionic cordova run browser -lc

Looking log on terminal i see that it’s running a previous code
I’ve tried to delete npm cache, close terminal or vs.code but nothing

Someone has same problem ?
Some help ?

Posts: 1

Participants: 1

Read full topic

Http request not working in android app

$
0
0

@cod-r wrote:

Hello community,
I’m trying to make a http get request and everything is working in the browser and i get the correct json in postman too(so no problems with the API), but i get a weird error when i run the app in android device (see screenshot).

error: SyntaxError: Unexpected token < in JSON at position 0 at JSON.parse () at XMLHttpRequest.onLoad

ionic info
Ionic:

   ionic (Ionic CLI)          : 4.1.2 (/home/codr/.nvm/versions/node/v8.11.3/lib/node_modules/ionic)
   Ionic Framework            : @ionic/angular 4.0.0-beta.11
   @angular-devkit/core       : 0.7.5
   @angular-devkit/schematics : 0.7.5
   @angular/cli               : 6.1.5
   @ionic/ng-toolkit          : 1.0.8
   @ionic/schematics-angular  : 1.0.6

Cordova:

   cordova (Cordova CLI) : 8.0.0
   Cordova Platforms     : android 7.0.0
   Cordova Plugins       : cordova-plugin-ionic-keyboard 2.1.2, cordova-plugin-ionic-webview 2.1.4, (and 4 other plugins)

System:

   Android SDK Tools : 26.1.1 (/home/codr/Android/Sdk)
   NodeJS            : v8.11.3 (/home/codr/.nvm/versions/node/v8.11.3/bin/node)
   npm               : 6.4.1
   OS                : Linux 4.15

I tried the same code in ionic-v3 and i have the same error

ionic v3 info
Ionic:

   ionic (Ionic CLI)  : 4.1.2 (/home/codr/.nvm/versions/node/v8.11.3/lib/node_modules/ionic)
   Ionic Framework    : ionic-angular 3.9.2
   @ionic/app-scripts : 3.2.0

Cordova:

   cordova (Cordova CLI) : 8.0.0
   Cordova Platforms     : android 7.0.0
   Cordova Plugins       : cordova-plugin-ionic-keyboard 2.1.2, cordova-plugin-ionic-webview 2.1.4, (and 4 other plugins)

System:

   Android SDK Tools : 26.1.1 (/home/codr/Android/Sdk)
   NodeJS            : v8.11.3 (/home/codr/.nvm/versions/node/v8.11.3/bin/node)
   npm               : 6.4.1
   OS                : Linux 4.15

My code:

car-list.page.ts
import {Component, OnInit} from '@angular/core';
import {CarModel} from './car-model/car.model';
import {CarListService} from './car-list.service';

@Component({
    selector: 'app-car-list',
    templateUrl: './car-list.page.html',
    styleUrls: ['./car-list.page.scss'],
})
export class CarListPage implements OnInit {

    cars: CarModel[];

    constructor(private carListService: CarListService) {
    }

    ngOnInit() {
        this.onChooseCar();
    }

    onChooseCar() {
        this.carListService.getCars().subscribe(
            (cars: CarModel[]) => {
                this.cars = cars;
            }
        );
    }
}

car-list.service.ts
import {HttpClient, HttpHeaders} from '@angular/common/http';
import {Injectable} from '@angular/core';
import {CarModel} from './car-model/car.model';
import {Observable} from 'rxjs/internal/Observable';

@Injectable({ providedIn: 'root' })
export class CarListService {

    private apiUrl = 'http://localhost:8080/api/cars';

    constructor(private http: HttpClient) {
    }

    getCars(): Observable<CarModel[]> {
        return this.http.get<CarModel[]>(this.apiUrl);
    }
}

Any sugestions?

Posts: 2

Participants: 2

Read full topic

Infinite loading and ion-list

$
0
0

@HinderiksR wrote:

Hi,

I’ve been trying to use infinite loading with an ion-list loading both top and bottom. Bottom works ok however top does not seem to work properly at all. When loading data on top of the list the view scrolls with it to the top. This luckily does not trigger another instant refresh creating an infinite loop but it does freeze the infinite scroller. The user needs to scroll down a bit and than up again to trigger another infinite scrolling to the top.

This is clearly not how it’s supposed to work. If anyone has any experience with this please let me know if you have a solution for this behaviour.

With best regards,
Robin Hinderiks

Posts: 1

Participants: 1

Read full topic

Viewing all 71016 articles
Browse latest View live


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