ionic-framework

Gradle sync failed: Cause: compileSdkVersion is not specified

岁酱吖の 提交于 2020-02-02 02:53:06
问题 I am trying to test my ionic app in android studio. It is throwing the below error. Gradle sync failed: Cause: compileSdkVersion is not specified. Any solution for this ? What am I doing wrong. Here is my build.gradle file apply plugin: 'com.android.application' buildscript { repositories { mavenCentral() jcenter() maven { url "https://maven.google.com" } } dependencies { classpath 'com.android.tools.build:gradle:3.0.0' } } // Allow plugins to declare Maven dependencies via build-extras

Ionic 4 ion-content scroll to bottom

江枫思渺然 提交于 2020-02-01 05:35:14
问题 I am creating a chat page using Ionic 4 and I'm trying to make it automatically scroll to the bottom of the page. I did it like this and it's not working: import { IonContent } from "@ionic/angular"; export class ChatroomPage implements OnInit { messageForm: FormGroup; messages: any[]; messenger: any; @ViewChild(IonContent) content: IonContent; constructor( private navExtras: NavExtrasService, private api: RestApiService, private httpNative: HTTP ) { } ngOnInit() { this.content.scrollToBottom

Xcode couldn't find any provisioning profiles matching

浪子不回头ぞ 提交于 2020-01-31 07:08:05
问题 I am trying to rebuild an ios app, that previously had no issues (first rebuild in 6 months or so). Environment is OSX 10.13.5 with all the latest updates, Xcode 9.4.1, Ionic is 3.20.0. Local cordova, ionic and node modules have been updated. These plugins: cordova-plugin-device cordova-plugin-file cordova-plugin-file-transfer cordova-plugin-splashscreen cordova-plugin-whitelist cordova-plugin-x-socialsharing Configured for manual signing. Provisioning profiles have been regenerated, with new

Ionic - Remove Disable spinner on splash screen

我与影子孤独终老i 提交于 2020-01-30 14:13:14
问题 I'm trying to disable spinner on startup splash screen. I can't find where are the settings for this feature. Which folder/file? 回答1: If it is a SplashScreenSpinner: In the config.xml file: <preference name="ShowSplashScreenSpinner" value="false"/> Official Docs 来源: https://stackoverflow.com/questions/37699304/ionic-remove-disable-spinner-on-splash-screen

nonetype' object has no attribute 'decode' error when i upload the image to database

和自甴很熟 提交于 2020-01-30 11:42:26
问题 i am new to ionic4/angular4.i need to upload the profile pic to database.i wrote code but i don't know whether it is correct or not and when i am uploading it i am getting the above mentioned error. backed i am using Django and sorry for the bad indentation.i just beginner to programming. .ts async sendPictureToSomewhere() { const fileuri = await this.getPicture(); const blobinfo = await this.b64toBlob(fileuri); await this.upload(blobinfo); alert("done"); } async getPicture() { const options:

How to play a simple sound clip (like a button click) when a div is clicked

[亡魂溺海] 提交于 2020-01-30 06:54:01
问题 I am developing an application with the Ionic Framework and searching for a (very) simple way to play a sound every time a div is clicked. Something similar to this: <div ng-click="sound()"></div> $scope.sound = function () { //sound play once here } If the solution could be in angularjs that would be great, but any help would be greatly appreciated. 回答1: $scope.sound=function(){ var audio = new Audio('audio_file.mp3'); audio.play(); } 回答2: I don't understand why people recommend the vanilla

How to play a simple sound clip (like a button click) when a div is clicked

雨燕双飞 提交于 2020-01-30 06:53:05
问题 I am developing an application with the Ionic Framework and searching for a (very) simple way to play a sound every time a div is clicked. Something similar to this: <div ng-click="sound()"></div> $scope.sound = function () { //sound play once here } If the solution could be in angularjs that would be great, but any help would be greatly appreciated. 回答1: $scope.sound=function(){ var audio = new Audio('audio_file.mp3'); audio.play(); } 回答2: I don't understand why people recommend the vanilla

npm run ionic:build --prod giving strange error

左心房为你撑大大i 提交于 2020-01-30 05:59:45
问题 When I am trying to run npm run ionic:build --prod , it is giving me below errors: Error: Cannot determine the module for class OverlayPortal in F:/D/IONIC/quicktask/quicktask-web-froala/node_modules/ionic-angular/umd/components/app/overlay-portal.d.ts! Add OverlayPortal to the NgModule to fix it. Cannot determine the module for class IonicApp in F:/D/IONIC/quicktask/quicktask-web-froala/node_modules/ionic-angular/umd/components/app/app-root.d.ts! Add IonicApp to the NgModule to fix it.

How to get IMEI in ionic2 on an android device

吃可爱长大的小学妹 提交于 2020-01-29 20:26:18
问题 I am trying to obtain the imei of an android device in ionic 2, but so far no luck. In ionic 1 l just used an ngCordova plugin like cordova-uid https://github.com/hygieiasoft/cordova-plugin-uid. Is there a plugin for ionic-native that I can use to obtain the imei or is there any other way to get the imei. 回答1: Can use this code. cordova plugin add org.hygieiasoft.cordova.uid Or cordova plugin add https://github.com/hygieiasoft/cordova-plugin-uid For test use console.log declare var cordova:

prompt error “localhost:8100 says gap_init:3” message while load ionic project in browser

旧巷老猫 提交于 2020-01-29 12:47:44
问题 while i do changes in any page code there is a prompt message "localhost:8100 says gap_init:3" shown. then I clicked 'ok' button another 5 messages shown. close browser and open it again work well. but do any changes it show this prompt. how to fix it?. thanks in advance prompt error message console was be like that console error 回答1: After trying the above answers without success, I simply deleted the www folder and ionic serve again worked as expected 回答2: This error you get when you use