任务应用程序执行失败:compileDebugAidl

时间:2021-03-14 22:43:52

标签: java android-studio

任务应用程序执行失败:compileDebugAidl 错误?未构建?我已经工作了 3 天,我无法解决错误。在线模式已开启。问题可能导致?我写了下面的所有信息。如果还有什么需要,请说

Execution failed for task ':app:compileDebugAidl'.
> Could not resolve all files for configuration ':app:debugCompileClasspath'.
   > Could not resolve com.onesignal:OneSignal:4.2.0.
     Required by:
         project :app
      > Could not find matching constructor for: org.gradle.api.internal.artifacts.ivyservice.ivyresolve.VersionInfo(String)
   > Could not resolve com.google.android.gms:play-services-auth:19.0.0.
     Required by:
         project :app
      > Could not find matching constructor for: org.gradle.api.internal.artifacts.ivyservice.ivyresolve.VersionInfo(String)
   > Could not resolve com.google.android.gms:play-services-ads:19.7.0.
     Required by:
         project :app
      > Could not find matching constructor for: org.gradle.api.internal.artifacts.ivyservice.ivyresolve.VersionInfo(String)
   > Could not resolve com.onesignal:OneSignal:{strictly 4.2.0}.
     Required by:
         project :app
      > Could not find matching constructor for: org.gradle.api.internal.artifacts.ivyservice.ivyresolve.VersionInfo(String)

Possible solution:
 - Declare repository providing the artifact, see the documentation at https://docs.gradle.org/current/userguide/declaring_repositories.html

构建 Gradle

plugins {
    id 'com.onesignal.androidsdk.onesignal-gradle-plugin' version '0.8.1'
}
apply plugin: 'com.onesignal.androidsdk.onesignal-gradle-plugin'
apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'

repositories {
    maven { url 'https://maven.google.com' }
}

android {
    signingConfigs {
        config {
            keyAlias 'key0'
            keyPassword '123456'
            storeFile file('C:/app/hitbetproKey.jks')
            storePassword '123456'
        }
    }
    compileSdkVersion 30
    buildToolsVersion "29.0.2"
    defaultConfig {
        applicationId "com.hitbetpro"
        minSdkVersion 16
        targetSdkVersion 30
        versionCode 1
        versionName "1"
        testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
        manifestPlaceholders = [onesignal_app_id: "", onesignal_google_project_number: "REMOTE"]
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
            signingConfig signingConfigs.config
        }
        debug {
            signingConfig signingConfigs.config
        }
    }
    productFlavors {
    }
}

dependencies {
    implementation fileTree(include: ['*.jar'], dir: 'libs')
    androidTestImplementation('androidx.test.espresso:espresso-core:3.3.0', {
        exclude group: 'com.android.support', module: 'support-annotations'
    })
    implementation 'androidx.appcompat:appcompat:1.2.0'
    implementation 'com.google.android.material:material:1.3.0'

    implementation 'com.onesignal:OneSignal:4.2.0'
    implementation 'androidx.browser:browser:1.3.0'
    implementation 'androidx.media:media:1.2.1'
    implementation 'androidx.legacy:legacy-support-v4:1.0.0'
    implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
    testImplementation 'junit:junit:4.13.2'

    implementation 'com.google.android.gms:play-services-auth:19.0.0'
    implementation 'com.google.android.gms:play-services-ads:19.7.0'
    implementation 'com.squareup.picasso:picasso:2.71828'
}

构建 App Gradle我写了下面的所有信息。如果还有什么需要,请说

// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
    repositories {
        jcenter()
        google()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:4.1.2'
        classpath 'com.google.gms:google-services:4.3.5'

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        jcenter()
        maven {
            url "https://maven.google.com"
        }

    }
}

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

帮帮我。帮我打。帮我打。帮我打。

0 个答案:

没有答案
相关问题