Android Studio编译报:app:checkDebugManifest错误的解决办法
分类:Uncategorized
阅读 (1,205)
1月 112023
将项目的原来的gradle版本由5.1.1升级到7.2版本后再编译就报如下错误
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 |
FAILURE: Build completed with 5 failures. 1: Task failed with an exception. ----------- * What went wrong: A problem was found with the configuration of task ':app:checkDebugManifest' (type 'CheckManifest'). - In plugin 'com.android.build.gradle.api.AndroidBasePlugin' type 'com.android.build.gradle.internal.tasks.CheckManifest' property 'manifest' has @Input annotation used on property of type 'File'. Reason: A property of type 'File' annotated with @Input cannot determine how to interpret the file. Possible solutions: 1. Annotate with @InputFile for regular files. 2. Annotate with @InputDirectory for directories. 3. If you want to track the path, return File.absolutePath as a String and keep @Input. Please refer to https://docs.gradle.org/7.2/userguide/validation_problems.html#incorrect_use_of_input_annotation for more details about this problem. * 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. ============================================================================== 2: Task failed with an exception. ----------- * What went wrong: A problem was found with the configuration of task ':app:createDebugCompatibleScreenManifests' (type 'CompatibleScreensManifest'). - In plugin 'com.android.build.gradle.api.AndroidBasePlugin' type 'com.android.build.gradle.tasks.CompatibleScreensManifest' property 'outputScope' is missing an input or output annotation. Reason: A property without annotation isn't considered during up-to-date checking. Possible solutions: 1. Add an input or output annotation. 2. Mark it as @Internal. Please refer to https://docs.gradle.org/7.2/userguide/validation_problems.html#missing_annotation for more details about this problem. * 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. ============================================================================== 3: Task failed with an exception. ----------- * What went wrong: A problem was found with the configuration of task ':app:compileDebugShaders' (type 'ShaderCompile'). - In plugin 'com.android.build.gradle.api.AndroidBasePlugin' type 'com.android.build.gradle.tasks.ShaderCompile' property 'sourceDir' is annotated with @InputFiles but missing a normalization strategy. Reason: If you don't declare the normalization, outputs can't be re-used between machines or locations on the same machine, therefore caching efficiency drops significantly. Possible solution: Declare the normalization strategy by annotating the property with either @PathSensitive, @Classpath or @CompileClasspath. Please refer to https://docs.gradle.org/7.2/userguide/validation_problems.html#missing_normalization_annotation for more details about this problem. * 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. ============================================================================== 4: Task failed with an exception. ----------- * What went wrong: Some problems were found with the configuration of task ':app:signingConfigWriterDebug' (type 'SigningConfigWriterTask'). - In plugin 'com.android.build.gradle.api.AndroidBasePlugin' type 'com.android.build.gradle.internal.tasks.SigningConfigWriterTask' property 'signingConfig.name' is missing an input or output annotation. Reason: A property without annotation isn't considered during up-to-date checking. Possible solutions: 1. Add an input or output annotation. 2. Mark it as @Internal. Please refer to https://docs.gradle.org/7.2/userguide/validation_problems.html#missing_annotation for more details about this problem. - In plugin 'com.android.build.gradle.api.AndroidBasePlugin' type 'com.android.build.gradle.internal.tasks.SigningConfigWriterTask' property 'signingConfig.signingReady' is missing an input or output annotation. Reason: A property without annotation isn't considered during up-to-date checking. Possible solutions: 1. Add an input or output annotation. 2. Mark it as @Internal. Please refer to https://docs.gradle.org/7.2/userguide/validation_problems.html#missing_annotation for more details about this problem. - In plugin 'com.android.build.gradle.api.AndroidBasePlugin' type 'com.android.build.gradle.internal.tasks.SigningConfigWriterTask' property 'signingConfig.storeFile' is annotated with @InputFile but missing a normalization strategy. Reason: If you don't declare the normalization, outputs can't be re-used between machines or locations on the same machine, therefore caching efficiency drops significantly. Possible solution: Declare the normalization strategy by annotating the property with either @PathSensitive, @Classpath or @CompileClasspath. Please refer to https://docs.gradle.org/7.2/userguide/validation_problems.html#missing_normalization_annotation for more details about this problem. * 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. ============================================================================== 5: Task failed with an exception. ----------- * What went wrong: Some problems were found with the configuration of task ':app:transformNativeLibsWithMergeJniLibsForDebug' (type 'TransformTask'). - In plugin 'com.android.build.gradle.api.AndroidBasePlugin' type 'com.android.build.gradle.internal.pipeline.TransformTask' property 'allSecondaryInputs' is private and annotated with @Internal. Reason: Annotations on private getters are ignored. Possible solutions: 1. Make the getter public. 2. Annotate the public version of the getter. Please refer to https://docs.gradle.org/7.2/userguide/validation_problems.html#private_getter_must_not_be_annotated for more details about this problem. - In plugin 'com.android.build.gradle.api.AndroidBasePlugin' type 'com.android.build.gradle.internal.pipeline.TransformTask' property 'logging' is missing an input or output annotation. Reason: A property without annotation isn't considered during up-to-date checking. Possible solutions: 1. Add an input or output annotation. 2. Mark it as @Internal. Please refer to https://docs.gradle.org/7.2/userguide/validation_problems.html#missing_annotation for more details about this problem. - In plugin 'com.android.build.gradle.api.AndroidBasePlugin' type 'com.android.build.gradle.internal.pipeline.TransformTask' property 'oldSecondaryInputs' is annotated with @InputFiles but missing a normalization strategy. Reason: If you don't declare the normalization, outputs can't be re-used between machines or locations on the same machine, therefore caching efficiency drops significantly. Possible solution: Declare the normalization strategy by annotating the property with either @PathSensitive, @Classpath or @CompileClasspath. Please refer to https://docs.gradle.org/7.2/userguide/validation_problems.html#missing_normalization_annotation for more details about this problem. - In plugin 'com.android.build.gradle.api.AndroidBasePlugin' type 'com.android.build.gradle.internal.pipeline.TransformTask' property 'path' is missing an input or output annotation. Reason: A property without annotation isn't considered during up-to-date checking. Possible solutions: 1. Add an input or output annotation. 2. Mark it as @Internal. Please refer to https://docs.gradle.org/7.2/userguide/validation_problems.html#missing_annotation for more details about this problem. - In plugin 'com.android.build.gradle.api.AndroidBasePlugin' type 'com.android.build.gradle.internal.pipeline.TransformTask' property 'temporaryDir' is missing an input or output annotation. Reason: A property without annotation isn't considered during up-to-date checking. Possible solutions: 1. Add an input or output annotation. 2. Mark it as @Internal. Please refer to https://docs.gradle.org/7.2/userguide/validation_problems.html#missing_annotation for more details about this problem. * 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 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 7s |
网上搜索大部分说是把使用的gradle的版本降到原来的版本,但是因为ide升级原因?版本不能降
后来搜索到一个方法是把项目里的build.gradle中的gradle插件的版本升级一下,由原来的3.4.1版本升级到4.2.0再编译就好了
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
buildscript { repositories { google() jcenter() } dependencies { classpath 'com.android.tools.build:gradle:4.2.0' //原来是3.4.1 } } allprojects { repositories { google() jcenter() } } task clean(type: Delete) { delete rootProject.buildDir } |
Sorry, the comment form is closed at this time.