我创建了一个新的 android 项目它在构建时显示错误
我尝试了现有的答案
错误是
错误:无法解析“:app@debugAndroidTest/compileClasspath”的依赖关系:无法解析 junit:junit:4.12。
错误:无法解析“:app@releaseUnitTest/compileClasspath”的依赖关系:无法解析 junit:junit:4.12。
错误:无法解析“:app@debugUnitTest/compileClasspath”的依赖关系:无法解析 junit:junit:4.12。
错误:无法解析“:app@debugAndroidTest/compileClasspath”的依赖关系:无法解析 com.google.code.findbugs:jsr305:2.0.1。
我的 gradle 文件的依赖项部分
dependencies
{
implementation 'androidx.appcompat:appcompat:1.0.2'
testImplementation 'junit:junit:4.12'
}
Run Code Online (Sandbox Code Playgroud)
我不明白这是我的第一个项目。
我的项目等级是
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.4.1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories { …Run Code Online (Sandbox Code Playgroud) 我在 Spring 工具套件中创建了一个 spring 项目。
即使在添加所有依赖项后,它也显示无法解析 @GetMapping
错误信息
GetMapping cannot be resolved to a type
Run Code Online (Sandbox Code Playgroud)
我的代码是
package tacos;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.GetMapping;
@Controller
public class HomeController
{
@GetMapping
public String home()
{
return "home";
}
}
Run Code Online (Sandbox Code Playgroud)
正如您在这一行中看到的,我已经导入了 GetMapping。
import org.springframework.web.bind.annotation.GetMapping;
Run Code Online (Sandbox Code Playgroud)
pom.xml
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.1.6.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>sia</groupId>
<artifactId>taco-cloud</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>taco-cloud</name>
<description>Taco cloud example</description>
<properties>
<java.version>1.8</java.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
</dependency>
<dependency> …Run Code Online (Sandbox Code Playgroud) Stackoverflow 允许评论或回答链接。这意味着它允许您创建指向特定答案的链接或对帖子的评论。
我的问题是它如何将浏览器拖动到该特定帖子
我知道他们将 id 用于特定的评论或帖子。
使用哪种技术或技术来创造这样的东西?
我在 meta.stackexchange.com 上看过几篇文章,但它没有回答用于创建它的技术或技术?