我正在使用一种名为release_ABA
的特殊构建类型,以便使用相同的本机代码编译不同的应用程序:
buildTypes {
debug {
minifyEnabled enableProguardInReleaseBuilds
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
signingConfig signingConfigs.release
buildConfigField "String", "CODEPUSH_KEY", '""'
applicationIdSuffix ".debug"
manifestPlaceholders = [appName: "ourApp-Debug"]
}
release {
minifyEnabled enableProguardInReleaseBuilds
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
signingConfig signingConfigs.release
buildConfigField "String", "CODEPUSH_KEY", '"AIXinq5UB____"'
manifestPlaceholders = [appName: "ourApp"]
}
release_ABA {
minifyEnabled enableProguardInReleaseBuilds
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
signingConfig signingConfigs.release
buildConfigField "String", "CODEPUSH_KEY", '"AIXinq5UB____"'
applicationIdSuffix ".aba"
manifestPlaceholders = [appName: "Aba"]
}
}
然而,当我尝试gradlew installRelease_ABA
时,最后我收到以下错误:
Failed to capture snapshot of input files for task 'bundleRelease_ABAJsAndAssets' property
'$1' during up-to-date check.
> Failed to create MD5 hash for file 'E:\R\ourMobileApp\android\.gradle\3.5\fileConte
nt\fileContent.lock'.
这是我在build.gradle
内添加的内容:
project.ext.react = [
entryFile: "index.js",
inputExcludes: ["ios/**", "__tests__/**", "bundle_out/**"],
bundleInRelease_ABA: true,
jsBundleDirRelease_ABA: "$buildDir/intermediates/assets/release_ABA",
resourcesDirRelease_ABA: "$buildDir/intermediates/res/merged/release_ABA",
]
这里有什么问题吗?
感谢。