I’m getting Blank Screen after installing ionic project application manullay by installing " /ionic/platforms/android/build/outputs/apk/android-debug.apk " by running command " ionic cordova build " and also i run my project by " ionic cordova run android ". I’m getting blank screen please help me anyone with my problem.
What is your ionic info
output?
cli packages: (C:\Users\MyPC\AppData\Roaming\npm\node_modules)
@ionic/cli-utils : 1.19.0
ionic (Ionic CLI) : 3.19.0
global packages:
cordova (Cordova CLI) : 7.1.0
local packages:
@ionic/app-scripts : 3.1.2
Cordova Platforms : android 6.3.0
Ionic Framework : ionic-angular 3.9.2
System:
Android SDK Tools : 26.1.1
Node : v8.4.0
npm : 5.3.0
OS : Windows 10
Environment Variables:
ANDROID_HOME : C:\Android\sdk
Misc:
backend : pro
There is a newer version 6.4.0 available. Install that one and see if this fixes anything.
Hello Sujan, i tried to update Cordova but its not updating.
ionic cordova platform remove android
ionic cordova platform add android@6.4.0
----------------------------------------------------------------------------------------------------------------------------------------------
home.ts
import { Component } from ‘@angular/core’;
import { NavController } from ‘ionic-angular’;
import { storage, initializeApp } from ‘firebase’;
import {firebase_config} from “…/…/app/firebase.config”;
import {Camera, CameraOptions} from “@ionic-native/camera”;
@Component({
selector: ‘page-home’,
templateUrl: ‘home.html’
})
export class HomePage {
constructor(private cam:Camera, public navCtrl: NavController) {
initializeApp(firebase_config);
}
async cap(){
try
{
const options: CameraOptions ={
quality:50,
targetHeight:1920,
targetWidth:1080,
destinationType: this.cam.DestinationType.DATA_URL,
encodingType: this.cam.EncodingType.JPEG,
mediaType:this.cam.MediaType.PICTURE,
correctOrientation: true
}
const result = await this.cam.getPicture(options);
const image = data:image/jpeg;base64,${result}
;
const pictures = storage().ref(‘pictures/myphoto’);
pictures.putString(image,‘data_url’);
}
catch(e){
console.error(e);
}
}
getinf(sname,pname,ph,buss,eid,appli,exp,df,dt,tf,tt,add) {
/this.contactList.push({
name: name,
address: address,
phone: phone,
city: city
}).then( newContact => {
this.navCtrl.pop();
}, error => {
console.log(error);
});/
console.log(sname)
}
}
----------------------------------------------------------------------------------------------------------------------------------------------
home.html
Spetinfo Data EntryBussiness Details
Working Hours in Day (Monday to Friday)
Working Hours in Time
Payment Methods
----------------------------------------------------------------------------------------------------------------------------------------------
if i remove these 3 lines then i’m getting output otherwise not
- import { storage, initializeApp } from ‘firebase’;
- import {firebase_config} from “…/…/app/firebase.config”;
- import {Camera, CameraOptions} from “@ionic-native/camera”;
Only if you remove all three? Doesn’t really make sense that both Firebase and the Camera plugin break it.
Have you added Camera
to your providers
array?
As talked about here.
Thanks SigmundFroyd its solved.