为什么Web Deploy忽略我的setParameter标签?(Why is Web Deploy ignoring my setParameter tags?)
我有一个Web部署包,它生成一个App.SetParameters.xml文件以及所有其他包文件。 SetParameters文件有几个
setParameter
节点,它们应该更新连接字符串,但每当我执行Web部署脚本时,它总是报告0 parameters changed
。 查看已部署的Web.config文件显示它们确实未更新。部署脚本的详细输出没有说明为什么它会跳过我的参数; 它从来没有提到它们。 但是,如果我将其中一个
setParameter
标记更改为parameter
标记,则会给出错误:错误:已定义参数'ConnectionString-Web.config Connection String'。
所以很明显在我的Web.config中找到了这个参数。 我完全不知道为什么它会跳过这样的参数。
环境:
- Visual Studio 2012
- Web Deploy 3.0
- Windows Server 2008 R2
- IIS 7
I have a Web Deploy Package that produces an App.SetParameters.xml file along with all the other package files. The SetParameters file has several
setParameter
nodes that are supposed to update connection strings, but whenever I execute the web deployment script it always reports0 parameters changed
. Looking at the deployed Web.config file shows that they were indeed not updated.Verbose output of the deploy script doesn't say anything about why it is skipping my parameters; it never even mentions them. However, if I change one of the
setParameter
tags to aparameter
tag it gives me an error:Error: The parameter 'ConnectionString-Web.config Connection String' has already been defined.
So it is obviously finding that parameter in my Web.config. I am completely confused by why it would just skip parameters like this.
Environment:
- Visual Studio 2012
- Web Deploy 3.0
- Windows Server 2008 R2
- IIS 7
原文:https://stackoverflow.com/questions/16182323
最满意答案
我几乎可以肯定它是multidex问题。 如果它在sdk 21上正常运行 - 这是多索引问题。
这是官方信息: Multidex
如果您正在使用Application类的自定义实现,则必须扩展MultiDexApplication类。 还需要gradle标志。 如果您没有使用自定义Application类,只需添加清单中提供的条目 - 它在文档中有描述。
编辑:差点忘了 - 你要添加依赖项,这个库提供了multidex:compile'com.android.support:multidex:1.0.1
compile 'com.android.support:multidex:1.0.1'
I'm almost sure that it is multidex issue. If it's running properly on sdk 21 - it's multidex issue.
Here is official info: Multidex
If you're using custom implementation of Application class, it has to extend MultiDexApplication class. Also there is gradle flag required. If you're not using custom Application class, just add entry provided in your manifest - it's described in documentation.
Edit: Almost forgot - you've to add dependency, multidex is provided with this library:
compile 'com.android.support:multidex:1.0.1'
相关问答
更多-
请将jar文件复制到项目,然后将其添加到构建路径。 我认为你从外部路径添加,所以它没有添加到apk文件中。 Please copy the jar file to project then add it to build path. I think you added from external path so it was not added in apk file.
-
当尝试从应用程序资产中读取视频文件时,看起来目前无法使用Cordova 3.4。 请参阅https://issues.apache.org/jira/browse/CB-6079 如果将文件复制到应用程序资产之外的目录,或者远程存储文件,则可以读取该文件。 但不再在app资源文件夹中了。 我有一个类似的问题 - 我的应用程序有一个欢迎屏幕,其中包含一个简短的视频,解释了应用程序(~300k),我无法在APK中播放。 It looks like this is not currently possible w ...
-
Android Studio 4上的NoClassDefFoundError(NoClassDefFoundError with Android Studio on Android 4)[2022-08-30]
我不完全实现MultiDex支持,所以我的一些类没有在适当的dex文件。 要修复它,您必须做的不仅仅是在defaultConfig块中设置multiDexEnabled = true 。 你也必须: 包括在你的依赖关系中compile 'com.android.support:multidex:1.0.1' 让你的Application类扩展MultiDexApplication而不是Application 。 或者,您可以在应用程序的MultiDex.install()中调用MultiDex.instal ... -
android:NoClassDefFoundError for android 4.4及更低版本(android : NoClassDefFoundError for android 4.4 and below)[2023-09-27]
我几乎可以肯定它是multidex问题。 如果它在sdk 21上正常运行 - 这是多索引问题。 这是官方信息: Multidex 如果您正在使用Application类的自定义实现,则必须扩展MultiDexApplication类。 还需要gradle标志。 如果您没有使用自定义Application类,只需添加清单中提供的条目 - 它在文档中有描述。 编辑:差点忘了 - 你要添加依赖项,这个库提供了multidex:compile'com.android.support:multidex:1.0.1 c ... -
您正在尝试使用java.nio.file.Paths ,而据我所见,它并不存在于Android中。 (仅支持Java 7 API的某些部分。) 目前还不清楚你在寻找什么路径,或者你将如何处理结果,但考虑使用File 。 编辑,现在我们知道了更多:您不应该将桌面JRE jar文件放在Android项目的类路径中。 这只是要求麻烦。 如果没有这样做,你会得到正确的编译时错误。 You're trying to use java.nio.file.Paths, which doesn't exist in And ...
-
看起来在res / drawable-v21文件夹中有一些菜单图标,但在res / drawable文件夹中没有它们。 更新: 您可以在文件app / build / generated / source / r / debug(或release)/you/package/id/R.java中找到其id(#0x7f02009f)的“问题”资源。 Looks like you have some menu icons in res/drawable-v21 folder but don't have them ...
-
根据错误消息(com.ajinex.easysave.location.LocationCheckService)和包名称(com.ajinex.easysave),您需要在清单文件中将服务声明为.location.LocationCheckService。 Based on the error message (com.ajinex.easysave.location.LocationCheckService) and the package name (com.ajinex.easysave) you ...
-
api level 10即android 2.3.3可能没有Api level 19即android 4.4 例如 的renderScript 动作条 片段 键盘支持 等等 那么您将不得不使用支持库在低端设备或具有较低api的手机中使用上述功能。 只需将您的android:minSdkVersion更改为manifest file较低版本可能会导致应用程序崩溃或强制关闭... The api level 10 i.e android 2.3.3 may not have that are in Api le ...
-
你可以试试, multiDexEnabled = false 在build.gradle文件中。 如果已经有multiDexEnabled = true则将其更改为false或添加此新行。 You can try doing, multiDexEnabled = false in your build.gradle file. If you already have multiDexEnabled = true then change it to false or add this new line.
-
首先让项目右键单击属性 - > Java BuildPath选择库并添加jar android-support-v4.jar,然后按照这些步骤操作。 转到Project-> Properties-> Java Build Path,然后选择Order and export选项卡。 设置android-support-v4.jar库并将其放入列表顶部。 并清洁和重建..它适用于大多数情况 First make project right click properties-> Java BuildPath se ...