我只是想在android上运行我的离子项目,并尝试通过默认模拟器和genymotion,但继续得到相同的错误。我已经仔细检查了我的JAVA_HOME是否已设置并且jdk是最新的,并且项目结构jdk设置为正确的位置。此外,我在更新版本后删除并重新添加了android平台。最后我检查了android studio并确保所有SDK工具都是最新的,但仍然得到以下答案,并且无法解决我搜索过的任何教程的问题。
下面是我为android构建时遇到的错误:
:compileDebugJavaWithJavac - is not incremental (e.g. outputs have changed, no previous execution, etc.).
/Users/DrewGelinas/Desktop/lndFinal/platforms/android/src/org/chromium/customtabsclient/shared/CustomTabsHelper.java:77: error: diamond operator is not supported in -source 1.6
List<String> packagesSupportingCustomTabs = new ArrayList<>();
^
(use -source 7 or higher to enable diamond operator)
/Users/DrewGelinas/Desktop/lndFinal/platforms/android/src/org/chromium/customtabsclient/shared/ServiceConnection.java:32: error: diamond operator is not supported in -source 1.6
mConnectionCallback = new WeakReference<>(connectionCallback);
^
(use -source 7 or higher to enable diamond operator)
2 errors
:compileDebugJavaWithJavac
FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':compileDebugJavaWithJavac'.
> Compilation failed; see the compiler error output for details.
* Try:
Run with
--stacktrace option to get the stack trace. Run with --info or
--debug option to get more log output.
BUILD FAILED
Total time: 1.502 secs
(node:16040) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: /Users/DrewGelinas/Desktop/lndFinal/platforms/android/gradlew: Command failed with exit code 1 Error output:
/Users/DrewGelinas/Desktop/lndFinal/platforms/android/src/org/chromium/customtabsclient/shared/CustomTabsHelper.java:77: error: diamond operator is not supported in -source 1.6
List<String> packagesSupportingCustomTabs = new ArrayList<>();
^
(use -source 7 or higher to enable diamond operator)
/Users/DrewGelinas/Desktop/lndFinal/platforms/android/src/org/chromium/customtabsclient/shared/ServiceConnection.java:32: error: diamond operator is not supported in -source 1.6
mConnectionCallback = new WeakReference<>(connectionCallback);
^
(use -source 7 or higher to enable diamond operator)
2 errors
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':compileDebugJavaWithJavac'.
> Compilation failed; see the compiler error output for details.