【问题标题】:Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'. in capacitor android无法确定任务 ':app:compileDebugJavaWithJavac' 的依赖关系。在电容android
【发布时间】:2022-01-05 12:54:21
【问题描述】:

我在构建我的电容器项目时遇到了这个错误,我尝试通过更新 sdk 但不起作用,我该如何解决这个问题?

google-services.json not found, google-services plugin not applied. Push Notifications won't 
work
WARNING:: Using flatDirs should be avoided because it doesn't support any meta-data formats.
Currently detected usages:
- repository flatDir used in: project ':app', project ':capacitor-cordova-android-plugins'
WARNING:: Please remove usages of `jcenter()` Maven repository from your build scripts and 
migrate your build to other Maven repositories.
This repository is deprecated and it will be shut down in the future.
See http://developer.android.com/r/tools/jcenter-end-of-service for more information.
Currently detected usages in: root project 'android', project ':app', project ':capacitor- 
android', ...

FAILURE: Build failed with an exception.

* What went wrong:
Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'.
> SDK location not found. Define location with an ANDROID_SDK_ROOT environment 
variable or by setting the sdk.dir path in your project's local properties file 
at 'C:\Users\giova\Desktop\testapp\android\local.properties'.[capacitor]  

[ERROR] An error occurred while running subprocess capacitor. 

【问题讨论】:

  • ypur 应用文件夹中有 google-services.json 吗? SDK位置是否正确?
  • 我的应用文件夹中没有 google-services.json,我怎么知道 sdk 的正确位置是什么?
  • 解决办法在错误本身,SDK location not found. Define location with an ANDROID_SDK_ROOT environment

标签: java android gradle capacitor


【解决方案1】:

解决方案很简单,我必须正确选择项目文件夹,无论如何感谢您的帮助。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2021-09-02
    • 1970-01-01
    • 2020-10-28
    • 1970-01-01
    • 2021-10-26
    • 2022-09-27
    • 2020-07-11
    • 2020-09-17
    相关资源
    最近更新 更多