android编译失败 求解决办法

lucky 6月前 300

android编译失败 求解决办法

我是在系统根目录编译的

是必须在Android Studio进行编译才行吗

新手 求解

上传的附件:
最新回复 (28)
  • lucky 6月前
    引用 2
    Starting a Gradle Daemon (subsequent builds will be faster)

    FAILURE: Build failed with an exception.

    * What went wrong:
    A problem occurred configuring root project 'android-chat-1.1.1'.
    > Could not resolve all files for configuration ':classpath'.
       > Could not resolve com.android.tools.build:gradle:8.0.0.
         Required by:
             project :
          > No matching variant of com.android.tools.build:gradle:8.0.0 was found. The consumer was configured to find a library for use during runtime, compatible with Java 8, packaged as a jar, and its dependencies declared externally, as well as attribute 'org.gradle.plugin.api-version' with value '8.0' but:
              - Variant 'apiElements' capability com.android.tools.build:gradle:8.0.0 declares a library, packaged as a jar, and its dependencies declared externally:
                  - Incompatible because this component declares a component for use during compile-time, compatible with Java 11 and the consumer needed a component for use during runtime, compatible with Java 8
                  - Other compatible attribute:
                      - Doesn't say anything about org.gradle.plugin.api-version (required '8.0')
              - Variant 'javadocElements' capability com.android.tools.build:gradle:8.0.0 declares a component for use during runtime, and its dependencies declared externally:
                  - Incompatible because this component declares documentation and the consumer needed a library
                  - Other compatible attributes:
                      - Doesn't say anything about its target Java version (required compatibility with Java 8)
                      - Doesn't say anything about its elements (required them packaged as a jar)
                      - Doesn't say anything about org.gradle.plugin.api-version (required '8.0')
              - Variant 'runtimeElements' capability com.android.tools.build:gradle:8.0.0 declares a library for use during runtime, packaged as a jar, and its dependencies declared externally:
                  - Incompatible because this component declares a component, compatible with Java 11 and the consumer needed a component, compatible with Java 8
                  - Other compatible attribute:
                      - Doesn't say anything about org.gradle.plugin.api-version (required '8.0')
              - Variant 'sourcesElements' capability com.android.tools.build:gradle:8.0.0 declares a component for use during runtime, and its dependencies declared externally:
                  - Incompatible because this component declares documentation and the consumer needed a library
                  - Other compatible attributes:
                      - Doesn't say anything about its target Java version (required compatibility with Java 8)
                      - Doesn't say anything about its elements (required them packaged as a jar)
                      - Doesn't say anything about org.gradle.plugin.api-version (required '8.0')
       > Could not resolve com.android.tools.build:gradle:3.1.4.
         Required by:
             project : > com.huawei.agconnect:agcp:1.8.0.300 > com.huawei.agconnect:agconnect-apms-plugin:1.6.1.300
          > No matching variant of com.android.tools.build:gradle:8.0.0 was found. The consumer was configured to find a library for use during runtime, compatible with Java 8, packaged as a jar, and its dependencies declared externally, as well as attribute 'org.gradle.plugin.api-version' with value '8.0' but:
              - Variant 'apiElements' capability com.android.tools.build:gradle:8.0.0 declares a library, packaged as a jar, and its dependencies declared externally:
                  - Incompatible because this component declares a component for use during compile-time, compatible with Java 11 and the consumer needed a component for use during runtime, compatible with Java 8
                  - Other compatible attribute:
                      - Doesn't say anything about org.gradle.plugin.api-version (required '8.0')
              - Variant 'javadocElements' capability com.android.tools.build:gradle:8.0.0 declares a component for use during runtime, and its dependencies declared externally:
                  - Incompatible because this component declares documentation and the consumer needed a library
                  - Other compatible attributes:
                      - Doesn't say anything about its target Java version (required compatibility with Java 8)
                      - Doesn't say anything about its elements (required them packaged as a jar)
                      - Doesn't say anything about org.gradle.plugin.api-version (required '8.0')
              - Variant 'runtimeElements' capability com.android.tools.build:gradle:8.0.0 declares a library for use during runtime, packaged as a jar, and its dependencies declared externally:
                  - Incompatible because this component declares a component, compatible with Java 11 and the consumer needed a component, compatible with Java 8
                  - Other compatible attribute:
                      - Doesn't say anything about org.gradle.plugin.api-version (required '8.0')
              - Variant 'sourcesElements' capability com.android.tools.build:gradle:8.0.0 declares a component for use during runtime, and its dependencies declared externally:
                  - Incompatible because this component declares documentation and the consumer needed a library
                  - Other compatible attributes:
                      - Doesn't say anything about its target Java version (required compatibility with Java 8)
                      - Doesn't say anything about its elements (required them packaged as a jar)
                      - Doesn't say anything about org.gradle.plugin.api-version (required '8.0')

    * Try:
    > Run with --stacktrace option to get the stack trace.
    > Run with --info or --debug option to get more log output.
    > Run with --scan to get full insights.

    * Get more help at https://help.gradle.org

    Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.

    You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

    See https://docs.gradle.org/8.0/userguide/command_line_interface.html#sec:command_line_warnings

    BUILD FAILED in 2m 32s
  • x86 6月前
    引用 3

    jdk 要求 17 版本

    另外,需要保证网络畅通,即能正常访问 google
  • lucky 6月前
    引用 4
    FAILURE: Build failed with an exception.

    * What went wrong:
    Could not determine the dependencies of task ':chat:compileDebugJavaWithJavac'.
    > Cannot query the value of this property because it has no value available.

    * Try:
    > Run with --stacktrace option to get the stack trace.
    > Run with --info or --debug option to get more log output.
    > Run with --scan to get full insights.

    * Get more help at https://help.gradle.org

    Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.

    You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

    See https://docs.gradle.org/8.0/userguide/command_line_interface.html#sec:command_line_warnings

    BUILD FAILED in 2s
  • lucky 6月前
    引用 5
    x86 jdk 要求 17 版本 另外,需要保证网络畅通,即能正常访问 google
    老师麻烦看一下报这个错是什么原因
  • lucky 6月前
    引用 6
    jdk换了17了,sdk也换了33.03的
  • x86 6月前
    引用 7
    你是执行什么命令编译?

    项目目录下执行 ./gradlew clean aDebug
  • lucky 6月前
    引用 8
    执行这个./gradlew clean build
  • x86 6月前
    引用 9
    有点奇怪,请你微信添加下:wfchat ,他了解下情况
  • lucky 6月前
    引用 10
    BUILD SUCCESSFUL in 13m 12s 
    android编译成功了,请问我该如何使用呢
  • x86 6月前
    引用 11
    lucky BUILD SUCCESSFUL in 13m 12s android编译成功了,请问我该如何使用呢
    啥意思?
    看文档快速开始部分:https://docs.wildfirechat.cn/quick_start/
  • lucky 6月前
    引用 12
    我实在linux系统直接编译android的没在android studio,
  • lucky 6月前
    引用 13
    我把编译之后的apk文件下载下来安装提示packageinfo is null
  • x86 6月前
    引用 14
    lucky 我把编译之后的apk文件下载下来安装提示packageinfo is null
    这个可能是由于未签名,或者签名错误引起的。

    你用 ./gradlew clean aDebug 编译,这样生成的 apk,应当有 debug 签名
  • lucky 6月前
    引用 15
    Android的没问题了 ios怎样在系统编译呀 
  • x86 6月前
    引用 16
    lucky Android的没问题了 ios怎样在系统编译呀
    ios必须要mac系统,用xcode编译打包
  • lucky 6月前
    引用 17
    除了Android和ios端,其他要先支付使用费用才能试用吗
  • x86 6月前
    引用 18
    lucky 除了Android和ios端,其他要先支付使用费用才能试用吗
    是的
  • lucky 6月前
    引用 19

    客户端测试登录提示这个是什么原因呢,im和app服务都是启起来的 网也是通的,就是连不上,连接失败日志也没进来

  • lucky 6月前
    引用 20
    这是什么原因呢 im和app服务都起来了 网络也通的 但就是连不上,连接失败日志也没进来
  • lucky 6月前
    引用 21

  • x86 6月前
    引用 22
    请看下app-server 的日志
  • lucky 6月前
    引用 23
    app日志没进来,但是我移动端是能访问ip/api/version和8888端口是返回oj的
  • x86 6月前
    引用 24
    500 是服务端报的错,app-server 的日志里面,肯定有
  • lucky 6月前
    引用 25
    2023-11-08 22:01:10.944  INFO 23546 --- [idationThread-1] a.s.s.m.AbstractValidatingSessionManager : Validating all active sessions...
    2023-11-08 22:01:10.944  INFO 23546 --- [idationThread-1] a.s.s.m.AbstractValidatingSessionManager : Finished session validation.  No sessions were stopped.
    2023-11-08 23:01:10.943  INFO 23546 --- [idationThread-1] a.s.s.m.AbstractValidatingSessionManager : Validating all active sessions...
    2023-11-08 23:01:10.944  INFO 23546 --- [idationThread-1] a.s.s.m.AbstractValidatingSessionManager : Finished session validation.  No sessions were stopped.
    2023-11-09 00:01:10.943  INFO 23546 --- [idationThread-1] a.s.s.m.AbstractValidatingSessionManager : Validating all active sessions...
    2023-11-09 00:01:10.944  INFO 23546 --- [idationThread-1] a.s.s.m.AbstractValidatingSessionManager : Finished session validation.  No sessions were stopped.
    2023-11-09 01:01:10.943  INFO 23546 --- [idationThread-1] a.s.s.m.AbstractValidatingSessionManager : Validating all active sessions...
    2023-11-09 01:01:10.944  INFO 23546 --- [idationThread-1] a.s.s.m.AbstractValidatingSessionManager : Finished session validation.  No sessions were stopped.
  • lucky 6月前
    引用 26
    只有这些,我把日志清了,移动端访问确实没日志进来
  • lucky 6月前
    引用 27

  • lucky 6月前
    引用 28
    im-server有这种
  • x86 5月前
    引用 29
    你微信加一下:wfchat 
    他协助你看下吧
返回