无法解析配置“:app:debugRuntimeClasspath”的所有文件。无法解析 com.moengage:moe-android-sdk:4.0.2

Posted

技术标签:

【中文标题】无法解析配置“:app:debugRuntimeClasspath”的所有文件。无法解析 com.moengage:moe-android-sdk:4.0.2【英文标题】:Could not resolve all files for configuration ':app:debugRuntimeClasspath'. Could not resolve com.moengage:moe-android-sdk:4.0.2 【发布时间】:2021-08-30 09:53:30 【问题描述】:

我正在处理 documentation 之后的 moengage 推送通知,但是当我运行程序时出现此错误 403 被禁止。我

我已经添加了我正在处理颤振的这些东西 我认为错误在 build.gradle 我不确定,但他们的日志指出了他们的 这是我的毕业典礼

dependencies 
    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
    testImplementation 'junit:junit:4.13.1'
    androidTestImplementation 'androidx.test:runner:1.3.0'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
    implementation 'com.android.support:multidex:1.0.3'
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation("androidx.core:core:1.3.1")
    implementation("androidx.appcompat:appcompat:1.2.0")
    implementation("androidx.lifecycle:lifecycle-process:2.2.0")
    implementation 'com.moengage:moe-android-sdk:4.0.2'





    
[ +169 ms] FAILURE: Build failed with an exception.
[   +3 ms] * What went wrong:
[        ] Execution failed for task ':app:checkDebugAarMetadata'.
[        ] > Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
[        ]    > Could not resolve com.moengage:moe-android-sdk:4.0.2.
[        ]      Required by:
[        ]          project :app
[        ]       > Could not resolve com.moengage:moe-android-sdk:4.0.2.
[        ]          > Could not get resource 'https://google.bintray.com/exoplayer/com/moengage/moe-android-sdk/4.0.2/moe-android-sdk-4.0.2.pom'.
[        ]             > Could not GET 'https://google.bintray.com/exoplayer/com/moengage/moe-android-sdk/4.0.2/moe-android-sdk-4.0.2.pom'. Received status code 403 from server: Forbidden
[        ] * 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 59s
[        ] Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
[        ] Use '--warning-mode all' to show the individual deprecation warnings.
[        ] See https://docs.gradle.org/6.5/userguide/command_line_interface.html#sec:command_line_warnings
[        ] 44 actionable tasks: 1 executed, 43 up-to-date
["event":"app.progress","params":"appId":"ee2fcf31-806c-45e7-b1c0-096b42b571ce","id":"0","progressId":null,"finished":true]
[ +622 ms] Exception: Gradle task assembleDebug failed with exit code 1
[   +5 ms] 
           #0      throwToolExit (package:flutter_tools/src/base/common.dart:10:3)
           #1      RunCommand.runCommand (package:flutter_tools/src/commands/run.dart:563:9)
           <asynchronous suspension>
           #2      FlutterCommand.run.<anonymous closure> (package:flutter_tools/src/runner/flutter_command.dart:1043:27)
           <asynchronous suspension>
           #3      AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
           <asynchronous suspension>
           #4      CommandRunner.runCommand (package:args/command_runner.dart:196:13)
           <asynchronous suspension>
           #5      FlutterCommandRunner.runCommand.<anonymous closure> (package:flutter_tools/src/runner/flutter_command_runner.dart:284:9)
           <asynchronous suspension>
           #6      AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
           <asynchronous suspension>
           #7      FlutterCommandRunner.runCommand (package:flutter_tools/src/runner/flutter_command_runner.dart:232:5)
           <asynchronous suspension>
           #8      run.<anonymous closure>.<anonymous closure> (package:flutter_tools/runner.dart:62:9)
           <asynchronous suspension>
           #9      AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
           <asynchronous suspension>
           #10     main (package:flutter_tools/executable.dart:91:3)
           <asynchronous suspension>


