Java gradle生成错误:无法解析com.android。支持:appcompat-v7:28.0.0

Java gradle生成错误:无法解析com.android。支持:appcompat-v7:28.0.0,java,maven,gradle,repository,build.gradle,Java,Maven,Gradle,Repository,Build.gradle,我不合适吗?因为我希望下面的springframework能够很容易地得到解决 无法解析springframework: nicholas@mordor:~/NetBeansProjects/hello_odoo$ nicholas@mordor:~/NetBeansProjects/hello_odoo$ gradle clean run > Task :app:run FAILED FAILURE: Build failed with an exception. * What w

我不合适吗?因为我希望下面的
springframework
能够很容易地得到解决

无法解析springframework:

nicholas@mordor:~/NetBeansProjects/hello_odoo$ 
nicholas@mordor:~/NetBeansProjects/hello_odoo$ gradle clean run
> Task :app:run FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:run'.
> Could not resolve all files for configuration ':app:runtimeClasspath'.
   > Could not resolve com.android.support:appcompat-v7:28.0.0.
     Required by:
         project :app > com.oogbox.api:odoo:1.0.4
      > Could not resolve com.android.support:appcompat-v7:28.0.0.
         > Could not get resource 'http://maven.springframework.org/release/com/android/support/appcompat-v7/28.0.0/appcompat-v7-28.0.0.pom'.
            > Could not GET 'http://maven.springframework.org/release/com/android/support/appcompat-v7/28.0.0/appcompat-v7-28.0.0.pom'. Received status code 403 from server: Forbidden

* 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

Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.7/userguide/command_line_interface.html#sec:command_line_warnings

BUILD FAILED in 2s
3 actionable tasks: 3 executed
nicholas@mordor:~/NetBeansProjects/hello_odoo$ 
gradle.build
文件:

/*
 * This file was generated by the Gradle 'init' task.
 *
 * This generated file contains a sample Java application project to get you started.
 * For more details take a look at the 'Building Java & JVM projects' chapter in the Gradle
 * User Manual available at https://docs.gradle.org/6.7/userguide/building_java_projects.html
 */

plugins {
    // Apply the application plugin to add support for building a CLI application in Java.
    id 'application'
}


repositories {
  jcenter()
  mavenCentral()
  maven { url "http://maven.springframework.org/release" }
  maven { url "http://maven.restlet.org" }
}



dependencies {
    // Use TestNG framework, also requires calling test.useTestNG() below
    testImplementation 'org.testng:testng:7.2.0'

    // This dependency is used by the application.
    implementation 'com.google.guava:guava:29.0-jre'

    // https://mvnrepository.com/artifact/com.oogbox.api/odoo
    compile group: 'com.oogbox.api', name: 'odoo', version: '1.0.4'



//    providedCompile 'javax.servlet:javax.servlet-api:3.1.0' 
//    testCompile 'junit:junit:4.12'

}

application {
    // Define the main class for the application.
    mainClass = 'hello_odoo.App'
}

tasks.named('test') {
    // Use TestNG for unit tests.
    useTestNG()
}

hello world至少编译并运行:

nicholas@mordor:~/NetBeansProjects/hello_odoo$ 
nicholas@mordor:~/NetBeansProjects/hello_odoo$ gradle clean run

> Task :app:run
Hello World!

Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.7/userguide/command_line_interface.html#sec:command_line_warnings

BUILD SUCCESSFUL in 2s
3 actionable tasks: 3 executed
nicholas@mordor:~/NetBeansProjects/hello_odoo$ 
生成文件:

/*
 * This file was generated by the Gradle 'init' task.
 *
 * This generated file contains a sample Java application project to get you started.
 * For more details take a look at the 'Building Java & JVM projects' chapter in the Gradle
 * User Manual available at https://docs.gradle.org/6.7/userguide/building_java_projects.html
 */

plugins {
    // Apply the application plugin to add support for building a CLI application in Java.
    id 'application'
}


repositories {
  jcenter()
  mavenCentral()
//  maven { url "http://maven.springframework.org/release" }
//  maven { url "http://maven.restlet.org" }
  maven { url 'https://maven.google.com' }

}





dependencies {
    // Use TestNG framework, also requires calling test.useTestNG() below
    testImplementation 'org.testng:testng:7.2.0'

    // This dependency is used by the application.
    implementation 'com.google.guava:guava:29.0-jre'

    // https://mvnrepository.com/artifact/com.oogbox.api/odoo
    compile group: 'com.oogbox.api', name: 'odoo', version: '1.0.4'

//    providedCompile 'javax.servlet:javax.servlet-api:3.1.0' 
//    testCompile 'junit:junit:4.12'

}

application {
    // Define the main class for the application.
    mainClass = 'hello_odoo.App'
}

tasks.named('test') {
    // Use TestNG for unit tests.
    useTestNG()
}
虽然我不清楚回购协议,但我也不确定这是否解决了“问题”,并准备好使用API