gpt4 book ai didi

android - Onesignal坚持不懈

转载 作者:行者123 更新时间:2023-12-03 05:32:31 31 4
gpt4 key购买 nike

我在应用程序中安装了Onesignal,但突然出现此错误。
我删除了onesignal中连接的所有内容,但仍然收到此错误。

调试时VS CODE错误:

* Error running Gradle:
ProcessException: Process exited abnormally:
Starting a Gradle Daemon, 2 incompatible Daemons could not be reused, use --status for details

> Configure project :app
WARNING: API 'variant.getJavaCompile()' is obsolete and has been replaced with 'variant.getJavaCompileProvider()'.
It will be removed at the end of 2019.
For more information, see https://d.android.com/r/tools/task-configuration-avoidance.
To determine what is calling variant.getJavaCompile(), use -Pandroid.debug.obsoleteApi=true on the command line to display a stack trace.

> Configure project :firebase_admob

Project evaluation failed including an error in afterEvaluate {}. Run with --stacktrace for details of the afterEvaluate {} error.

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring project ':firebase_admob'.
> Could not resolve all artifacts for configuration ':firebase_admob:classpath'.
> Could not find any matches for gradle.plugin.com.onesignal:onesignal-gradle-plugin:[0.12.4, 0.99.99] as no versions of gradle.plugin.com.onesignal:onesignal-gradle-plugin are available.
Searched in the following locations:
- https://dl.google.com/dl/android/maven2/gradle/plugin/com/onesignal/onesignal-gradle-plugin/maven-metadata.xml
- https://dl.google.com/dl/android/maven2/gradle/plugin/com/onesignal/onesignal-gradle-plugin/
- https://jcenter.bintray.com/gradle/plugin/com/onesignal/onesignal-gradle-plugin/maven-metadata.xml
- https://jcenter.bintray.com/gradle/plugin/com/onesignal/onesignal-gradle-plugin/
Required by:
project :firebase_admob

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

* Get more help at https://help.gradle.org

BUILD FAILED in 15s
Command: C:\Users\Anonymous\Desktop\newwwapp\android\gradlew.bat app:properties

Android Studio错误:
Could not find any matches for gradle.plugin.com.onesignal:onesignal-gradle-plugin:[0.12.4, 0.99.99] as no versions of gradle.plugin.com.onesignal:onesignal-gradle-plugin are available.
Searched in the following locations:
- https://dl.google.com/dl/android/maven2/gradle/plugin/com/onesignal/onesignal-gradle-plugin/maven-metadata.xml
- https://dl.google.com/dl/android/maven2/gradle/plugin/com/onesignal/onesignal-gradle-plugin/
- https://jcenter.bintray.com/gradle/plugin/com/onesignal/onesignal-gradle-plugin/maven-metadata.xml
- https://jcenter.bintray.com/gradle/plugin/com/onesignal/onesignal-gradle-plugin/
Required by:
project :firebase_admob

Adnroid / Build.gradle包括:
buildscript {
ext.kotlin_version = '1.2.71'
repositories {
google()
jcenter()
}

dependencies {
classpath 'com.android.tools.build:gradle:3.3.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.google.gms:google-services:4.2.0'
}
}

allprojects {
repositories {
google()
jcenter()
}
}

rootProject.buildDir = '../build'
subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
project.evaluationDependsOn(':app')
}

task clean(type: Delete) {
delete rootProject.buildDir
}

这是app / build.gradle:
def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
localPropertiesFile.withReader('UTF-8') { reader ->
localProperties.load(reader)
}
}

def flutterRoot = localProperties.getProperty('flutter.sdk')
if (flutterRoot == null) {
throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
}

def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
if (flutterVersionCode == null) {
flutterVersionCode = '1'
}

def flutterVersionName = localProperties.getProperty('flutter.versionName')
if (flutterVersionName == null) {
flutterVersionName = '1.0'
}

apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"

android {
compileSdkVersion 28

sourceSets {
main.java.srcDirs += 'src/main/kotlin'
}

lintOptions {
disable 'InvalidPackage'
}

defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.example.lottothesmartapp"
minSdkVersion 16
targetSdkVersion 28
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}

buildTypes {
release {
// TODO: Add your own signing config for the release build.
// Signing with the debug keys for now, so `flutter run --release` works.
signingConfig signingConfigs.debug
}
}
}

flutter {
source '../..'
}

dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'
}

我记得我没有更改gradle中的任何内部代码,我只是在build.gradle中添加了一些代码实现并进行了调试。
然后删除添加的代码以消除上面显示的错误,并保持不变。
有什么解决办法吗?

最佳答案

您是否从pubspec.yaml加载onesignal库?也许在pubspec.lock中。

关于android - Onesignal坚持不懈,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58472009/

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