gpt4 book ai didi

java - 任务 ':app:kaptDemoProductionDebugKotlin' 错误执行失败。?

转载 作者:行者123 更新时间:2023-11-30 05:10:37 24 4
gpt4 key购买 nike

我在下面收到以下异常:

C:\Users\admin\Desktop\masters\app\build\tmp\kapt3\stubs\demoProductionDebug\com\empowered\healo\ui\adapters\HistoryQuestionAdapter.java:155:
error: incompatible types: possible lossy conversion from long to int @android.support.annotation.IntDef(value = {1L, 0L})

下面是我的 Logcat:

3:55:52 PM: Executing task 'assembleDebug'...

Executing tasks: [assembleDebug]

NDK is missing a "platforms" directory.
If you are using NDK, verify the ndk.dir is set to a valid NDK directory. It is currently set to C:\Users\admin\AppData\Local\Android\Sdk\ndk-bundle.
If you are not using NDK, unset the NDK variable from ANDROID_NDK_HOME or local.properties to remove this warning.

registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
NDK is missing a "platforms" directory.
If you are using NDK, verify the ndk.dir is set to a valid NDK directory. It is currently set to C:\Users\admin\AppData\Local\Android\Sdk\ndk-bundle.
If you are not using NDK, unset the NDK variable from ANDROID_NDK_HOME or local.properties to remove this warning.

WARNING: Configuration 'compile' is obsolete and has been replaced with 'implementation' and 'api'.
It will be removed at the end of 2018. For more information see: http://d.android.com/r/tools/update-dependency-configurations.html
:app:checkDemoProductionDebugClasspath UP-TO-DATE
:app:preBuild UP-TO-DATE
:errorcheckmodule:preBuild UP-TO-DATE
:errorcheckmodule:preDebugBuild UP-TO-DATE
:errorcheckmodule:checkDebugManifest UP-TO-DATE
:errorcheckmodule:processDebugManifest UP-TO-DATE
:app:preDemoProductionDebugBuild UP-TO-DATE
:errorcheckmodule:compileDebugAidl NO-SOURCE
:app:compileDemoProductionDebugAidl NO-SOURCE
:errorcheckmodule:packageDebugRenderscript NO-SOURCE
:app:compileDemoProductionDebugRenderscript UP-TO-DATE
:app:checkDemoProductionDebugManifest UP-TO-DATE
:app:generateDemoProductionDebugBuildConfig UP-TO-DATE
:app:mainApkListPersistenceDemoProductionDebug UP-TO-DATE
:app:mergeDemoProductionDebugShaders UP-TO-DATE
:app:compileDemoProductionDebugShaders UP-TO-DATE
:app:generateDemoProductionDebugAssets UP-TO-DATE
:errorcheckmodule:mergeDebugShaders UP-TO-DATE
:errorcheckmodule:compileDebugShaders UP-TO-DATE
:errorcheckmodule:generateDebugAssets UP-TO-DATE
:errorcheckmodule:packageDebugAssets UP-TO-DATE
:app:mergeDemoProductionDebugAssets UP-TO-DATE
:app:processDemoProductionDebugGoogleServices
Parsing json file: C:\Users\admin\Desktop\masters\app\google-services.json
:app:createDemoProductionDebugCompatibleScreenManifests UP-TO-DATE
:app:processDemoProductionDebugManifest
:app:fabricGenerateResourcesDemoProductionDebug
:app:generateDemoProductionDebugResValues UP-TO-DATE
:app:generateDemoProductionDebugResources UP-TO-DATE
:errorcheckmodule:compileDebugRenderscript UP-TO-DATE
:errorcheckmodule:generateDebugResValues UP-TO-DATE
:errorcheckmodule:generateDebugResources UP-TO-DATE
:errorcheckmodule:packageDebugResources UP-TO-DATE
:app:mergeDemoProductionDebugResources
C:\Users\admin\Desktop\masters\app\build\intermediates\incremental\mergeDemoProductionDebugResources\merged.dir\values\values.xml:2601: warn: multiple substitutions specified in non-positional format; did you mean to add the formatted="false" attribute?.
C:\Users\admin\Desktop\masters\app\build\intermediates\incremental\mergeDemoProductionDebugResources\merged.dir\values\values.xml:2674: warn: multiple substitutions specified in non-positional format; did you mean to add the formatted="false" attribute?.
C:\Users\admin\Desktop\masters\app\build\intermediates\incremental\mergeDemoProductionDebugResources\merged.dir\values\values.xml:2675: warn: multiple substitutions specified in non-positional format; did you mean to add the formatted="false" attribute?.

:app:splitsDiscoveryTaskDemoProductionDebug UP-TO-DATE
:errorcheckmodule:generateDebugRFile UP-TO-DATE
:app:processDemoProductionDebugResources
error: string too large to encode using UTF-8 written instead as 'STRING_TOO_LARGE'.

:errorcheckmodule:generateDebugBuildConfig UP-TO-DATE
:errorcheckmodule:prepareLintJar UP-TO-DATE
:errorcheckmodule:generateDebugSources UP-TO-DATE
:errorcheckmodule:javaPreCompileDebug UP-TO-DATE
:errorcheckmodule:compileDebugJavaWithJavac UP-TO-DATE
:errorcheckmodule:processDebugJavaRes NO-SOURCE
:errorcheckmodule:transformClassesAndResourcesWithPrepareIntermediateJarsForDebug UP-TO-DATE
:app:kaptGenerateStubsDemoProductionDebugKotlin UP-TO-DATE
e: C:\Users\admin\Desktop\masters\app\build\tmp\kapt3\stubs\demoProductionDebug\com\empowered\healo\ui\adapters\HistoryQuestionAdapter.java:155: error: incompatible types: possible lossy conversion from long to int
@android.support.annotation.IntDef(value = {1L, 0L})
^
e: C:\Users\admin\Desktop\masters\app\build\tmp\kapt3\stubs\demoProductionDebug\com\empowered\healo\ui\adapters\HistoryQuestionAdapter.java:155: error: incompatible types: possible lossy conversion from long to int
@android.support.annotation.IntDef(value = {1L, 0L})
^
:app:kaptDemoProductionDebugKotlin FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:kaptDemoProductionDebugKotlin'.
> Compilation error. See log for more details

* 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

BUILD FAILED in 29s
33 actionable tasks: 6 executed, 27 up-to-date
3:56:22 PM: Task execution finished 'assembleDebug'.

最佳答案

首先检查您的有损基元类型:https://stackoverflow.com/a/51632153/3460038

然后检查您的 NDK 问题:https://stackoverflow.com/a/42324530/3460038

关于java - 任务 ':app:kaptDemoProductionDebugKotlin' 错误执行失败。?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53818053/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com