gpt4 book ai didi

android - Cordova 无法使用 cordova-plugin-local-notifications 构建

转载 作者:行者123 更新时间:2023-11-30 01:24:42 25 4
gpt4 key购买 nike

我已经使用这个命令添加了通知插件:

cordova plugin add https://github.com/katzer/cordova-plugin-local-notifications.git

但是,当我构建应用程序时,它失败并出现以下错误。

> cordova build android --release

ANDROID_HOME=E:\Android\sdk
JAVA_HOME=C:\Program Files\Java\jdk1.8.0_31

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring root project 'android'.
> Could not resolve all dependencies for configuration ':_debugCompile'.
> Could not find any version that matches com.android.support:support-v4:+.
Searched in the following locations:
https://repo1.maven.org/maven2/com/android/support/support-v4/maven-metadata.xml
https://repo1.maven.org/maven2/com/android/support/support-v4/
Required by:
:android:unspecified

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug
option to get more log output.

BUILD FAILED

Total time: 4.119 secs
Error: Error code 1 for command: cmd with args: /s,/c,"E:\PhoneGap\MyApp\platforms\android\gradlew
cdvBuildRelease -b E:\PhoneGap\MyApp\platforms\android\build.gradle
-Dorg.gradle.daemon=true -Pandroid.useDeprecatedNdk=true"

最佳答案

我有类似的问题,我找到了解决方法。创建平台后,用android Studio打开platform/android文件夹

在项目左侧标签中,在android中左键点击,选择“Open Module Settings”

转到“依赖项”选项卡,单击“+”和“库依赖项”

选择“支持v4”,点击“确定”

现在您可以构建它了。

也可以通过添加

<framework src="com.android.support:support-v4:+" />

到你的 config.xml,但它对我不起作用

此外,您还有更多信息:

https://github.com/phonegap-build/PushPlugin/issues/492

也许这对你有帮助。

请发布你的结果

关于android - Cordova 无法使用 cordova-plugin-local-notifications 构建,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36547338/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com