atlas icon indicating copy to clipboard operation
atlas copied to clipboard

window下执行命令:..\gradlew clean assembleDebug -DapVersion=1.0.0 -DversionName=1.0.1失败(AP-debug找不到)

Open gdmec07120836 opened this issue 7 years ago • 3 comments

报错信息: FAILURE: Build failed with an exception.

  • What went wrong: Execution failed for task ':app:prepareDebugAP'.

Could not resolve all dependencies for configuration ':app:detachedConfiguration1'. Could not find com.taobao.android.atlasdemo:AP-debug:1.0.0. Searched in the following locations: file:/D:/Android/adt-bundle-windows-x86_64-20130917/sdk/extras/m2repository/com/taobao/android/atlasdemo/AP-debug/1.0.0/AP-debug-1.0.0.pom file:/D:/Android/adt-bundle-windows-x86_64-20130917/sdk/extras/m2repository/com/taobao/android/atlasdemo/AP-debug/1.0.0/AP-debug-1.0.0.ap file:/D:/Android/adt-bundle-windows-x86_64-20130917/sdk/extras/google/m2repository/com/taobao/android/atlasdemo/AP-debug/1.0.0/AP-debug-1.0.0.pom file:/D:/Android/adt-bundle-windows-x86_64-20130917/sdk/extras/google/m2repository/com/taobao/android/atlasdemo/AP-debug/1.0.0/AP-debug-1.0.0.ap file:/D:/Android/adt-bundle-windows-x86_64-20130917/sdk/extras/android/m2repository/com/taobao/android/atlasdemo/AP-debug/1.0.0/AP-debug-1.0.0.pom file:/D:/Android/adt-bundle-windows-x86_64-20130917/sdk/extras/android/m2repository/com/taobao/android/atlasdemo/AP-debug/1.0.0/AP-debug-1.0.0.ap https://jcenter.bintray.com/com/taobao/android/atlasdemo/AP-debug/1.0.0/AP-debug-1.0.0.pom https://jcenter.bintray.com/com/taobao/android/atlasdemo/AP-debug/1.0.0/AP-debug-1.0.0.ap http://maven.aliyun.com/nexus/content/groups/public/com/taobao/android/atlasdemo/AP-debug/1.0.0/AP-debug-1.0.0.pom http://maven.aliyun.com/nexus/content/groups/public/com/taobao/android/atlasdemo/AP-debug/1.0.0/AP-debug-1.0.0.ap file:/C:/Users/Administrator/.m2/repository/com/taobao/android/atlasdemo/AP-debug/1.0.0/AP-debug-1.0.0.pom file:/C:/Users/Administrator/.m2/repository/com/taobao/android/atlasdemo/AP-debug/1.0.0/AP-debug-1.0.0.ap Required by: project :app

  • Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

显示的错误是AP-debug-1.0.0.ap和AP-debug-1.0.0.pom找不到,直接点开 https://jcenter.bintray.com/com/taobao/android/atlasdemo/AP-debug/1.0.0/AP-debug-1.0.0.pom 得到的结果是:{ "errors" : [ { "status" : 404, "message" : "Could not find resource" } ] }

后来我自己尝试一下不改变AP-debug版本看会不会报错,app的build.gradle下第三行:def apVersion = getEnvValue("apVersion", "");这个参数关联着AP-debug版本号,我改掉这个key,让他接收不到参数。改成:def apVersion = getEnvValue("apVersion11", "");然后重新执行..\gradlew clean assembleDebug -DapVersion=1.0.0 -DversionName=1.0.1,结果成功了。

所以是不是路径改了呢?还是版本号改了呢?还是怎么回事? 这样搞算不算成功?会不会有什么影响?刚接触不知道,希望有知道的朋友告知我一下。非常感谢!!! 在知道为什么之前继续搞下去看看改了这个key有什么影响先,如果有什么新发现我会回来更新结果。

gdmec07120836 avatar Oct 16 '18 03:10 gdmec07120836

建议先看文档,弄懂原理,以及操作指导步骤

hwjump avatar Oct 16 '18 04:10 hwjump

建议先看文档,弄懂原理,以及操作指导步骤

看了的,我说的有什么问题还劳烦指出来,非常感谢

gdmec07120836 avatar Oct 16 '18 06:10 gdmec07120836

下午什么也没改,重新执行..\gradlew clean assembleDebug -DapVersion=1.0.0 -DversionName=1.0.1就成功了,还是不知道为什么会报早上的错(def apVersion = getEnvValue("apVersion", "");没改动)

gdmec07120836 avatar Oct 16 '18 07:10 gdmec07120836