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

Error when trying to update Contact properties

$
0
0

@ewehrmann wrote:

I am trying to write a function that will save a Contact to the device using the Ionic Native Contacts API. First time working with the Contact api.

I am able to get an instantiation of ‘contact’ but when I test in the browser I get an error ‘Cannot set property ‘name’ of undefined’. I also tried to compile and install an IPA file on my iOS device. The code compiled without error but when I trigger the function it does not add the contact to the device.

Two questions:

  1. Should I be able to test this API from browser without an error??? e.g. when I invoke the Call or SMS functions from browser they do not cause the app to error and stop, I just get get a message saying “cordova_not_available”

  2. Is there a problem with the syntax or logic in my code?

From home.ts page

import { Contacts, Contact, ContactField, ContactName } from ‘@ionic-native/contacts’;

constructor(public navCtrl: NavController, public navParams: NavParams, public search: SearchProvider, private callNumber: CallNumber, private sms: SMS, private contacts: Contacts, public alertController: AlertController) {
this.employees$ = ;
this.letters$ = ;
}

saveContact(fullName, phoneNumber) {
var first = fullName[0].split(" “)[0];
var last = fullName[0].split(” ")[1];
let contact: Contact = this.contacts.create();
console.log(contact[0])
contact.name = new ContactName(null, first, last);
contact.save().then(
() => this.presentAlert(),
(error: any) => console.error(‘Error saving contact.’, error)
);
}

From app.module.ts

import { Contacts} from ‘@ionic-native/contacts’;

providers: [
StatusBar,
SplashScreen,
{provide: ErrorHandler, useClass: IonicErrorHandler},
SearchProvider,
CallNumber,
Contacts,
HTTP,
SMS,
{provide: HttpBackend, useClass: NativeHttpFallback, deps: [Platform, NativeHttpBackend, HttpXhrBackend]}
]

Posts: 1

Participants: 1

Read full topic


Cant build my App with cordova build (Failure)

$
0
0

@jstrauss wrote:

Hi,

i tried to compile my Project but it failed.
I compiled this Project yesterday with no problems and i just installed one new Cordova Plugin and now it doesn’t work anymore.

My Error:

tNote: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
:CordovaLib:compileDebugJavaWithJavac
:CordovaLib:transformClassesAndResourcesWithPrepareIntermediateJarsForDebug
:app:createDebugCompatibleScreenManifests
:app:processDebugManifest
:app:splitsDiscoveryTaskDebug
:app:processDebugResources
:app:generateDebugSources
:app:javaPreCompileDebug
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
:app:compileDebugJavaWithJavac
:app:compileDebugNdk NO-SOURCE
:app:compileDebugSources
:CordovaLib:mergeDebugShaders
:CordovaLib:compileDebugShaders
:CordovaLib:generateDebugAssets
:CordovaLib:mergeDebugAssets
:app:mergeDebugShaders
:app:compileDebugShaders
:app:generateDebugAssets
:app:mergeDebugAssets
:app:transformClassesWithStackFramesFixerForDebug
Exception in thread "main" java.lang.IllegalArgumentException
        at com.google.common.base.Preconditions.checkArgument(Preconditions.java:108)
        at com.google.devtools.build.android.desugar.DefaultMethodClassFixer$DefaultMethodFinder.visit(DefaultMethodClassFixer.java:471)
        at org.objectweb.asm.ClassReader.accept(Unknown Source)
        at org.objectweb.asm.ClassReader.accept(Unknown Source)
        at com.google.devtools.build.android.desugar.DefaultMethodClassFixer.defaultMethodsDefined(DefaultMethodClassFixer.java:319)
        at com.google.devtools.build.android.desugar.DefaultMethodClassFixer.visitEnd(DefaultMethodClassFixer.java:88)
        at org.objectweb.asm.ClassVisitor.visitEnd(Unknown Source)
        at com.google.devtools.build.android.desugar.InterfaceDesugaring.visitEnd(InterfaceDesugaring.java:85)
        at org.objectweb.asm.ClassVisitor.visitEnd(Unknown Source)
        at com.google.devtools.build.android.desugar.LambdaDesugaring.visitEnd(LambdaDesugaring.java:150)
        at org.objectweb.asm.ClassReader.accept(Unknown Source)
        at org.objectweb.asm.ClassReader.accept(Unknown Source)
        at com.google.devtools.build.android.desugar.Desugar.desugarClassesInInput(Desugar.java:401)
        at com.google.devtools.build.android.desugar.Desugar.desugarOneInput(Desugar.java:326)
        at com.google.devtools.build.android.desugar.Desugar.desugar(Desugar.java:280)
        at com.google.devtools.build.android.desugar.Desugar.main(Desugar.java:584)

:app:transformClassesWithDesugarForDebug FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:transformClassesWithDesugarForDebug'.
> com.android.build.api.transform.TransformException: java.lang.RuntimeException: java.lang.RuntimeException: com.android.ide.common.process.ProcessException: Error while executing java process with main class com.google.devtools.build.android.desugar.Desugar with arguments {--input /Users/jstrauss/Documents/PROGAMMING/IONIC/VendorChecklist/platforms/android/app/build/intermediates/transforms/stackFramesFixer/debug/21.jar --output /Users/jstrauss/Documents/PROGAMMING/IONIC/VendorChecklist/platforms/android/app/build/intermediates/transforms/desugar/debug/23.jar --input /Users/jstrauss/Documents/PROGAMMING/IONIC/VendorChecklist/platforms/android/app/build/intermediates/transforms/stackFramesFixer/debug/19.jar --output /Users/jstrauss/Documents/PROGAMMING/IONIC/VendorChecklist/platforms/android/app/build/intermediates/transforms/desugar/debug/21.jar --input /Users/jstrauss/Documents/PROGAMMING/IONIC/VendorChecklist/platforms/android/app/build/intermediates/transforms/stackFramesFixer/debug/1.jar --output /Users/jstrauss/Documents/PROGAMMING/IONIC/VendorChecklist/platforms/android/app/build/intermediates/transforms/desugar/debug/3.jar --input /Users/jstrauss/Documents/PROGAMMING/IONIC/VendorChecklist/platforms/android/app/build/intermediates/transforms/stackFramesFixer/debug/4.jar --output /Users/jstrauss/Documents/PROGAMMING/IONIC/VendorChecklist/platforms/android/app/build/intermediates/transforms/desugar/debug/6.jar --input /Users/jstrauss/Documents/PROGAMMING/IONIC/VendorChecklist/platforms/android/app/build/intermediates/transforms/stackFramesFixer/debug/20.jar --output /Users/jstrauss/Documents/PROGAMMING/IONIC/VendorChecklist/platforms/android/app/build/intermediates/transforms/desugar/debug/22.jar --input /Users/jstrauss/Documents/PROGAMMING/IONIC/VendorChecklist/platforms/android/app/build/intermediates/transforms/stackFramesFixer/debug/3.jar --output /Users/jstrauss/Documents/PROGAMMING/IONIC/VendorChecklist/platforms/android/app/build/intermediates/transforms/desugar/debug/5.jar --input /Users/jstrauss/Documents/PROGAMMING/IONIC/VendorChecklist/platforms/android/app/build/intermediates/transforms/stackFramesFixer/debug/13.jar --output /Users/jstrauss/Documents/PROGAMMING/IONIC/VendorChecklist/platforms/android/app/build/intermediates/transforms/desugar/debug/15.jar --input /Users/jstrauss/Documents/PROGAMMING/IONIC/VendorChecklist/platforms/android/app/build/intermediates/transforms/stackFramesFixer/debug/14.jar --output /Users/jstrauss/Documents/PROGAMMING/IONIC/VendorChecklist/platforms/android/app/build/intermediates/transforms/desugar/debug/16.jar --classpath_entry /Users/jstrauss/Documents/PROGAMMING/IONIC/VendorChecklist/platforms/android/CordovaLib/build/intermediates/intermediate-jars/debug/classes.jar --classpath_entry /Users/jstrauss/Documents/PROGAMMING/IONIC/VendorChecklist/platforms/android/app/build/intermediates/classes/debug --classpath_entry /Users/jstrauss/Documents/PROGAMMING/IONIC/VendorChecklist/platforms/android/app/build/intermediates/transforms/stackFramesFixer/debug/0.jar --classpath_entry /Users/jstrauss/Documents/PROGAMMING/IONIC/VendorChecklist/platforms/android/app/build/intermediates/transforms/stackFramesFixer/debug/1.jar --classpath_entry /Users/jstrauss/Documents/PROGAMMING/IONIC/VendorChecklist/platforms/android/app/build/intermediates/transforms/stackFramesFixer/debug/2.jar --classpath_entry /Users/jstrauss/Documents/PROGAMMING/IONIC/VendorChecklist/platforms/android/app/build/intermediates/transforms/stackFramesFixer/debug/3.jar --classpath_entry /Users/jstrauss/Documents/PROGAMMING/IONIC/VendorChecklist/platforms/android/app/build/intermediates/transforms/stackFramesFixer/debug/4.jar--classpath_entry /Users/jstrauss/Documents/PROGAMMING/IONIC/VendorChecklist/platforms/android/app/build/intermediates/transforms/stackFramesFixer/debug/5.jar --classpath_entry /Users/jstrauss/Documents/PROGAMMING/IONIC/VendorChecklist/platforms/android/app/build/intermediates/transforms/stackFramesFixer/debug/6.jar --classpath_entry/Users/jstrauss/Documents/PROGAMMING/IONIC/VendorChecklist/platforms/android/app/build/intermediates/transforms/stackFramesFixer/debug/7.jar --classpath_entry /Users/jstrauss/Documents/PROGAMMING/IONIC/VendorChecklist/platforms/android/app/build/intermediates/transforms/stackFramesFixer/debug/8.jar --classpath_entry /Users/jstrauss/Documents/PROGAMMING/IONIC/VendorChecklist/platforms/android/app/build/intermediates/transforms/stackFramesFixer/debug/9.jar --classpath_entry /Users/jstrauss/Documents/PROGAMMING/IONIC/VendorChecklist/platforms/android/app/build/intermediates/transforms/stackFramesFixer/debug/10.jar --classpath_entry /Users/jstrauss/Documents/PROGAMMING/IONIC/VendorChecklist/platforms/android/app/build/intermediates/transforms/stackFramesFixer/debug/11.jar --classpath_entry /Users/jstrauss/Documents/PROGAMMING/IONIC/VendorChecklist/platforms/android/app/build/intermediates/transforms/stackFramesFixer/debug/12.jar --classpath_entry /Users/jstrauss/Documents/PROGAMMING/IONIC/VendorChecklist/platforms/android/app/build/intermediates/transforms/stackFramesFixer/debug/13.jar --classpath_entry /Users/jstrauss/Documents/PROGAMMING/IONIC/VendorChecklist/platforms/android/app/build/intermediates/transforms/stackFramesFixer/debug/14.jar --classpath_entry /Users/jstrauss/Documents/PROGAMMING/IONIC/VendorChecklist/platforms/android/app/build/intermediates/transforms/stackFramesFixer/debug/15.jar --classpath_entry /Users/jstrauss/Documents/PROGAMMING/IONIC/VendorChecklist/platforms/android/app/build/intermediates/transforms/stackFramesFixer/debug/16.jar --classpath_entry /Users/jstrauss/Documents/PROGAMMING/IONIC/VendorChecklist/platforms/android/app/build/intermediates/transforms/stackFramesFixer/debug/17.jar --classpath_entry /Users/jstrauss/Documents/PROGAMMING/IONIC/VendorChecklist/platforms/android/app/build/intermediates/transforms/stackFramesFixer/debug/18.jar --classpath_entry /Users/jstrauss/Documents/PROGAMMING/IONIC/VendorChecklist/platforms/android/app/build/intermediates/transforms/stackFramesFixer/debug/19.jar --classpath_entry /Users/jstrauss/Documents/PROGAMMING/IONIC/VendorChecklist/platforms/android/app/build/intermediates/transforms/stackFramesFixer/debug/20.jar --classpath_entry /Users/jstrauss/Documents/PROGAMMING/IONIC/VendorChecklist/platforms/android/app/build/intermediates/transforms/stackFramesFixer/debug/21.jar --bootclasspath_entry /Users/jstrauss/Library/Android/sdk/platforms/android-27/android.jar --bootclasspath_entry /Users/jstrauss/Library/Android/sdk/platforms/android-27/optional/org.apache.http.legacy.jar --bootclasspath_entry /Library/Java/JavaVirtualMachines/jdk1.8.0_191.jdk/Contents/Home/jre/lib/resources.jar --bootclasspath_entry /Library/Java/JavaVirtualMachines/jdk1.8.0_191.jdk/Contents/Home/jre/lib/rt.jar --bootclasspath_entry /Library/Java/JavaVirtualMachines/jdk1.8.0_191.jdk/Contents/Home/jre/lib/jsse.jar --bootclasspath_entry /Library/Java/JavaVirtualMachines/jdk1.8.0_191.jdk/Contents/Home/jre/lib/jce.jar --bootclasspath_entry /Library/Java/JavaVirtualMachines/jdk1.8.0_191.jdk/Contents/Home/jre/lib/charsets.jar --bootclasspath_entry /Library/Java/JavaVirtualMachines/jdk1.8.0_191.jdk/Contents/Home/jre/lib/jfr.jar --min_sdk_version 19 --nodesugar_try_with_resources_if_needed --desugar_try_with_resources_omit_runtime_classes}

* 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 15s
35 actionable tasks: 35 executed
/Users/jstrauss/Documents/PROGAMMING/IONIC/VendorChecklist/platforms/android/gradlew: 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.
Exception in thread "main" java.lang.IllegalArgumentException
        at com.google.common.base.Preconditions.checkArgument(Preconditions.java:108)
        at com.google.devtools.build.android.desugar.DefaultMethodClassFixer$DefaultMethodFinder.visit(DefaultMethodClassFixer.java:471)
        at org.objectweb.asm.ClassReader.accept(Unknown Source)
        at org.objectweb.asm.ClassReader.accept(Unknown Source)
        at com.google.devtools.build.android.desugar.DefaultMethodClassFixer.defaultMethodsDefined(DefaultMethodClassFixer.java:319)
        at com.google.devtools.build.android.desugar.DefaultMethodClassFixer.visitEnd(DefaultMethodClassFixer.java:88)
        at org.objectweb.asm.ClassVisitor.visitEnd(Unknown Source)
        at com.google.devtools.build.android.desugar.InterfaceDesugaring.visitEnd(InterfaceDesugaring.java:85)
        at org.objectweb.asm.ClassVisitor.visitEnd(Unknown Source)
        at com.google.devtools.build.android.desugar.LambdaDesugaring.visitEnd(LambdaDesugaring.java:150)
        at org.objectweb.asm.ClassReader.accept(Unknown Source)
        at org.objectweb.asm.ClassReader.accept(Unknown Source)
        at com.google.devtools.build.android.desugar.Desugar.desugarClassesInInput(Desugar.java:401)
        at com.google.devtools.build.android.desugar.Desugar.desugarOneInput(Desugar.java:326)
        at com.google.devtools.build.android.desugar.Desugar.desugar(Desugar.java:280)
        at com.google.devtools.build.android.desugar.Desugar.main(Desugar.java:584)


FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:transformClassesWithDesugarForDebug'.
> com.android.build.api.transform.TransformException: java.lang.RuntimeException: java.lang.RuntimeException: com.android.ide.common.process.ProcessException: Error while executing java process with main class com.google.devtools.build.android.desugar.Desugar with arguments {--input /Users/jstrauss/Documents/PROGAMMING/IONIC/VendorChecklist/platforms/android/app/build/intermediates/transforms/stackFramesFixer/debug/21.jar --output /Users/jstrauss/Documents/PROGAMMING/IONIC/VendorChecklist/platforms/android/app/build/intermediates/transforms/desugar/debug/23.jar --input /Users/jstrauss/Documents/PROGAMMING/IONIC/VendorChecklist/platforms/android/app/build/intermediates/transforms/stackFramesFixer/debug/19.jar --output /Users/jstrauss/Documents/PROGAMMING/IONIC/VendorChecklist/platforms/android/app/build/intermediates/transforms/desugar/debug/21.jar --input /Users/jstrauss/Documents/PROGAMMING/IONIC/VendorChecklist/platforms/android/app/build/intermediates/transforms/stackFramesFixer/debug/1.jar --output /Users/jstrauss/Documents/PROGAMMING/IONIC/VendorChecklist/platforms/android/app/build/intermediates/transforms/desugar/debug/3.jar --input /Users/jstrauss/Documents/PROGAMMING/IONIC/VendorChecklist/platforms/android/app/build/intermediates/transforms/stackFramesFixer/debug/4.jar --output /Users/jstrauss/Documents/PROGAMMING/IONIC/VendorChecklist/platforms/android/app/build/intermediates/transforms/desugar/debug/6.jar --input /Users/jstrauss/Documents/PROGAMMING/IONIC/VendorChecklist/platforms/android/app/build/intermediates/transforms/stackFramesFixer/debug/20.jar --output /Users/jstrauss/Documents/PROGAMMING/IONIC/VendorChecklist/platforms/android/app/build/intermediates/transforms/desugar/debug/22.jar --input /Users/jstrauss/Documents/PROGAMMING/IONIC/VendorChecklist/platforms/android/app/build/intermediates/transforms/stackFramesFixer/debug/3.jar --output /Users/jstrauss/Documents/PROGAMMING/IONIC/VendorChecklist/platforms/android/app/build/intermediates/transforms/desugar/debug/5.jar --input /Users/jstrauss/Documents/PROGAMMING/IONIC/VendorChecklist/platforms/android/app/build/intermediates/transforms/stackFramesFixer/debug/13.jar --output /Users/jstrauss/Documents/PROGAMMING/IONIC/VendorChecklist/platforms/android/app/build/intermediates/transforms/desugar/debug/15.jar --input /Users/jstrauss/Documents/PROGAMMING/IONIC/VendorChecklist/platforms/android/app/build/intermediates/transforms/stackFramesFixer/debug/14.jar --output /Users/jstrauss/Documents/PROGAMMING/IONIC/VendorChecklist/platforms/android/app/build/intermediates/transforms/desugar/debug/16.jar --classpath_entry /Users/jstrauss/Documents/PROGAMMING/IONIC/VendorChecklist/platforms/android/CordovaLib/build/intermediates/intermediate-jars/debug/classes.jar --classpath_entry /Users/jstrauss/Documents/PROGAMMING/IONIC/VendorChecklist/platforms/android/app/build/intermediates/classes/debug --classpath_entry /Users/jstrauss/Documents/PROGAMMING/IONIC/VendorChecklist/platforms/android/app/build/intermediates/transforms/stackFramesFixer/debug/0.jar --classpath_entry /Users/jstrauss/Documents/PROGAMMING/IONIC/VendorChecklist/platforms/android/app/build/intermediates/transforms/stackFramesFixer/debug/1.jar --classpath_entry /Users/jstrauss/Documents/PROGAMMING/IONIC/VendorChecklist/platforms/android/app/build/intermediates/transforms/stackFramesFixer/debug/2.jar --classpath_entry /Users/jstrauss/Documents/PROGAMMING/IONIC/VendorChecklist/platforms/android/app/build/intermediates/transforms/stackFramesFixer/debug/3.jar --classpath_entry /Users/jstrauss/Documents/PROGAMMING/IONIC/VendorChecklist/platforms/android/app/build/intermediates/transforms/stackFramesFixer/debug/4.jar--classpath_entry /Users/jstrauss/Documents/PROGAMMING/IONIC/VendorChecklist/platforms/android/app/build/intermediates/transforms/stackFramesFixer/debug/5.jar --classpath_entry /Users/jstrauss/Documents/PROGAMMING/IONIC/VendorChecklist/platforms/android/app/build/intermediates/transforms/stackFramesFixer/debug/6.jar --classpath_entry/Users/jstrauss/Documents/PROGAMMING/IONIC/VendorChecklist/platforms/android/app/build/intermediates/transforms/stackFramesFixer/debug/7.jar --classpath_entry /Users/jstrauss/Documents/PROGAMMING/IONIC/VendorChecklist/platforms/android/app/build/intermediates/transforms/stackFramesFixer/debug/8.jar --classpath_entry /Users/jstrauss/Documents/PROGAMMING/IONIC/VendorChecklist/platforms/android/app/build/intermediates/transforms/stackFramesFixer/debug/9.jar --classpath_entry /Users/jstrauss/Documents/PROGAMMING/IONIC/VendorChecklist/platforms/android/app/build/intermediates/transforms/stackFramesFixer/debug/10.jar --classpath_entry /Users/jstrauss/Documents/PROGAMMING/IONIC/VendorChecklist/platforms/android/app/build/intermediates/transforms/stackFramesFixer/debug/11.jar --classpath_entry /Users/jstrauss/Documents/PROGAMMING/IONIC/VendorChecklist/platforms/android/app/build/intermediates/transforms/stackFramesFixer/debug/12.jar --classpath_entry /Users/jstrauss/Documents/PROGAMMING/IONIC/VendorChecklist/platforms/android/app/build/intermediates/transforms/stackFramesFixer/debug/13.jar --classpath_entry /Users/jstrauss/Documents/PROGAMMING/IONIC/VendorChecklist/platforms/android/app/build/intermediates/transforms/stackFramesFixer/debug/14.jar --classpath_entry /Users/jstrauss/Documents/PROGAMMING/IONIC/VendorChecklist/platforms/android/app/build/intermediates/transforms/stackFramesFixer/debug/15.jar --classpath_entry /Users/jstrauss/Documents/PROGAMMING/IONIC/VendorChecklist/platforms/android/app/build/intermediates/transforms/stackFramesFixer/debug/16.jar --classpath_entry /Users/jstrauss/Documents/PROGAMMING/IONIC/VendorChecklist/platforms/android/app/build/intermediates/transforms/stackFramesFixer/debug/17.jar --classpath_entry /Users/jstrauss/Documents/PROGAMMING/IONIC/VendorChecklist/platforms/android/app/build/intermediates/transforms/stackFramesFixer/debug/18.jar --classpath_entry /Users/jstrauss/Documents/PROGAMMING/IONIC/VendorChecklist/platforms/android/app/build/intermediates/transforms/stackFramesFixer/debug/19.jar --classpath_entry /Users/jstrauss/Documents/PROGAMMING/IONIC/VendorChecklist/platforms/android/app/build/intermediates/transforms/stackFramesFixer/debug/20.jar --classpath_entry /Users/jstrauss/Documents/PROGAMMING/IONIC/VendorChecklist/platforms/android/app/build/intermediates/transforms/stackFramesFixer/debug/21.jar --bootclasspath_entry /Users/jstrauss/Library/Android/sdk/platforms/android-27/android.jar --bootclasspath_entry /Users/jstrauss/Library/Android/sdk/platforms/android-27/optional/org.apache.http.legacy.jar --bootclasspath_entry /Library/Java/JavaVirtualMachines/jdk1.8.0_191.jdk/Contents/Home/jre/lib/resources.jar --bootclasspath_entry /Library/Java/JavaVirtualMachines/jdk1.8.0_191.jdk/Contents/Home/jre/lib/rt.jar --bootclasspath_entry /Library/Java/JavaVirtualMachines/jdk1.8.0_191.jdk/Contents/Home/jre/lib/jsse.jar --bootclasspath_entry /Library/Java/JavaVirtualMachines/jdk1.8.0_191.jdk/Contents/Home/jre/lib/jce.jar --bootclasspath_entry /Library/Java/JavaVirtualMachines/jdk1.8.0_191.jdk/Contents/Home/jre/lib/charsets.jar --bootclasspath_entry /Library/Java/JavaVirtualMachines/jdk1.8.0_191.jdk/Contents/Home/jre/lib/jfr.jar --min_sdk_version 19 --nodesugar_try_with_resources_if_needed --desugar_try_with_resources_omit_runtime_classes}

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

        cordova build android exited with exit code 1.

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

I hope anyone can help me.

Thanks

Posts: 1

Participants: 1

Read full topic

Android app launch success but app is not installed on device

$
0
0

@woonmar wrote:

I have successfully installed the app on device and everything worked just fine. But after i deleted the app from device and tried ionic cordova run android again, the app is not installed on device anymore but work perfectly on emulator.

Posts: 1

Participants: 1

Read full topic

[Capacitor] Anyone using in Production?

$
0
0

@ARafay1 wrote:

Hi there,

Is there anyone using Capacitor on production? What are your thoughts?
What about electron support?

Thanks

Posts: 1

Participants: 1

Read full topic

Passing parameters to child tabs - why isn't my subscriber function called again?

$
0
0

@pzwosta wrote:

Hi, I’m stuck in trying to pass a parameter to a child page of a tab (ionic 4):

tabs.page.html

  <ion-tab label="Settings" icon="settings" href="/tabs/(settings:settings)">
    <ion-router-outlet name="settings"></ion-router-outlet>
  </ion-tab>

tabs.router.module.ts

const routes: Routes = [
  {
    path: 'tabs', 
    component: TabsPage,
    children: [
      ....
     { path: 'settings/:func', outlet: 'settings', component: SettingsPage },
     { path: 'settings', ...      },
   ]
   ...
];

settings.page.ts

export class SettingsPage implements OnInit ... {

  private routeSub: Subscription;
 
  constructor( private activatedRoute: ActivatedRoute) {}

  ngOnInit() {      
      console.log('Calling this without parameter. OK.');
      this.routeSub = this.activatedRoute.params.subscribe(params => {
        console.log('This is called for the first time the settings tab loads and never again.');
        if (params['func'] == 'myFunc') {
           console.log('You cant see me :-(');
        }
      })
  }

After the first ngOnInit, I navigate to another page and return from that page with:

this.router.navigateByUrl('/tabs/(settings:settings/myFunc');

I’d expect to see “You can’t see me :-(”. I am trying for some days now and hope the answer isn’t too easy. :slight_smile:

Thanks for your help.

Posts: 1

Participants: 1

Read full topic

App is going back to login page when pressing backbutton

$
0
0

@Thiago.Lives wrote:

Hi Everyone,

I am authenticating an app using token, in the app.component I have a condition to get “state” and redirect to home page or login page. If I log in and press backbutton, it is going to login page again. How to avoid this?
I looked at some structures showing how to build login and home page correctly in ionic 3, but I’m using ionic 4.

If I log in, even with the token authentication saved in storage, it is returning me the login page quickly before the home page.

What I really want to know is: How to avoid showing login page after sign in ? and how to remove it from the history back?

If anyone faced this issue, please, let me know!

Posts: 1

Participants: 1

Read full topic

Overriding global theme in Ionic v4

$
0
0

@nvahalik wrote:

I’m trying to override some of the styles to change the entire theme in my v4 app. Basically it boils down to wanting to do this:

$card-ios-border-radius: 0;
$card-ios-box-shadow: none;

However, the changes aren’t making their way into the theme. The documentation says to just edit the src/theme/variables.scss file but even in the other demos I’m looking at (ionic-super) the default is to import the CSS and not the SCSS files. This would lead me to believe that no amount of changing will make a difference.

So, is changing SCSS variables supported? If so, what’s the recommended way to handle this?
If it isn’t supported, then what’s the recommended way to override the base theme like this?

Posts: 2

Participants: 1

Read full topic

Link on Button not working

$
0
0

@the_luanblakaj wrote:

Why do I always get an error that the button closed unexpectadly?
This is the code that seems to fuck everything up, whats wrong with it?

<ion-fab right top>
   <button ion-fab class="fab-map" window.open('http://google.com', '_system')>
      <ion-icon name='pin'></ion-icon>
   </button>
</ion-fab>

I appreciate any help.

Posts: 1

Participants: 1

Read full topic


List of data by google map plaace

$
0
0

@hanan150 wrote:

I want to create a list of all restaurants in my city
how can collect the data about it,
I know I will use google map place API, but I need more detail
anyone have an idea

Posts: 1

Participants: 1

Read full topic

Why did the ionicframework website get rid of the SEARCH bar?

$
0
0

@chiemeka wrote:

The large search bar on the legacy ionic framework.com/docs/ made it so easy to get at any item of interest. Why did the team get rid of it in this new 2019 website interface.
It is a lot harder to navigate and get to exactly what you want now.

Posts: 1

Participants: 1

Read full topic

Python/Ionic/MySQL Notifications

$
0
0

@murrayxaiyan wrote:

I have a code in Python that inserts data into a table in MySQL. What I want to do and I do not know how to do it is to be able to receive the data that is inserted in my application in Ionic. By this I mean to be able to receive only that data that is inserted (not the whole table) to be able to notify in the application, each time a row is inserted in the table.

I tried to do it with observables but I did not understand much about that and it did not work either. The other thing that occurs to me is to use web sockets but I do not know if it will serve me correctly.

If someone can guide me or help, I would greatly appreciate it.

Posts: 1

Participants: 1

Read full topic

Where I can find https://s3.amazonaws.com/ionic-io-static/xxxx.png

Content goes up when input is focused with keyboard in Ionic 4

$
0
0

@chuuthetwai wrote:

ion-content goes up when input is focused with keyboard in Ionic 4. Please give me an advice how I can solve this issue.
Thanks you…

Posts: 1

Participants: 1

Read full topic

IPhoneX: How to remove white space which is displayed in header after coming back from landscape to portrait

[Solved] Use a compatible library with a minSdk of at most 16 or increase this project's minSdk version to at least 19,

$
0
0

@indraraj26 wrote:

Everything was working great i was able to build apk for some reason i have removed platform
ionic cordova platform rm android re-added with ionic cordova platform add android now i am end up with this error
Please let me know how can i resolve.

I had discussed with mike on slack he told me to add in config.xml
<preference name="android-minSdkVersion" value=" 19" />
but this was already there i cant find the way to resolve this.

Please check full description: https://github.com/ionic-team/ionic-cli/issues/3847

Posts: 2

Participants: 1

Read full topic


I'm trying to build android app in ionic3

$
0
0

@gokulanathan wrote:

ionic cordova run android --prod --release
ionic-app-scripts build --prod --target cordova --platform android
[12:24:46] ionic-app-scripts 3.2.1
[12:24:46] build prod started …
[12:24:46] clean started …
[12:24:46] clean finished in 3 ms
[12:24:46] copy started …
[12:24:46] deeplinks started …
[12:24:46] deeplinks finished in 21 ms
[12:24:46] ngc started …
[12:24:50] typescript error
Type LinkPage in /Users/angelamal/Documents/osome/src/pages/link/link.ts is part of the declarations of 2
modules: AppModule in /Users/angelamal/Documents/osome/src/app/app.module.ts and LinkPageModule in
/Users/angelamal/Documents/osome/src/pages/link/link.module.ts! Please consider moving LinkPage in
/Users/angelamal/Documents/osome/src/pages/link/link.ts to a higher module that imports AppModule in
/Users/angelamal/Documents/osome/src/app/app.module.ts and LinkPageModule in
/Users/angelamal/Documents/osome/src/pages/link/link.module.ts. You can also create a new NgModule that
exports and includes LinkPage in /Users/angelamal/Documents/osome/src/pages/link/link.ts then import that
NgModule in AppModule in /Users/angelamal/Documents/osome/src/app/app.module.ts and LinkPageModule in
/Users/angelamal/Documents/osome/src/pages/link/link.module.ts.
[12:24:50] ionic-app-script task: “build”
[12:24:50] Error: The Angular AoT build failed. See the issues above
Error: The Angular AoT build failed. See the issues above
at /Users/angelamal/Documents/osome/node_modules/@ionic/app-scripts/dist/aot/aot-compiler.js:237:55
at step (/Users/angelamal/Documents/osome/node_modules/@ionic/app-scripts/dist/aot/aot-compiler.js:32:23)
at Object.next (/Users/angelamal/Documents/osome/node_modules/@ionic/app-scripts/dist/aot/aot-compiler.js:13:53)
at fulfilled (/Users/angelamal/Documents/osome/node_modules/@ionic/app-scripts/dist/aot/aot-compiler.js:4:58)
[ERROR] An error occurred while running subprocess ionic-app-scripts.
ionic-app-scripts build --prod --target cordova --platform android exited
with exit code 1.

while i tried to build an android app in ionic 3…

i used this code “ionic cordova build android --prod --release”

but it showing an error

Posts: 1

Participants: 1

Read full topic

SVG Rendering in Ionic 4

$
0
0

@Fl0ow wrote:

Hi all,

I have been trying to use an SVG in our new app to define icons all over the app. This to save space and not use bitmap images all the time that would increase our package size since we want to distribute this app in Apple App Store and Google Play Store.

So we are using Adobe XD, creating icons in it, then I am exporting it for Web using Adobe XD Design specs feature. This provides the possibility to export the icon as SVG.

My issue is the following: whatever the icon I have in XD just doesn’t get rendered as good when trying out the app, whatever the problem. I thought screenshots would better help describe the issue. This is my icon in Adobe XD:

image

Then this is the same icon exported by Adobe XD to SVG format, I open it in Chrome:

image

So far so good. Now here is rendering once in our ionic app:

image

There are some differences as you can see between what is being shown in Chrome, in Adobe XD, and what the app is rendering. The difference doesn’t seem like much, but actually when looking at it on an Android phone or iOS device it really shows. Especially when we programmatically colorize the icon.

So, my question is, first is there something we’re doing wrong in the implementation - I can share more code examples upon request if you guys need to know - and then if it’s not an implementation issue but more a platform support issue then how do you guys suggest we do to get our icons displayed with high fidelity while optimizing package size?

Posts: 1

Participants: 1

Read full topic

View getting stuck when entering page for second time

$
0
0

@Kyrax80 wrote:

Hello, I am using cordova maps plugin. I am facing a problem where if I enter my page once it works perfectly but if I leave the page and enter again, then it gets stuck in one of the steps. Idk what part of the code to post since it’s arround 2k lines of code. Has this happened to anyone?

Here is a video, the moment where I don’t show the phone’s screen is when I enter the map’s page, and then leave it and enter again (I can’t show anything else bec of privacy):

This started happening since I started to check if Bluetooth and GPS were on, if user accepted GPS permissions and if he had connection to Internet.

Posts: 2

Participants: 1

Read full topic

Adding ionic4 project to angular 7 workspace

$
0
0

@rajeshvs wrote:

Hi,
I have angular7 and ionic4 apps in completely different folders. The services code is duplicated.
I want to take advantage of the angular workspace. I want to make one service library and use both in the ionic and angular 7 app.

Posts: 1

Participants: 1

Read full topic

Ionic 4 change color tab on clik

$
0
0

@ninecmoi wrote:

hi,

I have a parent component, let’s call it component A. Inside I have 10 tabs : T1 to T10
Inside child component T1, i have a button to save() my data.
I want also, change de color when it’s done to have the visual information of which tab is saved.

How can I do that ?

I try different things to learn, for exemple, in the parent component A ngOnInit() :

let tab1 = this.el.nativeElement.querySelector(“ion-tab-button”);
tab1.innerText = “T1 saved”;

this.renderer.setStyle(
  tab1,
  'border',
  '2px dashed #FFE066'
); 

it works fine.

Now i want to access “ion-tab-button” from my function save() in the child component T1
But i’m lost on how i can do that.

Thank you
nine

Posts: 1

Participants: 1

Read full topic

Viewing all 48978 articles
Browse latest View live


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