["event":"app.stop","params":"appId":"ee2fcf31-806c-45e7-b1c0-096b42b571ce"]
[  +24 ms] "flutter run" took 62,936ms.
["id":0,"error":"app 'ee2fcf31-806c-45e7-b1c0-096b42b571ce' not found","trace":"#0      AppDomain.stop (package:flutter_tools/src/commands/daemon.dart:709:7)\n#1      Domain.handleCommand.<anonymous closure> (package:flutter_tools/src/commands/daemon.dart:220:34)\n#2      new Future.sync (dart:async/future.dart:218:31)\n#3      Domain.handleCommand (package:flutter_tools/src/commands/daemon.dart:218:5)\n#4      Daemon._handleRequest (package:flutter_tools/src/commands/daemon.dart:144:28)\n#5      _rootRunUnary (dart:async/zone.dart:1362:47)\n#6      _CustomZone.runUnary (dart:async/zone.dart:1265:19)\n#7      _CustomZone.runUnaryGuarded (dart:async/zone.dart:1170:7)\n#8      _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:341:11)\n#9      _BufferingStreamSubscription._add (dart:async/stream_impl.dart:271:7)\n#10     _ForwardingStreamSubscription._add (dart:async/stream_pipe.dart:123:11)\n#11     _MapStream._handleData (dart:async/stream_pipe.dart:218:10)\n#12     _ForwardingStreamSubscription._handleData (dart:async/stream_pipe.dart:153:13)\n#13     _rootRunUnary (dart:async/zone.dart:1362:47)\n#14     _CustomZone.runUnary (dart:async/zone.dart:1265:19)\n#15     _CustomZone.runUnaryGuarded (dart:async/zone.dart:1170:7)\n#16     _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:341:11)\n#17     _BufferingStreamSubscription._add (dart:async/stream_impl.dart:271:7)\n#18     _ForwardingStreamSubscription._add (dart:async/stream_pipe.dart:123:11)\n#19     _WhereStream._handleData (dart:async/stream_pipe.dart:195:12)\n#20     _ForwardingStreamSubscription._handleData (dart:async/stream_pipe.dart:153:13)\n#21     _rootRunUnary (dart:async/zone.dart:1362:47)\n#22     _CustomZone.runUnary (dart:async/zone.dart:1265:19)\n#23     _CustomZone.runUnaryGuarded (dart:async/zone.dart:1170:7)\n#24     _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:341:11)\n#25     _BufferingStreamSubscription._add (dart:async/stream_impl.dart:271:7)\n#26     _SinkTransformerStreamSubscription._add (dart:async/stream_transformers.dart:63:11)\n#27     _EventSinkWrapper.add (dart:async/stream_transformers.dart:13:11)\n#28     _StringAdapterSink.add (dart:convert/string_conversion.dart:238:11)\n#29     _LineSplitterSink._addLines (dart:convert/line_splitter.dart:155:13)\n#30     _LineSplitterSink.addSlice (dart:convert/line_splitter.dart:130:5)\n#31     StringConversionSinkMixin.add (dart:convert/string_conversion.dart:163:5)\n#32     _SinkTransformerStreamSubscription._handleData (dart:async/stream_transformers.dart:111:24)\n#33     _rootRunUnary (dart:async/zone.dart:1362:47)\n#34     _CustomZone.runUnary (dart:async/zone.dart:1265:19)\n#35     _CustomZone.runUnaryGuarded (dart:async/zone.dart:1170:7)\n#36     _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:341:11)\n#37     _BufferingStreamSubscription._add (dart:async/stream_impl.dart:271:7)\n#38     _SinkTransformerStreamSubscription._add (dart:async/stream_transformers.dart:63:11)\n#39     _EventSinkWrapper.add (dart:async/stream_transformers.dart:13:11)\n#40     _StringAdapterSink.add (dart:convert/string_conversion.dart:238:11)\n#41     _StringAdapterSink.addSlice (dart:convert/string_conversion.dart:243:7)\n#42     _Utf8ConversionSink.addSlice (dart:convert/string_conversion.dart:317:20)\n#43     _Utf8ConversionSink.add (dart:convert/string_conversion.dart:310:5)\n#44     _ConverterStreamEventSink.add (dart:convert/chunked_conversion.dart:72:18)\n#45     _SinkTransformerStreamSubscription._handleData (dart:async/stream_transformers.dart:111:24)\n#46     _rootRunUnary (dart:async/zone.dart:1362:47)\n#47     _CustomZone.runUnary (dart:async/zone.dart:1265:19)\n#48     _CustomZone.runUnaryGuarded (dart:async/zone.dart:1170:7)\n#49     _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:341:11)\n#50     _BufferingStreamSubscription._add (dart:async/stream_impl.dart:271:7)\n#51     _SyncStreamControllerDispatch._sendData (dart:async/stream_controller.dart:733:19)\n#52     _StreamController._add (dart:async/stream_controller.dart:607:7)\n#53     _StreamController.add (dart:async/stream_controller.dart:554:5)\n#54     _Socket._onData (dart:io-patch/socket_patch.dart:2160:41)\n#55     _rootRunUnary (dart:async/zone.dart:1370:13)\n#56     _CustomZone.runUnary (dart:async/zone.dart:1265:19)\n#57     _CustomZone.runUnaryGuarded (dart:async/zone.dart:1170:7)\n#58     _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:341:11)\n#59     _BufferingStreamSubscription._add (dart:async/stream_impl.dart:271:7)\n#60     _SyncStreamControllerDispatch._sendData (dart:async/stream_controller.dart:733:19)\n#61     _StreamController._add (dart:async/stream_controller.dart:607:7)\n#62     _StreamController.add (dart:async/stream_controller.dart:554:5)\n#63     new _RawSocket.<anonymous closure> (dart:io-patch/socket_patch.dart:1696:33)\n#64     _NativeSocket.issueReadEvent.issue (dart:io-patch/socket_patch.dart:1208:14)\n#65     _microtaskLoop (dart:async/schedule_microtask.dart:40:21)\n#66     _startMicrotaskLoop (dart:async/schedule_microtask.dart:49:5)\n#67     _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:120:13)\n#68     _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:185:5)\n"]

【问题讨论】:

【参考方案1】:

moe-android-sdk 版本应该是 11.3.01 而不是 4.0.2。假设安装的flutter插件版本为4.0.2

【讨论】:

以上是关于无法解析配置“:app:debugRuntimeClasspath”的所有文件。无法解析 com.moengage:moe-android-sdk:4.0.2的主要内容,如果未能解决你的问题,请参考以下文章

无法解析配置“:app:androidApis”的所有文件。

并排配置错误,无法解析引用 mscorlib

无法解析类型 Microsoft 扩展配置 IConfiguration 的服务

gradle 无法解析配置的任何依赖项:classpath

错误:无法解析配置“:app:debugCompileClasspath”的所有文件

为啥 Ivy 无法解析我的配置