例:Compilation failed; see the compiler error output for details.

在练习AS共享数据时莫名其妙运行就出现了这个错误。百度了一下,看到在AS里自行找错误的方法。
在Terminal中操作:输入
gradlew compileDebug --stacktrace
gradlew compileDebugSources --stacktrace -info
我运行的是
gradlew compileDebugSources --stacktrace -info
找到如下错误:关于怎样在AS里找错误
于是我找到上面定义的List<String> contactsList = new ArrayList<>();
发现List是红色的,于是删掉重新写了一遍就可以了。

虽然这只是个小问题,但是通过这件事我知道了怎么在AS里找问题也是一件好事。

相关文章:

  • 2021-07-04
  • 2022-03-01
  • 2021-08-25
  • 2022-02-22
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-23
猜你喜欢
  • 2021-11-17
  • 2021-06-01
  • 2021-12-16
  • 2021-12-15
相关资源
相似解决方案