我有一个项目,我用jdk 6,7,8构建这个项目,我的目标是1.6
当我构建jdk 8时,我收到此错误:
Undefined reference: java.util.concurrent.ConcurrentHashMap.KeySetView java.util.concurrent.ConcurrentHashMap.keySet()
因为我在这行中有这个代码:
final Iterator<CLASS_NAME> itr = hashMap.keySet().iterator();
Run Code Online (Sandbox Code Playgroud)
如何避免错误,我在互联网上进行了一些搜索,并且由于java 8改变了它的返回类型键集,我得到了错误.这是任何解决方案.我正在使用maven,而animal-sniffer-plugin会出现此错误,并出现签名错误.
我正在尝试非常简单的角度4 http请求.当我检查chrome开发人员工具时,我看不到http标头.
const headers: Headers = new Headers();
headers.append('Content-Type', 'application/json');
headers.append('Authorization', 'Bearer: 123213');
this.http.post('https://127.0.0.1:502', JSON.stringify(token), {headers: headers}).subscribe();
Run Code Online (Sandbox Code Playgroud)
我错过了什么吗?
我正进入(状态
由于缺少执行数据文件而跳过JaCoCo执行:/scratch/jenkins/workspace/sonar-test/target/jacoco.exec错误
我的pom档案是:
<profile>
<id>test-coverage</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>${maven.surefire.plugin.version}</version>
<configuration combine.self="override">
<redirectTestOutputToFile>true</redirectTestOutputToFile>
<testFailureIgnore>true</testFailureIgnore>
<groups>com.project.test.annotation.QuickTest</groups>
</configuration>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.7.1.201405082137</version>
<executions>
<execution>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
<execution>
<id>report</id>
<phase>prepare-package</phase>
<goals>
<goal>report</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
Run Code Online (Sandbox Code Playgroud)
我错过了什么?
我有一个简单的程序。我的程序是:
#include <QApplication>
#include <QLabel>
int main(int argc, char *argv[])
{
int rc ;
QApplication app(argc, argv);
QLabel *label = new QLabel("Hello Qt!");
label->show();
rc = app.exec();
return(rc) ;
}
Run Code Online (Sandbox Code Playgroud)
我想在命令行中编译和构建此代码。我已经安装了 qt 和 mingw。
首先我的命令是:
qmake -project
Run Code Online (Sandbox Code Playgroud)
然后我发出这个命令。
qmake
Run Code Online (Sandbox Code Playgroud)
然后 qmake 创建 .pro 文件,它是:
TEMPLATE = app
TARGET = HELLO
INCLUDEPATH += .
# Input
SOURCES += hello.cpp
Run Code Online (Sandbox Code Playgroud)
我认为这个文件必须包含'QT += widgets',但它没有。我不知道为什么。最后,我打电话给mingw make
它给出了错误。
当我添加 .pro 文件 QT += widgets 然后调用 mingw-make 时,它会工作并创建 .exe 文件。
那么我的问题是,为什么 qmake 会自动添加 QT += widgets …