gpt4 book ai didi

android - Cordova - 构建版本 - "Could not resolve all dependencies for configuration ' :_debugCompile'?

转载 作者:行者123 更新时间:2023-11-30 01:19:15 25 4
gpt4 key购买 nike

我在 Visual Studio 2015 中有一个使用 cordova 的项目。它在 ripple 中运行并且调试构建没有任何错误。但是,我切换到“release build”后出现了以下错误?

Severity    Code    Description Project File    Line    Suppression StateError       FAILURE: Build failed with an exception.    stapp       1   Error       * What went wrong:  stapp       1   Error       A problem occurred configuring root project 'android'.  stapp       1   Error       > Could not resolve all dependencies for configuration ':_debugCompile'.    stapp       1   Error        > Could not find any version that matches com.android.support:support-v4:+.    stapp       1   Error        Searched in the following locations:   stapp       1   Error        https://repo1.maven.org/maven2/com/android/support/support-v4/maven-metadata.xml   stapp       1   Error        https://repo1.maven.org/maven2/com/android/support/support-v4/ stapp       1   Error        Required by:   stapp       1   Error        :android:unspecified   stapp       1   Error       * Try:  stapp       1   Error       Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.  stapp       1   Error       Error code 1 for command: cmd with args: /s,/c,"D:\Users\.......\stapp\platforms\android\gradlew cdvBuildRelease -b D:\Users\......\stapp\platforms\android\build.gradle -Dorg.gradle.daemon=true -Pandroid.useDeprecatedNdk=true"  stapp       1   
1>  Wrote out Android package name to "com.greywolfdesign.scenetip"1>  Deleted D:\Users\......\stapp\platforms\android\res\drawable-hdpi\icon.png1>  Deleted D:\Users\......\stapp\platforms\android\res\drawable-land-hdpi\icon.png1>  Deleted D:\Users\......\stapp\platforms\android\res\drawable-land-ldpi\icon.png1>  Deleted D:\Users\......\stapp\platforms\android\res\drawable-land-mdpi\icon.png1>  Deleted D:\Users\......\stapp\platforms\android\res\drawable-land-xhdpi\icon.png1>  Deleted D:\Users\......\stapp\platforms\android\res\drawable-ldpi\icon.png1>  Deleted D:\Users\......\stapp\platforms\android\res\drawable-mdpi\icon.png1>  Deleted D:\Users\......\stapp\platforms\android\res\drawable-port-hdpi\icon.png1>  Deleted D:\Users\......\stapp\platforms\android\res\drawable-port-ldpi\icon.png1>  Deleted D:\Users\......\stapp\platforms\android\res\drawable-port-mdpi\icon.png1>  Deleted D:\Users\......\stapp\platforms\android\res\drawable-port-xhdpi\icon.png1>  Deleted D:\Users\......\stapp\platforms\android\res\drawable-xhdpi\icon.png1>  copying image from D:\Users\......\stapp\resources\android\icon\drawable-ldpi-icon.png to D:\Users\......\stapp\platforms\android\res\drawable-ldpi\icon.png1>  copying image from D:\Users\......\stapp\resources\android\icon\drawable-mdpi-icon.png to D:\Users\......\stapp\platforms\android\res\drawable-mdpi\icon.png1>  copying image from D:\Users\......\stapp\resources\android\icon\drawable-hdpi-icon.png to D:\Users\......\stapp\platforms\android\res\drawable-hdpi\icon.png1>  copying image from D:\Users\......\stapp\resources\android\icon\drawable-xhdpi-icon.png to D:\Users\......\stapp\platforms\android\res\drawable-xhdpi\icon.png1>  Deleted D:\Users\......\stapp\platforms\android\res\drawable-hdpi\screen.png1>  Deleted D:\Users\......\stapp\platforms\android\res\drawable-land-hdpi\screen.png1>  Deleted D:\Users\......\stapp\platforms\android\res\drawable-land-ldpi\screen.png1>  Deleted D:\Users\......\stapp\platforms\android\res\drawable-land-mdpi\screen.png1>  Deleted D:\Users\......\stapp\platforms\android\res\drawable-land-xhdpi\screen.png1>  Deleted D:\Users\......\stapp\platforms\android\res\drawable-ldpi\screen.png1>  Deleted D:\Users\......\stapp\platforms\android\res\drawable-mdpi\screen.png1>  Deleted D:\Users\......\stapp\platforms\android\res\drawable-port-hdpi\screen.png1>  Deleted D:\Users\......\stapp\platforms\android\res\drawable-port-ldpi\screen.png1>  Deleted D:\Users\......\stapp\platforms\android\res\drawable-port-mdpi\screen.png1>  Deleted D:\Users\......\stapp\platforms\android\res\drawable-port-xhdpi\screen.png1>  Deleted D:\Users\......\stapp\platforms\android\res\drawable-xhdpi\screen.png1>  splash screens: [{"src":"resources/android/splash/drawable-land-hdpi-screen.png","density":"land-hdpi","platform":"android"},{"src":"resources/android/splash/drawable-land-ldpi-screen.png","density":"land-ldpi","platform":"android"},{"src":"resources/android/splash/drawable-land-mdpi-screen.png","density":"land-mdpi","platform":"android"},{"src":"resources/android/splash/drawable-land-xhdpi-screen.png","density":"land-xhdpi","platform":"android"},{"src":"resources/android/splash/drawable-port-hdpi-screen.png","density":"port-hdpi","platform":"android"},{"src":"resources/android/splash/drawable-port-ldpi-screen.png","density":"port-ldpi","platform":"android"},{"src":"resources/android/splash/drawable-port-mdpi-screen.png","density":"port-mdpi","platform":"android"},{"src":"resources/android/splash/drawable-port-xhdpi-screen.png","density":"port-xhdpi","platform":"android"}]1>  copying image from D:\Users\......\stapp\resources\android\splash\drawable-land-hdpi-screen.png to D:\Users\......\stapp\platforms\android\res\drawable-land-hdpi\screen.png1>  copying image from D:\Users\......\stapp\resources\android\splash\drawable-land-ldpi-screen.png to D:\Users\......\stapp\platforms\android\res\drawable-land-ldpi\screen.png1>  copying image from D:\Users\......\stapp\resources\android\splash\drawable-land-mdpi-screen.png to D:\Users\......\stapp\platforms\android\res\drawable-land-mdpi\screen.png1>  copying image from D:\Users\......\stapp\resources\android\splash\drawable-land-xhdpi-screen.png to D:\Users\......\stapp\platforms\android\res\drawable-land-xhdpi\screen.png1>  copying image from D:\Users\......\stapp\resources\android\splash\drawable-port-hdpi-screen.png to D:\Users\......\stapp\platforms\android\res\drawable-port-hdpi\screen.png1>  copying image from D:\Users\......\stapp\resources\android\splash\drawable-port-ldpi-screen.png to D:\Users\......\stapp\platforms\android\res\drawable-port-ldpi\screen.png1>  copying image from D:\Users\......\stapp\resources\android\splash\drawable-port-mdpi-screen.png to D:\Users\......\stapp\platforms\android\res\drawable-port-mdpi\screen.png1>  copying image from D:\Users\......\stapp\resources\android\splash\drawable-port-xhdpi-screen.png to D:\Users\......\stapp\platforms\android\res\drawable-port-xhdpi\screen.png1>  updated project successfully1>  Executing "after_prepare"  hook for all plugins.1>  Running command: C:\Users\Nick\AppData\Roaming\Microsoft\VisualStudio\MDA\vs-npm\2.14.9\node.exe D:\Users\......\stapp\hooks\after_prepare\010_add_platform_class.js D:\Users\......\stapp1>  add to body class: platform-android1>  Command finished with error code 0: C:\Users\Nick\AppData\Roaming\Microsoft\VisualStudio\MDA\vs-npm\2.14.9\node.exe D:\Users\......\stapp\hooks\after_prepare\010_add_platform_class.js,D:\Users\......\stapp1>  ------ Copied D:\Users\......\stapp\bin\Android\Release\VSBuildInfo.xml to platforms\android\assets\www\VSBuildInfo.xml1>  ------ Building platform: android1>  Release1>  ------ Build configuration options: --release1>  Executing "before_compile"  hook for all plugins.1>  ANDROID_HOME=C:\Program Files (x86)\Android\android-sdk1>  JAVA_HOME=C:\Program Files\Java\jdk1.7.0_711>  Reading build config file: D:\Users\......\stapp\build.json1>  Reading the keystore from: d:\downloads\gwdandapp.keystore1>1>MSBUILD : cordova-build error : FAILURE: Build failed with an exception.1>  FAILURE: Build failed with an exception.1>1>MSBUILD : cordova-build error : * What went wrong:1>  * What went wrong:1>MSBUILD : cordova-build error : A problem occurred configuring root project 'android'.1>  A problem occurred configuring root project 'android'.1>MSBUILD : cordova-build error : > Could not resolve all dependencies for configuration ':_debugCompile'.1>  > Could not resolve all dependencies for configuration ':_debugCompile'.1>MSBUILD : cordova-build error :  > Could not find any version that matches com.android.support:support-v4:+.1>     > Could not find any version that matches com.android.support:support-v4:+.1>MSBUILD : cordova-build error :  Searched in the following locations:1>       Searched in the following locations:1>MSBUILD : cordova-build error :  https://repo1.maven.org/maven2/com/android/support/support-v4/maven-metadata.xml1>           https://repo1.maven.org/maven2/com/android/support/support-v4/maven-metadata.xml1>MSBUILD : cordova-build error :  https://repo1.maven.org/maven2/com/android/support/support-v4/1>           https://repo1.maven.org/maven2/com/android/support/support-v4/1>MSBUILD : cordova-build error :  Required by:1>       Required by:1>MSBUILD : cordova-build error :  :android:unspecified1>           :android:unspecified1>1>MSBUILD : cordova-build error : * Try:1>  * Try:1>1>MSBUILD : cordova-build error : Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.1>  Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.1>  BUILD FAILED1>1>  Total time: 1.938 secs1>  ERROR building one of the platforms: Error code 1 for command: cmd with args: /s,/c,"D:\Users\......\stapp\platforms\android\gradlew cdvBuildRelease -b D:\Users\......\stapp\platforms\android\build.gradle -Dorg.gradle.daemon=true -Pandroid.useDeprecatedNdk=true"1>  You may not have the required environment or OS to build this project1>MSBUILD : cordova-build error : Error code 1 for command: cmd with args: /s,/c,"D:\Users\......\stapp\platforms\android\gradlew cdvBuildRelease -b D:\Users\......\stapp\platforms\android\build.gradle -Dorg.gradle.daemon=true -Pandroid.useDeprecatedNdk=true"1>  Error code 1 for command: cmd with args: /s,/c,"D:\Users\......\stapp\platforms\android\gradlew cdvBuildRelease -b D:\Users\......\stapp\platforms\android\build.gradle -Dorg.gradle.daemon=true -Pandroid.useDeprecatedNdk=true"========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

最佳答案

您是否尝试过使用您的 Android SDK 更新 Android 支持存储库和 Android 支持库?这通常是构建失败的原因,出现在您的日志中:

Could not find any version that matches com.android.support:support-v4:+

关于android - Cordova - 构建版本 - "Could not resolve all dependencies for configuration ' :_debugCompile'?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37371804/

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