GVKun编程网logo

Intellij - 无法使用较新的 Java 8 类 - 错误:“API 的使用记录为 @since 1.6+..”

3

想了解Intellij-无法使用较新的Java8类-错误:“API的使用记录为@since1.6+..”的新动态吗?本文将为您提供详细的信息,此外,我们还将为您介绍关于2019-05-17ABRTha

想了解Intellij - 无法使用较新的 Java 8 类 - 错误:“API 的使用记录为 @since 1.6+..”的新动态吗?本文将为您提供详细的信息,此外,我们还将为您介绍关于2019-05-17 ABRT has detected 1 problem(s). For more info run: abrt-cli list --since 1558053651、angular6 Can''t bind to ''zzst'' since it isn''t a known property of、Angular7 报错:Can''t bind to ''formGroup'' since it isn''t a known property of ''form''、App Transport Security has blocked a cleartext HTTP (http://) resource load since it is insecure. Te的新知识。

本文目录一览:

Intellij - 无法使用较新的 Java 8 类 - 错误:“API 的使用记录为 @since 1.6+..”

Intellij - 无法使用较新的 Java 8 类 - 错误:“API 的使用记录为 @since 1.6+..”

我正在尝试java.lang.function.Function在我的 java 8 代码库中使用 a ,但我在 Intellij 中不断收到以下错误。

记录为 @since 1.6+ 的 API 的使用情况 此检查发现在其文档中具有 @since 标记的方法的所有使用情况。当在较新的 SDK
版本下作为生产的目标平台执行开发时,这可能很有用

我似乎有正确的项目和编译器设置

项目设置:(文件 - > 项目结构)

Project Settings -> Project -> Project SDK = Java 1.8Project Settings -> Project -> Project Language Level = 8 - Lambdas, Type Annotations etc

编译器设置:(文件 - > 设置)

Build, Execution, Deployment -> Compiler -> Java Compiler -> Project Bytecode Version : 1.8Build, Execution, Deployment -> Compiler -> Java Compiler -> Per module Bytecode Version -> Target Bytecode Version : 1.8

问题是什么?

答案1

小编典典

根据 Bastien Jansen 的评论编辑了答案。

似乎还有另一个项目设置会影响编译器级别。这个问题的一个微妙迹象是当你的编译器开始抱怨源和目标 java 版本与你在编译代码时指定的不同时

Warning:java: source value 1.5 is obsolete and will be removed in a future releaseWarning:java: target value 1.5 is obsolete and will be removed in a future releaseWarning:java: To suppress warnings about obsolete options, use -Xlint:-options.

要摆脱这个,你需要打开

File -> Project Structure -> Project Settings -> Modules -> "Your ModuleName" -> Sources -> Language Level

并将其更改为所需的级别,即 1.8 或项目默认语言级别

2019-05-17 ABRT has detected 1 problem(s). For more info run: abrt-cli list --since 1558053651

2019-05-17 ABRT has detected 1 problem(s). For more info run: abrt-cli list --since 1558053651

看了一博客  让我比较汗颜 因为我现在总是遇到问题 就是百度

好像已经变成我唯一解决问题的方式了

下图摘自一博客链接:https://blog.51cto.com/it3246/1889635

 看了后有些感悟 与大家共勉下 

下面开始解释问题

命令 1:abrt-cli list --since 1558053651 

可以看到引起这个问题的原因了  

意思大概可以看出是 系统出现一个 bug,什么 软件 lockup (死锁)  CPU 在这个压力下 29 秒后 崩溃了 哈哈  个人解释哈,

其他解释是 

#内核软死锁(soft lockup)bug

Soft lockup 名称解释:所谓,soft lockup 就是说,这个 bug 没有让系统彻底死机,但是若干个进程(或者 kernel thread)被锁死在了某个状态(一般在内核区域),很多情况下这个是由于内核锁的使用的问题。

解决方案:

[root@git-node1 data]# tail -1 /proc/sys/kernel/watchdog_thresh
30

#临时生效

sysctl -w kernel.watchdog_thresh=30

#永久配置:

命令:vi /etc/sysctl.conf

最后一行添加:kernel.watchdog_thresh=30

就 OK 了!

angular6 Can''t bind to ''zzst'' since it isn''t a known property of

angular6 Can''t bind to ''zzst'' since it isn''t a known property of

文档: https://angular.io/guide/template-syntax#event-binding

 

 

The Angular compiler may reject these bindings with errors like this one:

content_copyUncaught Error: Template parse errors: Can''t bind to ''hero'' since it isn''t a known property of ''app-hero-detail''

You know that HeroDetailComponent has hero and deleteRequest properties. But the Angular compiler refuses to recognize them.

The Angular compiler won''t bind to properties of a different component unless they are Input or Output properties.

There''s a good reason for this rule.

It''s OK for a component to bind to its own properties. The component author is in complete control of those bindings.

But other components shouldn''t have that kind of unrestricted access. You''d have a hard time supporting your component if anyone could bind to any of its properties. Outside components should only be able to bind to the component''s public binding API.

Angular asks you to be explicit about that API. It''s up to you to decide which properties are available for binding by external components.

TypeScript public doesn''t matterlink

You can''t use the TypeScript public and private access modifiers to shape the component''s public binding API.

All data bound properties must be TypeScript public properties. Angular never binds to a TypeScript privateproperty.

 Angular requires some other way to identify properties that outside components are allowed to bind to. That other way is the @Input() and @Output() decorators.

 

 

Angular7 报错:Can''t bind to ''formGroup'' since it isn''t a known property of ''form''

Angular7 报错:Can''t bind to ''formGroup'' since it isn''t a known property of ''form''

报错问题:Can''t bind to ''formGroup'' since it isn''t a known property of ''form''

报错提示:

Uncaught Error: Template parse errors:
Can''t bind to ''formGroup'' since it isn''t a known property of ''form''. ("</p>
<form [ERROR ->][formGroup]="loginForm">
  <label>
"): ng:///AppModule/LoginComponent.html@7:6

问题原因:

没有导入表单模块。

解决办法:

@angular/forms 中导入 ReactiveFormsModule 模块。

import { FormsModule, ReactiveFormsModule } from ''@angular/forms'';

修改后代码实例

login.component.ts 代码:

import { Component }   from ''@angular/core'';
import { Router }      from ''@angular/router'';
import { FormBuilder, FormControl, FormGroup, Validators } from ''@angular/forms'';

@Component({
  selector: ''app-login'',
  templateUrl: ''./login.component.html'',
  styleUrls: [''./login.component.css'']
})
export class LoginComponent {
  
  message: string;
  public userId: number = 0;
  public storeId: number = 0;

  constructor(
    private fb: FormBuilder,
    public router: Router
  ) {
    this.setMessage();
  }

  loginForm = this.fb.group({
    username: ['''', Validators.required],
    userpass: ['''', Validators.required],
    captcha:  [''''],
  });

  onLogin() {
    console.log(this.loginForm)
  }
}

login.component.html 代码:

<form [formGroup]="loginForm">
  <label>
    account: <input type="text" formControlName="username">
  </label>
  <label>
    password: <input type="text" formControlName="userpass">
  </label>
  <button type="button" (click)="onLogin()" [disabled]="!loginForm.valid">Submit</button>
</form>

app.module.ts 代码如下:

import { BrowserModule } from ''@angular/platform-browser'';
import { NgModule } from ''@angular/core'';
import { AppRoutingModule } from ''./app-routing.module'';
import { AppComponent } from ''./app.component'';
import { LoginComponent } from ''./auth/login/login.component'';
// 引入表单模块
import { FormsModule, ReactiveFormsModule } from ''@angular/forms'';

@NgModule({
  declarations: [
    AppComponent,
    PageNotFoundComponent,
    DashboardComponent,
    LoginComponent
  ],
  imports: [
    BrowserModule,
    UsersModule,
    // 导入表单模块
    FormsModule,
    ReactiveFormsModule,
    AppRoutingModule
  ],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule { }

参考链接:

https://stackoverflow.com/questions/39152071/cant-bind-to-formgroup-since-it-isnt-a-known-property-of-form

更多内容,请查看项目代码:

https://github.com/cnwyt/angular-tour-of-heroes

[END]

App Transport Security has blocked a cleartext HTTP (http://) resource load since it is insecure. Te

App Transport Security has blocked a cleartext HTTP (http://) resource load since it is insecure. Te

App Transport Security has blocked a cleartext HTTP (http://) resource load since it is insecure. Te

我们今天的关于Intellij - 无法使用较新的 Java 8 类 - 错误:“API 的使用记录为 @since 1.6+..”的分享就到这里,谢谢您的阅读,如果想了解更多关于2019-05-17 ABRT has detected 1 problem(s). For more info run: abrt-cli list --since 1558053651、angular6 Can''t bind to ''zzst'' since it isn''t a known property of、Angular7 报错:Can''t bind to ''formGroup'' since it isn''t a known property of ''form''、App Transport Security has blocked a cleartext HTTP (http://) resource load since it is insecure. Te的相关信息,可以在本站进行搜索。

本文标签: