openimsdk / open-im-android-demo

IM Android
https://openim.io
94 stars 90 forks source link

[BUG] compile error #38

Closed tonypra closed 1 week ago

tonypra commented 1 month ago

OpenIM Server Version

3.8.0

Operating System and CPU Architecture

Windows (ARM)

Deployment Method

Source Code Deployment

Bug Description and Steps to Reproduce

PS F:\learn\MyProject\202408-OpenIM\open.im.src\open-im-android-demo-main\Demo> .\gradlew --Xlint:deprecation

Unknown command-line option '--Xlint:deprecation'.

USAGE: gradlew [option...] [task...]

-?, -h, --help Shows this help message. -a, --no-rebuild Do not rebuild project dependencies. -b, --build-file Specify the build file. (deprecated) --build-cache Enables the Gradle build cache. Gradle will try to reuse outputs from previous builds. -c, --settings-file Specify the settings file. (deprecated) --configuration-cache Enables the configuration cache. Gradle will try to reuse the build configuration from previous builds. [incubating] --configuration-cache-problems Configures how the configuration cache handles problems (fail or warn). Defaults to fail. [incubating] --configure-on-demand Configure necessary projects only. Gradle will attempt to reduce configuration time for large multi-project builds. [incubating] --console Specifies which type of console output to generate. Values are 'plain', 'auto' (default), 'rich' or 'verbose'. --continue Continue task execution after a task failure. -D, --system-prop Set system property of the JVM (e.g. -Dmyprop=myvalue). -d, --debug Log in debug mode (includes normal stacktrace). --daemon Uses the Gradle Daemon to run the build. Starts the Daemon if not running. --export-keys Exports the public keys used for dependency verification. -F, --dependency-verification Configures the dependency verification mode (strict, lenient or off) --foreground Starts the Gradle Daemon in the foreground. -g, --gradle-user-home Specifies the gradle user home directory. -I, --init-script Specify an initialization script. -i, --info Set log level to info. --include-build Include the specified build in the composite. -M, --write-verification-metadata Generates checksums for dependencies used in the project (comma-separated list) -m, --dry-run Run the builds with all task actions disabled. --max-workers Configure the number of concurrent workers Gradle is allowed to use. --no-build-cache Disables the Gradle build cache. --no-configuration-cache Disables the configuration cache. [incubating] --no-configure-on-demand Disables the use of configuration on demand. [incubating] --no-daemon Do not use the Gradle daemon to run the build. Useful occasionally if you have configured Gradle to always run with the daemon by default . --no-parallel Disables parallel execution to build projects. --no-scan Disables the creation of a build scan. For more information about build scans, please visit https://gradle.com/build-scans. --no-watch-fs Disables watching the file system. --offline Execute the build without accessing network resources. -P, --project-prop Set project property for the build script (e.g. -Pmyprop=myvalue). -p, --project-dir Specifies the start directory for Gradle. Defaults to current directory. --parallel Build projects in parallel. Gradle will attempt to determine the optimal number of executor threads to use. --priority Specifies the scheduling priority for the Gradle daemon and all processes launched by it. Values are 'normal' (default) or 'low' --profile Profile build execution time and generates a report in the /reports/profile directory. --project-cache-dir Specify the project-specific cache directory. Defaults to .gradle in the root project directory. -q, --quiet Log errors only. --refresh-dependencies Refresh the state of dependencies. --refresh-keys Refresh the public keys used for dependency verification. --rerun-tasks Ignore previously cached task results. -S, --full-stacktrace Print out the full (very verbose) stacktrace for all exceptions. -s, --stacktrace Print out the stacktrace for all exceptions. --scan Creates a build scan. Gradle will emit a warning if the build scan plugin has not been applied. (https://gradle.com/build-scans) --status Shows status of running and recently stopped Gradle Daemon(s). --stop Stops the Gradle Daemon if it is running. -t, --continuous Enables continuous build. Gradle does not exit and will re-execute tasks when task file inputs change. --update-locks Perform a partial update of the dependency lock, letting passed in module notations change version. [incubating] -v, --version Print version info. -w, --warn Set log level to warn. --warning-mode Specifies which mode of warnings to generate. Values are 'all', 'fail', 'summary'(default) or 'none' --watch-fs Enables watching the file system for changes, allowing data about the file system to be re-used for the next build. --write-locks Persists dependency resolution for locked configurations, ignoring existing locking information if it exists -x, --exclude-task Specify a task to be excluded from execution.

PS F:\learn\MyProject\202408-OpenIM\open.im.src\open-im-android-demo-main\Demo> cls PS F:\learn\MyProject\202408-OpenIM\open.im.src\open-im-android-demo-main\Demo> .\gradlew assembleRelease

Configure project :app WARNING:The option setting 'android.enableDexingArtifactTransform.desugaring=false' is experimental. The current default is 'true'.

Configure project :OUICore WARNING:We recommend using a newer Android Gradle plugin to use compileSdk = 33

This Android Gradle plugin (7.1.3) was tested up to compileSdk = 32

This warning can be suppressed by adding android.suppressUnsupportedCompileSdk=33 to this project's gradle.properties

The build will continue, but you are strongly encouraged to update your project to use a newer Android Gradle Plugin that has been tested with compileSdk = 33

Task :OUICalling:compileReleaseJavaWithJavac F:\learn\MyProject\202408-OpenIM\open.im.src\open-im-android-demo-main\OUIKit\OUICalling\src\main\java\io\openim\android\ouicalling\vm\CallingVM.java:68: 错误: 无法访问Call ViewModel public final CallViewModel callViewModel; ^ 错误的类文件: F:\learn\MyProject\202408-OpenIM\open.im.src\open-im-android-demo-main\OUIKit\OUICalling\build\tmp\kotlin-classes\release\io\openim\android\ouicalling\vm\Ca llViewModel.class 类文件具有错误的版本 61.0, 应为 55.0 请删除该文件或确保该文件位于正确的类路径子目录中。 F:\learn\MyProject\202408-OpenIM\open.im.src\open-im-android-demo-main\OUIKit\OUICalling\src\main\java\io\openim\android\ouicalling\GroupCallDialog.java:3: 错误: 无法访问Ca llViewModelKt import static io.openim.android.ouicalling.vm.CallViewModelKt.getIdentity; ^ 错误的类文件: F:\learn\MyProject\202408-OpenIM\open.im.src\open-im-android-demo-main\OUIKit\OUICalling\build\tmp\kotlin-classes\release\io\openim\android\ouicalling\vm\Ca llViewModelKt.class 类文件具有错误的版本 61.0, 应为 55.0 请删除该文件或确保该文件位于正确的类路径子目录中。 注: ARouter::Compiler The user has configuration the module name, it was [OUICalling] 注: ARouter::Compiler >>> AutowiredProcessor init. <<< 注: ARouter::Compiler The user has configuration the module name, it was [OUICalling] 注: ARouter::Compiler >>> InterceptorProcessor init. <<< 注: ARouter::Compiler The user has configuration the module name, it was [OUICalling] 注: ARouter::Compiler >>> RouteProcessor init. <<< 注: ARouter::Compiler >>> Found routes, start... <<< 注: ARouter::Compiler >>> Found routes, size is 1 <<< 注: ARouter::Compiler >>> Found provider route: io.openim.android.ouicalling.CallingServiceImp <<< 注: ARouter::Compiler >>> Start categories, group = CallingService, path = /CallingService/CallingServiceImp <<< 注: ARouter::Compiler >>> Generated group: CallingService<<< 注: ARouter::Compiler >>> Generated provider map, name is ARouter$$Providers$$OUICalling <<< 注: ARouter::Compiler >>> Generated root, name is ARouter$$Root$$OUICalling <<< 2 个错误

Task :OUICalling:compileReleaseJavaWithJavac FAILED

FAILURE: Build failed with an exception.

Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.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/7.2/userguide/command_line_interface.html#sec:command_line_warnings

BUILD FAILED in 42s 45 actionable tasks: 1 executed, 44 up-to-date

Screenshots Link

No response

tonypra commented 1 month ago

.\gradlew -version


Gradle 7.2

Build time: 2021-08-17 09:59:03 UTC Revision: a773786b58bb28710e3dc96c4d1a7063628952ad

Kotlin: 1.5.21 Groovy: 3.0.8 Ant: Apache Ant(TM) version 1.10.9 compiled on September 27 2020 JVM: 11.0.1 (Oracle Corporation 11.0.1+13) OS: Windows 10 10.0 amd64

JauneQ commented 1 week ago

Try to clean the project and rebuild it. If the error still exists, please solve code's error in the corresponding module before building.