홈>
로컬 알림기본 플러그인을 설치할 때까지 내 앱이 제대로 실행 중이었습니다 :
이 명령을 실행했습니다 :
ionic cordova plugin add cordova-plugin-local-notification
그런 다음이
npm install --save @ionic-native/local-notifications
그런 다음
import { LocalNotifications } from '@ionic-native/local-notifications';
를 추가했습니다
app.module.ts에서
그런 다음
LocalNotifications
를 추가했습니다
NgModule의 공급자 부분에서
그런 다음
import { LocalNotifications } from '@ionic-native/local-notifications';
를 추가했습니다
내 home.ts에서
그런 다음
public localNotifications: LocalNotifications,
를 추가했습니다
생성자 매개 변수에
그런 다음 앱을 실행하려고했지만 빌드하고 싶지 않습니다. 다음은 로그입니다.
$ ionic cordova run android --target=95142bf1
Running app-scripts build: --platform android --target cordova
[01:14:05] build dev started ...
[01:14:05] clean started ...
[01:14:05] clean finished in 15 ms
[01:14:05] copy started ...
[01:14:05] deeplinks started ...
[01:14:05] deeplinks finished in 171 ms
[01:14:05] transpile started ...
[01:14:10] transpile finished in 5.13 s
[01:14:10] preprocess started ...
[01:14:10] preprocess finished in 15 ms
[01:14:10] webpack started ...
[01:14:11] copy finished in 5.79 s
[01:14:18] webpack finished in 8.11 s
[01:14:18] sass started ...
Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this w arning.
[01:14:20] sass finished in 1.81 s
[01:14:20] postprocess started ...
[01:14:20] postprocess finished in 31 ms
[01:14:20] lint started ...
[01:14:20] build dev finished in 15.49 s
> cordova run android --target 95142bf1
Android Studio project detected
ANDROID_HOME=C:\Users\Win 7\AppData\Local\Android\Sdk
JAVA_HOME=C:\Program Files\Java\jdk1.8.0_161
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' in stead.
The Task.leftShift(Closure) method has been deprecated and is scheduled to be re moved in Gradle 5.0. Please use Task.doLast(Action) instead.
at build_85bbhcbf5ogx3eqe0v2ws0it5.run(C:\Users\Win 7\Desktop\ThePfe\pfe z\platforms\android\app\build.gradle:146)
:CordovaLib:preBuild UP-TO-DATE
:CordovaLib:preDebugBuild UP-TO-DATE
:CordovaLib:compileDebugAidl
UP-TO-DATE
:CordovaLib:compileDebugRenderscript
UP-TO-DATE
:CordovaLib:checkDebugManifest UP-TO-DATE
:CordovaLib:generateDebugBuildConfig UP-TO-DATE
:CordovaLib:prepareLintJar
UP-TO-DATE
:CordovaLib:generateDebugResValues UP-TO-DATE
:CordovaLib:generateDebugResources UP-TO-DATE
:CordovaLib:packageDebugResources UP-TO-DATE
:CordovaLib:platformAttrExtractor UP-TO-DATE
:CordovaLib:processDebugManifest
UP-TO-DATE
:CordovaLib:processDebugResources UP-TO-DATE
:CordovaLib:generateDebugSources UP-TO-DATE
:CordovaLib:javaPreCompileDebug UP-TO-DATE
:CordovaLib:compileDebugJavaWithJavac
UP-TO-DATE
:CordovaLib:processDebugJavaRes
NO-SOURCE
:CordovaLib:transformClassesAndResourcesWithPrepareIntermediateJarsForDebug
UP-TO-DATE
:app:preBuild UP-TO-DATE
:app:preDebugBuild
:app:compileDebugAidl
UP-TO-DATE
:CordovaLib:packageDebugRenderscript NO-SOURCE
:app:compileDebugRenderscript UP-TO-DATE
:app:checkDebugManifest UP-TO-DATE
:app:generateDebugBuildConfig
UP-TO-DATE
:app:prepareLintJar UP-TO-DATE
:app:generateDebugResValues UP-TO-DATE
:app:generateDebugResources UP-TO-DATE
:app:mergeDebugResources
Error: Could not delete path 'C:\Users\Win 7\Desktop\ThePfe\pfez\platforms\andro id\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values-pa- rIN'.
:app:mergeDebugResources FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:processDebugManifest'.
> Manifest merger failed : Attribute meta-data#android.support.VERSION@value value=(25.4.0) from [com.android.support:appcompat-v7:25.4.0] AndroidManifest.xml:28:13-35
is also present at [com.android.support:support-v4:26.1.0] AndroidManifest.xml:28:13-35 value=(26.1.0).
Suggestion: add 'tools:replace="android:value"' to <meta-data> element at AndroidManifest.xml:26:9-28:38 to override.
* 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 3s
23 actionable tasks: 1 executed, 22 up-to-date
(node:5844) UnhandledPromiseRejectionWarning: Error: cmd: Command failed with exit code 1 Error output:
C:\Users\Win 7\Desktop\ThePfe\pfez\platforms\android\app\src\main\AndroidManifest.xml:28:13-35 Error:
Attribute meta-data#android.support.VERSION@value value=(25.4.0) from [com.android.support:appcompat-v7:25.4.0] AndroidManifest.xml:28:13-35
is also present at [com.android.support:support-v4:26.1.0] AndroidManifest.xml:28:13-35 value=(26.1.0).
Suggestion: add 'tools:replace="android:value"' to <meta-data> element at AndroidManifest.xml:26:9-28:38 to override.
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:processDebugManifest'.
> Manifest merger failed : Attribute meta-data#android.support.VERSION@value value=(25.4.0) from [com.android.support:appcompat-v7:25.4.0] AndroidManifest.xml:28:13-35
is also present at [com.android.support:support-v4:26.1.0] AndroidManifest.xml:28:13-35 value=(26.1.0).
Suggestion: add 'tools:replace="android:value"' to <meta-data> element at AndroidManifest.xml:26:9-28:38 to override.
* 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 3s
at ChildProcess.whenDone (C:\Users\Win 7\Desktop\ThePfe\pfez\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:5844) 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:5844) [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.
[OK] Your app has been deployed.
Did you know you can live-reload changes from your app with --livereload?
새로운 빈 프로젝트를 만들려고했는데, 플러그인을 설치하고 app.module.ts에 추가해야하는 것을 추가했는데 작동하지 않았습니다
-
답변 # 1
-
답변 # 2
이 플러그인 만 설치하여 새 jetjet을 만들려고했지만 작동하지 않아서 문제가 플러그인 자체와 관련이 있다고 생각합니다
관련 자료
- java - Post REST API 만 작동하고, PUT, GET, DELETE API가 스프링 부트 애플리케이션에서 작동하지 않습니다
- reactjs - 반응 애플리케이션의 포스트 요청이 작동하지 않습니다
- reactjs - npm start 명령이 작동하지 않음, React 애플리케이션을 실행하려고 할 때
- c# - Visual Studio에서 플러그인 애플리케이션 어셈블
- angularjs - Ionic fcm 플러그인, onNotification 기능이 작동하지 않음
- c# - Unity Android 빌드에서 USB 직렬 드라이버 Java 플러그인이 작동하지 않음
- c# - SQL LOCAL이 작동하지 않는 응용 프로그램 로그인 시스템
- javascript - Knockoutjs의 하위 목록에서 ICheck 플러그인이 작동하지 않음
- Jenkins 용 Mattermost 플러그인이 작동하지 않습니다
- web services - 백엔드 풀로 API를 사용하는 Azure Application Gateway가 작동하지 않습니다
- Azure App Service에서 슬롯 교체를 수행 한 후 애플리케이션 통찰력이 작동하지 않는 이유는 무엇입니까?
오류 : 'C : \ Users \ Win7 \ Desktop \ ThePfe \ pfez \ platforms \ andro ... 경로를 삭제할 수 없습니다 ... 사용자가 삭제중인 특정 디렉토리/파일에 대해 가지고 있지 않은 권한 문제 일 수 있습니다.
수정 :
어딘가에 플러그인 충돌이있는 것 같습니다
플러그인에 지원 라이브러리에 대한 여러 참조가 있지만 필요한 버전이 일치하지 않음을 나타냅니다.