- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
尝试构建我的Android应用程序时出现问题。
有人知道会导致什么吗?
Message Gradle构建:
Error:Execution failed for task ':app:transformJackWithJackForDebug'.
com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: Error while executing java process with main class com.android.jack.Main with arguments {-D jack.dex.optimize=true -D jack.reporter=sdk -D jack.dex.debug.vars=true --classpath C:\project path\app\build\intermediates\transforms\preJackRuntimeLibraries\debug\jars\8000\40\android-494676acc5ae561acdb3444fad9dc9c16dce108e.jar;C:\project path\app\build\intermediates\transforms\preJackRuntimeLibraries\debug\jars\8000\40\org.apache.http.legacy-a5625a1aa7d1c0a0bf4647ee3b299ff643b51975.jar --import C:\project path\app\build\intermediates\transforms\preJackPackagedLibraries\debug\jars\8000\1f\baseLibrary-2.3.3-575126a8f1a5e23f33dd35cbfae75ba6277fd82b.jar --import C:\project path\app\build\intermediates\transforms\preJackPackagedLibraries\debug\jars\8000\1f\bolts-android-1.4.0-cf23b5aecaa32ac116c09a591456ec2b9e42b3a5.jar --import C:\project path\app\build\intermediates\transforms\preJackPackagedLibraries\debug\jars\8000\1f\bolts-applinks-1.4.0-3475e9108a3c55eeacef5c88f0409e8ddd89b86d.jar --import C:\project path\app\build\intermediates\transforms\preJackPackagedLibraries\debug\jars\8000\1f\bolts-tasks-1.4.0-f55924028f2bc01d44ad2113beb51e1d42b3cf98.jar --import C:\project path\app\build\intermediates\transforms\preJackPackagedLibraries\debug\jars\8000\1f\classes-02d7bfa32725032b20474ce5a6b496d11e6e3ab9.jar --import C:\project path\app\build\intermediates\transforms\preJackPackagedLibraries\debug\jars\8000\1f\classes-0cdbf3903582be9c20e6d4c6ceb71258c2cf53fe.jar --import C:\project path\app\build\intermediates\transforms\preJackPackagedLibraries\debug\jars\8000\1f\classes-0ee5c9d13af3d9b6d8a66c05b31b2817b66390b5.jar --import C:\project path\app\build\intermediates\transforms\preJackPackagedLibraries\debug\jars\8000\1f\classes-0fbdc4db187a1efff1e63757eaadf3931b4f5a87.jar --import C:\project path\app\build\intermediates\transforms\preJackPackagedLibraries\debug\jars\8000\1f\classes-19c73b5b04a450f4e11414e68458615daf323ebf.jar --import C:\project path\app\build\intermediates\transforms\preJackPackagedLibraries\debug\jars\8000\1f\classes-3082cc79371d023fca536a837c3afa147f37b391.jar --import C:\project path\app\build\intermediates\transforms\preJackPackagedLibraries\debug\jars\8000\1f\classes-336355207e78f1a537dc9f20a345e9818b9cce56.jar --import C:\project path\app\build\intermediates\transforms\preJackPackagedLibraries\debug\jars\8000\1f\classes-35ae90dafab9bdba84066aee3e0be830bcda3bde.jar --import C:\project path\app\build\intermediates\transforms\preJackPackagedLibraries\debug\jars\8000\1f\classes-38bbc1bb9daebddc77019b834bbc5cf799402a1b.jar --import C:\project path\app\build\intermediates\transforms\preJackPackagedLibraries\debug\jars\8000\1f\classes-3a0dc3a894d5b837a52559125db0d476f347b957.jar --import C:\project path\app\build\intermediates\transforms\preJackPackagedLibraries\debug\jars\8000\1f\classes-3d2f95057e110dff2a0d28b3d7b7bb2a6bd46e12.jar --import C:\project path\app\build\intermediates\transforms\preJackPackagedLibraries\debug\jars\8000\1f\classes-3e45f716057fc49266cc0564f385f5ca304f2f2c.jar --import C:\project path\app\build\intermediates\transforms\preJackPackagedLibraries\debug\jars\8000\1f\classes-3f317f01d2d7f52d8b466f3cda13243f91dd3704.jar --import C:\project path\app\build\intermediates\transforms\preJackPackagedLibraries\debug\jars\8000\1f\classes-40fadf721d24fb5023d494cc098300657eaa5f8a.jar --import C:\project path\app\build\intermediates\transforms\preJackPackagedLibraries\debug\jars\8000\1f\classes-46b51301cee189f52fdf050c0e603667a5697563.jar --import C:\project path\app\build\intermediates\transforms\preJackPackagedLibraries\debug\jars\8000\1f\classes-4cd8e75ad8ae9b323c978267293e8fc7701a8528.jar --import C:\project path\app\build\intermediates\transforms\preJackPackagedLibraries\debug\jars\8000\1f\classes-53dddb31f54df5620846c6bc2448a4a09ef36fc8.jar --import C:\project path\app\build\intermediates\transforms\preJackPackagedLibraries\debug\jars\8000\1f\classes-55905144b321036dc0b91f32d6a800649432ea73.jar --import C:\project path\app\build\intermediates\transforms\preJackPackagedLibraries\debug\jars\8000\1f\classes-5ec83367cbe14d0f508d81fc9173eb743614b0e3.jar --import C:\project path\app\build\intermediates\transforms\preJackPackagedLibraries\debug\jars\8000\1f\classes-5febb96f174b50afdc506c0b5172ac919d120b0f.jar --import C:\project path\app\build\intermediates\transforms\preJackPackagedLibraries\debug\jars\8000\1f\classes-69fa630a1d44f9347f5b66137f577b3d3ea72469.jar --import C:\project path\app\build\intermediates\transforms\preJackPackagedLibraries\debug\jars\8000\1f\classes-6d5b4f12c5f66b056a2b4abbd3852aa075dc7553.jar --import C:\project path\app\build\intermediates\transforms\preJackPackagedLibraries\debug\jars\8000\1f\classes-6e156584596ef04fb2471766571b7e38bdcd2bb6.jar --import C:\project path\app\build\intermediates\transforms\preJackPackagedLibraries\debug\jars\8000\1f\classes-86167172c5196083eff0324c88c3265eab25e942.jar --import C:\project path\app\build\intermediates\transforms\preJackPackagedLibraries\debug\jars\8000\1f\classes-8d1352e5c45862c25d03cc9ebb8251fe21bec24a.jar --import C:\project path\app\build\intermediates\transforms\preJackPackagedLibraries\debug\jars\8000\1f\classes-92d81d8dc5e9eff3e1419cd045d6111e99f43e16.jar --import C:\project path\app\build\intermediates\transforms\preJackPackagedLibraries\debug\jars\8000\1f\classes-995b7c34b8bf270882e1b471a3e4e1e6218aeeee.jar --import C:\project path\app\build\intermediates\transforms\preJackPackagedLibraries\debug\jars\8000\1f\classes-a3fe634443d8ac55e76e3f24c7b7afcaa58b8612.jar --import C:\project path\app\build\intermediates\transforms\preJackPackagedLibraries\debug\jars\8000\1f\classes-b95da7b4cabf89e692884d829130e6ad06e3797b.jar --import C:\project path\app\build\intermediates\transforms\preJackPackagedLibraries\debug\jars\8000\1f\classes-ba2a5adb0e06b0be1ecf375aeb88aff1085108db.jar --import C:\project path\app\build\intermediates\transforms\preJackPackagedLibraries\debug\jars\8000\1f\classes-bc9b955b32272b95710aaefe170067a66e93d7b3.jar --import C:\project path\app\build\intermediates\transforms\preJackPackagedLibraries\debug\jars\8000\1f\classes-c092b925f35b1adcc95209c9f5bb039cd150952c.jar --import C:\project path\app\build\intermediates\transforms\preJackPackagedLibraries\debug\jars\8000\1f\classes-c221fffbd4ed144883af15ac49b8ce5149719066.jar --import C:\project path\app\build\intermediates\transforms\preJackPackagedLibraries\debug\jars\8000\1f\classes-c4f602c13d703d8e86ffab0850d5e3dea008886c.jar --import C:\project path\app\build\intermediates\transforms\preJackPackagedLibraries\debug\jars\8000\1f\classes-c626b165d7a85eda864e83d50ce6d024ab7d9c10.jar --import C:\project path\app\build\intermediates\transforms\preJackPackagedLibraries\debug\jars\8000\1f\classes-d08cc52f1e99edfe7ba9ef94d3ab2a235e745579.jar --import C:\project path\app\build\intermediates\transforms\preJackPackagedLibraries\debug\jars\8000\1f\classes-d5e4c4f38c913bfc646d47e2b85b3de1c681b7cb.jar --import C:\project path\app\build\intermediates\transforms\preJackPackagedLibraries\debug\jars\8000\1f\classes-d9db5ab99d4b278bcfeaa6de1352c7dda412ccea.jar --import C:\project path\app\build\intermediates\transforms\preJackPackagedLibraries\debug\jars\8000\1f\classes-dcb4f6fe7c6343e4689963f3a4f4210681d7e23f.jar --import C:\project path\app\build\intermediates\transforms\preJackPackagedLibraries\debug\jars\8000\1f\classes-e15eaccb4b9e491228c25cb12db0e7cdf6de5c64.jar --import C:\project path\app\build\intermediates\transforms\preJackPackagedLibraries\debug\jars\8000\1f\classes-ef15299aa9367a4797ccdf9736e4f0c9a8d010cb.jar --import C:\project path\app\build\intermediates\transforms\preJackPackagedLibraries\debug\jars\8000\1f\classes-f65d9a0e2fbffa8b7440afb2db9d41cad9a969ff.jar --import C:\project path\app\build\intermediates\transforms\preJackPackagedLibraries\debug\jars\8000\1f\classes-fcd7b43521f1c2cfdcb0f677afd951ec7fe85de3.jar --import C:\project path\app\build\intermediates\transforms\preJackPackagedLibraries\debug\jars\8000\1f\common-1.0.0-d1aeaad741d6cb59bb5e7a3714cf946b24a1ebbc.jar --import C:\project path\app\build\intermediates\transforms\preJackPackagedLibraries\debug\jars\8000\1f\common-1.0.0-d642f9f4e155adc6e4b5db9bc9b67051d8b05897.jar --import C:\project path\app\build\intermediates\transforms\preJackPackagedLibraries\debug\jars\8000\1f\constraint-layout-solver-1.0.2-028d7ac4a13120fdf3ed1269cfc96c79f68cfa4b.jar --import C:\project path\app\build\intermediates\transforms\preJackPackagedLibraries\debug\jars\8000\1f\converter-gson-2.2.0-0ad8a3e4a302c09e22dbd3e29c49809c966a2301.jar --import C:\project path\app\build\intermediates\transforms\preJackPackagedLibraries\debug\jars\8000\1f\converter-jackson-2.2.0-d0e77747474fbe6d316527c59895b681cfaca927.jar --import C:\project path\app\build\intermediates\transforms\preJackPackagedLibraries\debug\jars\8000\1f\core-3.3.0-9092f4db9d9485f49933e25764ad2ea66d119ee7.jar --import C:\project path\app\build\intermediates\transforms\preJackPackagedLibraries\debug\jars\8000\1f\gson-2.7-f1d201ecb177163cf90eefadcf5c8ef7bf47f8b9.jar --import C:\project path\app\build\intermediates\transforms\preJackPackagedLibraries\debug\jars\8000\1f\jackson-annotations-2.7.0-fe885ecd0b602fdc7e8e9c75db7fc161741d97f7.jar --import C:\project path\app\build\intermediates\transforms\preJackPackagedLibraries\debug\jars\8000\1f\jackson-core-2.7.2-f436f0c959cd9014e7c45a3a4816a9487e85a53a.jar --import C:\project path\app\build\intermediates\transforms\preJackPackagedLibraries\debug\jars\8000\1f\jackson-databind-2.7.2-95d4e0ff983ad3f13ee450cf8885a2d262a5608c.jar --import C:\project path\app\build\intermediates\transforms\preJackPackagedLibraries\debug\jars\8000\1f\logging-interceptor-3.6.0-9f864054b8eb0df0deaadf99dd5accd779ac023d.jar --import C:\project path\app\build\intermediates\transforms\preJackPackagedLibraries\debug\jars\8000\1f\okhttp-3.6.0-8ed3451ff436ef6dc933c0e03b57e153af038d0c.jar --import C:\project path\app\build\intermediates\transforms\preJackPackagedLibraries\debug\jars\8000\1f\okio-1.11.0-b8f82bc44151f2c2231fc2a5ca98994b76f20228.jar --import C:\project path\app\build\intermediates\transforms\preJackPackagedLibraries\debug\jars\8000\1f\renderscript-v8-ba89d33479cd991e1e1710220e218071fd616801.jar --import C:\project path\app\build\intermediates\transforms\preJackPackagedLibraries\debug\jars\8000\1f\retrofit-2.2.0-0ab8c774bc0ac89db406aef4bb99f317a15d5d0b.jar --import C:\project path\app\build\intermediates\transforms\preJackPackagedLibraries\debug\jars\8000\1f\support-annotations-27.0.1-efa02cb7839a17c71708c9cd7486e69446a1956b.jar --output-dex C:\project path\app\build\intermediates\transforms\jack\debug\folders\1000\1f\main --output-jack C:\project path\app\build\intermediates\packaged\debug\classes.zip -D jack.import.type.policy=keep-first -D jack.import.resource.policy=keep-first --multi-dex legacy -D jack.java.source.version=1.8 -D jack.android.min-api-level=17 -D jack.annotation-processor.path=true -D jack.annotation-processor.path.list=C:\Users....gradle\caches\modules-2\files-2.1\com.android.support\support-annotations\27.0.1\287742f1c6cea6d9126670e9f031890b0462362a\support-annotations-27.0.1.jar;C:\Users....gradle\caches\modules-2\files-2.1\com.fasterxml.jackson.core\jackson-annotations\2.7.0\19f42c154ffc689f40a77613bc32caeb17d744e3\jackson-annotations-2.7.0.jar;C:\Users....gradle\caches\modules-2\files-2.1\com.parse.bolts\bolts-android\1.4.0\cc174c559b5177982887bf6e1b76003aebad9516\bolts-android-1.4.0.jar;C:\Users....gradle\caches\modules-2\files-2.1\com.google.zxing\core\3.3.0\73c49077166faa4c3c0059c5f583d1d7bd1475fe\core-3.3.0.jar;C:\Users....gradle\caches\modules-2\files-2.1\com.squareup.retrofit2\converter-gson\2.2.0\a09926806199499a20b2f5168779499abfa33342\converter-gson-2.2.0.jar;C:\Users....gradle\caches\modules-2\files-2.1\com.squareup.retrofit2\converter-jackson\2.2.0\a8565d80d994f312b4f146de4d75f7626416a1f0\converter-jackson-2.2.0.jar;C:\Program Files\Android\Android Studio\gradle\m2repository\com\googlecode\juniversalchardet\juniversalchardet\1.0.3\juniversalchardet-1.0.3.jar;C:\Users....gradle\caches\modules-2\files-2.1\com.android.databinding\baseLibrary\2.3.3\eb3399988a52099b0127e27fb5bed666eca86ace\baseLibrary-2.3.3.jar;C:\Users....gradle\caches\modules-2\files-2.1\com.squareup.okio\okio\1.11.0\840897fcd7223a8143f1d9b6f69714e7be34fd50\okio-1.11.0.jar;C:\Users....gradle\caches\modules-2\files-2.1\android.arch.lifecycle\common\1.0.0\e414a4cb28434e25c4f6aa71426eb20cf4874ae9\common-1.0.0.jar;C:\sdk-android\extras\m2repository\com\android\support\constraint\constraint-layout-solver\1.0.2\constraint-layout-solver-1.0.2.jar;C:\Users....gradle\caches\modules-2\files-2.1\com.parse.bolts\bolts-applinks\1.4.0\8ad21bf21784dacce5f2043afb97218cc377e835\bolts-applinks-1.4.0.jar;C:\Users....gradle\caches\modules-2\files-2.1\android.arch.core\common\1.0.0\a2d487452376193fc8c103dd2b9bd5f2b1b44563\common-1.0.0.jar;C:\Users....gradle\caches\modules-2\files-2.1\com.android.databinding\compiler\2.3.3\bf8a44e08f3f78c5cb5a782c36d57e9c63586549\compiler-2.3.3.jar;C:\Users....gradle\caches\modules-2\files-2.1\com.google.code.gson\gson\2.7\751f548c85fa49f330cecbb1875893f971b33c4e\gson-2.7.jar;C:\Users....gradle\caches\modules-2\files-2.1\com.fasterxml.jackson.core\jackson-core\2.7.2\8b8310381b690e317f5f0574e9b2dd7034778b4c\jackson-core-2.7.2.jar;C:\Users....gradle\caches\modules-2\files-2.1\com.fasterxml.jackson.core\jackson-databind\2.7.2\84ffa765dd258dbab8695963c41308b054f3a1cb\jackson-databind-2.7.2.jar;C:\Users....gradle\caches\modules-2\files-2.1\com.parse.bolts\bolts-tasks\1.4.0\d85884acf6810a3bbbecb587f239005cbc846dc4\bolts-tasks-1.4.0.jar;C:\Users....gradle\caches\modules-2\files-2.1\com.squareup.okhttp3\logging-interceptor\3.6.0\81887458b69ddc32722df7e4c35235fd74e6a8ba\logging-interceptor-3.6.0.jar;C:\Users....gradle\caches\modules-2\files-2.1\com.squareup.retrofit2\retrofit\2.2.0\41e67dba73c3347e4503761642c39d0e06ca1f2\retrofit-2.2.0.jar;C:\Users....gradle\caches\modules-2\files-2.1\com.squareup.okhttp3\okhttp\3.6.0\69edde9fc4b01c9fd51d25b83428837478c27254\okhttp-3.6.0.jar -D jack.annotation-processor.options=android.databinding.artifactType=APPLICATION,android.databinding.printEncodedErrors=1,android.databinding.minApi=17,android.databinding.isTestVariant=0,android.databinding.enableDebugLogs=0,android.databinding.sdkDir=C:\sdk-android,android.databinding.bindingBuildFolder=C:\project path\app\build\intermediates\data-binding-compiler\debug,android.databinding.enableForTests=0,android.databinding.modulePackage=...,android.databinding.generationalFileOutDir=C:\project path\app\build\intermediates\bundles\debug\data-binding,android.databinding.xmlOutDir=C:\project path\app\build\intermediates\data-binding-info\debug -D jack.annotation-processor.source.output=C:\project path\app\build\generated\source\apt\debug @C:\project path\app\build\intermediates\jack\debug\ecj-options.txt}
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
buildToolsVersion '26.0.1'
defaultConfig {
applicationId "..."
minSdkVersion 17
targetSdkVersion 26
versionCode 6
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
renderscriptSupportModeEnabled true
multiDexEnabled true
jackOptions {
enabled true
jackInProcess false
}
dexOptions {
javaMaxHeapSize "2048M"
}
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
dataBinding {
enabled = true
}
compileOptions {
targetCompatibility 1.8
sourceCompatibility 1.8
}
sourceSets {
main {
res.srcDirs =
[
'src/main/res/layouts/activities',
'src/main/res/layouts/fragments',
'src/main/res/layouts',
'src/main/res'
]
}
}
packagingOptions {
exclude 'META-INF/DEPENDENCIES.txt'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/NOTICE'
exclude 'META-INF/LICENSE'
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/notice.txt'
exclude 'META-INF/license.txt'
exclude 'META-INF/dependencies.txt'
exclude 'META-INF/LGPL2.1'
}
}
allprojects {
repositories {
jcenter()
maven {
url "https://maven.google.com"
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile project(':p24lib')
// debugCompile 'com.squareup.leakcanary:leakcanary-android:1.5.4'
// releaseCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.5.4'
compile 'com.android.support:appcompat-v7:26.0.2'
compile "com.android.support:support-core-utils:26.0.2"
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.android.support:support-v4:26.0.2'
compile 'com.android.support:design:26.0.2'
compile 'com.android.support:percent:26.0.2'
compile 'com.android.support:cardview-v7:26.0.2'
compile 'com.android.support:recyclerview-v7:26.0.2'
compile 'com.android.support:multidex:1.0.1'
compile 'com.facebook.android:facebook-android-sdk:4.+'
compile 'com.squareup.retrofit2:retrofit:2.2.0'
compile 'com.squareup.retrofit2:converter-gson:2.2.0'
compile 'com.squareup.retrofit2:converter-jackson:2.2.0'
compile 'com.squareup.okhttp3:logging-interceptor:3.6.0'
compile 'de.hdodenhof:circleimageview:2.1.0'
compile 'com.google.android.gms:play-services-maps:11.0.4'
compile 'com.google.android.gms:play-services-places:11.0.4'
compile 'com.google.android.gms:play-services-location:11.0.4'
compile 'com.google.maps.android:android-maps-utils:0.5'
compile 'com.google.firebase:firebase-messaging:11.0.4'
compile 'com.google.firebase:firebase-core:11.0.4'
testCompile 'junit:junit:4.12'
}
apply plugin: "com.google.gms.google-services"
最佳答案
如果您需要或想要手动编辑build.gradle
,这对我有用:
放下Jack并升级到最新版本的Android Gradle插件。
Java 8支持was added in 3.0.0,而3.1.4是与Gradle 4.4(与Ubuntu 18.04 bundle 在一起)兼容的最新版本。 Jack不再需要,现在已弃用。
如果使用Gradle Wrapper,请运行./gradlew help
以查看当前版本。如果您使用的版本低于4.4,请运行gradle wrapper
将Gradle Wrapper升级到本地Gradle版本。
您的build.gradle
缺少buildscript
块,该块定义了Android的Gradle插件-不知道是否简单地添加它就能解决问题,YMMV。
这是我需要对build.gradle
进行的更改(差异符号-删除以-
开头的行,并添加以+
开头的行):
+ buildscript {
+ repositories {
+ mavenCentral()
+ jcenter()
+ google()
+ }
+ dependencies {
+ classpath 'com.android.tools.build:gradle:3.1.4'
+ }
+ }
apply plugin: 'com.android.application'
android {
<...>
- jackOptions {
- enabled true
- jackInProcess false
- }
- dexOptions {
- javaMaxHeapSize "2048M"
- }
}
<...>
}
allprojects {
repositories {
jcenter()
- maven {
- url "https://maven.google.com"
- }
+ maven()
+ google()
}
}
<...>
关于android - Android编译错误-transformJackWithJackForDebug,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48339765/
尝试构建我的Android应用程序时出现问题。 有人知道会导致什么吗? Message Gradle构建: Error:Execution failed for task ':app:transfor
我必须在我的应用程序中使用 Lambda 表达式,但我无法解决这个问题。 任何建议都会很棒。 谢谢。 PS:使用最新的 Android Studio 2.2,最新的 SDK Manager 和安装的
我在运行应用程序时遇到以下问题。 Error:Execution failed for task ':app:transformJackWithJackForDebug'. com.android.s
我的 gradle 如下所示: apply plugin: 'com.android.application' android { compileSdkVersion 25 build
我是一名优秀的程序员,十分优秀!