当我尝试将命令ionic cordova build android输出错误作为上面的标题.然后我尝试删除其中一个gms,当我再次构建删除它再次出现.怎么解决这个?
这是我对我的依赖build.gradle:
dependencies {
compile fileTree(dir: 'libs', include: '*.jar')
// SUB-PROJECT DEPENDENCIES START
debugCompile(project(path: "CordovaLib", configuration: "debug"))
releaseCompile(project(path: "CordovaLib", configuration: "release"))
compile "com.google.android.gms:play-services-auth:+" // i remove this
compile "com.google.android.gms:play-services-identity:+"
compile "com.facebook.android:facebook-android-sdk:4.+"
// SUB-PROJECT DEPENDENCIES END
}
Run Code Online (Sandbox Code Playgroud) 在Firebase主要版本更新后,尤其是2019年6月17日更新之后,我无法编译Ionic Cordova App。
我尝试降级到Android Cordova 6.3.0,但我的项目必须为7.0.0。
这是我的离子信息:
@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.2.1
Cordova Platforms : android 7.0.0 browser 5.0.4
Ionic Framework : ionic-angular 3.9.3
System:
Android SDK Tools : 26.1.1
Node : v8.9.1
npm : 5.5.1
OS : Windows 10
Environment Variables:
ANDROID_HOME : C:\Development\android-sdk
Misc:
backend : pro
Run Code Online (Sandbox Code Playgroud)
这是我得到的错误:
:app:processDebugResources C:\ Users \ mmzep.gradle \ caches \ transforms-1 \ files-1.1 \ core-1.0.0.aar \ 73b4a83ab5e76f20c84a66b1c8444d08 …
我的Ionic应用程序工作正常,我没有做任何事情,但突然间我得到了这个错误,我不知道为什么.
"错误:未捕获(在承诺中):找不到removeView
我正在使用sidemenu ionic 2.当我从左向右滑动此页面时,侧面菜单滑出我需要在特定页面中禁用侧面菜单.
app.html
<ion-menu [content]="content">
<ion-content>
<ion-list>
<button ion-item *ngFor="let p of pages" menuClose (click)="openPage(p)" >
<ion-icon name="{{p.icon}}" item-left></ion-icon>
{{p.title}}
</button>
</ion-list>
</ion-content>
</ion-menu>
<ion-nav id="nav" [root]="rootPage" #content swipeBackEnabled="true"></ion-nav>
Run Code Online (Sandbox Code Playgroud)
page.html我在此页面中禁用了swipemenu,仅在我滑动时禁用
import {Component} from '@angular/core';
import {NavController} from 'ionic-angular';
@Component({
templateUrl: 'build/pages/portrait/portrait.html'
})
export class Portrait {
}
Run Code Online (Sandbox Code Playgroud)
page.html中
<ion-navbar persianred *navbar>
<button menuToggle>
<ion-icon name="menu"></ion-icon>
</button>
<ion-title>
Portrait
</ion-title>
</ion-navbar>
Run Code Online (Sandbox Code Playgroud) 我将服务定义为类,如下所示:
@Injectable()
export class MyService {
...
}
Run Code Online (Sandbox Code Playgroud)
在其他组件或页面中,我只使用import命令导入该类.
import { MyService } from '../pages/services/myservice';
Run Code Online (Sandbox Code Playgroud)
在构造函数中:
constructor(public _MyService: MyService)
Run Code Online (Sandbox Code Playgroud)
在我的主app.module.ts中,我已将该类服务添加为提供者.
providers: [someOtherThings, MyService, someOtherThings]
Run Code Online (Sandbox Code Playgroud)
在Ionic 2中,事情按预期工作.服务是单身人士.
但是在使用角度4的Ionic 3中,看起来每个组件都在创建该类的新实例.
是否有一些在角度4中创建单例服务类的新方法?
我有一个导入Http的服务,当我在我的应用程序中使用它时会抛出错误." 没有Http的提供者!g injectionError时出错 ".我懒得加载应用程序.提供者也是通过cli" ionic g provider ..." 生成的
投诉service.ts
import { Injectable } from '@angular/core';
import { Http } from '@angular/http';
import 'rxjs/add/operator/map';
@Injectable()
export class ComplaintService {
private complaints: {subject: string, description: string}[] = [];
constructor(public http: Http) {
this.http = http;
this.complaints = null;
console.log('Hello ComplaintService Provider');
}
addComplaints(complaint: {subject: string, description: string}) {
this.complaints.push(complaint);
}
getComplaints() {
return this.complaints.slice();
}
}
Run Code Online (Sandbox Code Playgroud)
投诉form.ts
import { Component } from '@angular/core';
import {Validators, FormBuilder, FormGroup } from '@angular/forms'; …Run Code Online (Sandbox Code Playgroud) 我尝试使用推送通知构建离子3应用程序,我在iOS部署时遇到了一些问题.
我在xcode中有这3个错误:
diff: /Podfile.lock: No such file or directory
diff: /Manifest.lock: No such file or directory
error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.
Run Code Online (Sandbox Code Playgroud)
我尝试了很多在互联网上找到的解决方案:
使用命令"pod install","pod update"
删除并安装CocoaPods
更新CocoaPods
删除"Pods"文件夹,"Podfile.lock"和"Podfile"并运行"pod install"命令.
从Link Binary From Librairies中删除libPods-myApp.a.
但没有什么是有效的......
我真的不知道自己要做什么.
我的Podfile:
# DO NOT MODIFY -- auto-generated by Apache Cordova
platform :ios, '8.0'
target 'MyProject' do
project 'MyProject.xcodeproj'
pod 'GoogleCloudMessaging', '~> 1.2.0'
pod 'GGLInstanceID', '~> 1.2.1'
end
Run Code Online (Sandbox Code Playgroud)
我的Podfile.lock:
PODS:
- GGLInstanceID (1.2.1) …Run Code Online (Sandbox Code Playgroud) 我正在尝试使用离子2和角度2构建应用程序,当我尝试运行我的应用程序时出现此错误.我建立另一个项目来检查和相同的问题,我真的很困惑这个问题.
这是我的服务代码
import { Injectable } from '@angular/core';
import { Http } from '@angular/http';
import 'rxjs/add/operator/map';
import { Storage} from '@ionic/storage';
import {NavController} from "ionic-angular";
/*
Generated class for the MyService provider.
See https://angular.io/docs/ts/latest/guide/dependency-injection.html
for more info on providers and Angular 2 DI.
*/
@Injectable()
export class MyService {
public local :Storage;
public getsession : any;
constructor(private http: Http, private navCtrl : NavController) {
this.local = new Storage();
console.log("my-service page")
}
postLogin(data){
let link = "http://adirzoari.16mb.com/login.php";
return this.http.post(link,data)
.map(res => …Run Code Online (Sandbox Code Playgroud) 我想创建一个简单的组件并将其包含在页面上.我用ionic g component my-header(ionic-cli v3 beta)创建它,修复了IonicPageModule错误,然后添加到另一个页面.然后我得到这个错误:
Error: Uncaught (in promise): Error: Template parse errors:
'my-header' is not a known element:
1. If 'my-header' is an Angular component, then verify that it is part of this module.
2. If 'my-header' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.
Run Code Online (Sandbox Code Playgroud)
"MyHeaderComponent"自动添加到@NgModule声明中.
谢谢你的帮助.
编辑:
该组件位于我的components文件夹中:
组件/我的头/我-了header.html
<div>
{{text}}
</div>
Run Code Online (Sandbox Code Playgroud)
组件/我的头/我-header.module.ts
import { NgModule } from '@angular/core';
import { IonicModule } from …Run Code Online (Sandbox Code Playgroud) ionic3 ×10
angular ×5
ionic2 ×5
android ×2
typescript ×2
cocoapods ×1
cordova ×1
firebase ×1
ionic-view ×1
ios ×1
javascript ×1
xcode ×1