Build fails when targeting Android Q but works at API 28 with “Failed to transform file 'android.jar' to match attributes”jarsigner: unable to sign jar: java.util.zip.ZipException: invalid entry compressed size (expected 463 but got 465 bytes)Android Studio Google JAR file causing GC overhead limit exceeded errorAndroid: duplicati entry error while build APK fileException failed for task ':app:transformResourcesWithMergeJavaResForDebug'. > java.util.zip.ZipException: invalid entry sizeUnable to build apk file in Android Studiojava.util.zip.ZipException: duplicate entry android/support/v4/content/res/TypedArrayUtils.classANDROID STUDIO 3.0 upgrade : Error:Could not resolve all files for configuration ':app:xxxxxxxDebugCompileClasspath'Getting the error “duplicate entry: com/google/android/gms/internal/zzaac$zza.class” when trying to build APKTransform output file does not existCould not resolve all files for configuration ':app:androidApis'
How do I get toddlers to stop asking for food every hour?
What would make bones be of different colors?
Who was the most successful German spy against Great Britain in WWII, from the contemporary German perspective?
How much does Commander Data weigh?
Filling a listlineplot with a texture
"fF" letter combination seems to be typeset strangely or incorrectly
Non-visual Computers - thoughts?
Need to number each equation in an optimization problem
Cooking Scrambled Eggs
Can $! cause race conditions when used in scripts running in parallel?
What is the difference between "Grippe" and "Männergrippe"?
Why isn't "I've" a proper response?
Prove your innocence
How were medieval castles built in swamps or marshes without draining them?
How to find out the average duration of the peer-review process for a given journal?
Server Integrity Check CheckCommands question
Can you cast bonus action and reaction spells while already casting a spell?
What should come first—characters or plot?
Where does learning new skills fit into Agile?
How to gently end involvement with an online community?
Rent contract say that pets are not allowed. Possible repercussions if bringing the pet anyway?
How do I prevent other wifi networks from showing up on my computer?
How can I unambiguously ask for a new user's "Display Name"?
Talk interpreter
Build fails when targeting Android Q but works at API 28 with “Failed to transform file 'android.jar' to match attributes”
jarsigner: unable to sign jar: java.util.zip.ZipException: invalid entry compressed size (expected 463 but got 465 bytes)Android Studio Google JAR file causing GC overhead limit exceeded errorAndroid: duplicati entry error while build APK fileException failed for task ':app:transformResourcesWithMergeJavaResForDebug'. > java.util.zip.ZipException: invalid entry sizeUnable to build apk file in Android Studiojava.util.zip.ZipException: duplicate entry android/support/v4/content/res/TypedArrayUtils.classANDROID STUDIO 3.0 upgrade : Error:Could not resolve all files for configuration ':app:xxxxxxxDebugCompileClasspath'Getting the error “duplicate entry: com/google/android/gms/internal/zzaac$zza.class” when trying to build APKTransform output file does not existCould not resolve all files for configuration ':app:androidApis'
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
I've got a legacy app I'm maintaining that builds fine when targeting API 28 but fails at Q.
The full error from the gradle build looks like this:
> Task :lintVitalRelease
Calling mockable JAR artifact transform to create file: /Users/spartygw/.gradle/caches/transforms-1/files-1.1/android.jar/5fe3ee8a258b0a02d9b262c195a9ab63/android.jar with input /Users/spartygw/Library/Android/sdk/platforms/android-Q/android.jar
> Task :lintVitalRelease FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':lintVitalRelease'.
> Could not resolve all files for configuration ':androidApis'.
> Failed to transform file 'android.jar' to match attributes artifactType=android-mockable-jar, returnDefaultValues=false using transform MockableJarTransform
> Cannot create mockable android.jar
I've followed the guidelines for setting up the Android Q SDK from here.
I'm building from a command line outside of Android Studio.
I see the build progress through building the jni library but barfs immediately when it gets to java byte compilation.
EDIT: Because I can't include the entire gradle stack (limited to 30,000 bytes in a post) here is the synopsis:
* Exception is:
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':lintVitalRelease'.
Caused by: org.gradle.api.internal.artifacts.ivyservice.DefaultLenientConfiguration$ArtifactResolveException: Could not resolve all files for configuration ':androidApis'.
Caused by: org.gradle.api.artifacts.transform.ArtifactTransformException: Failed to transform file 'android.jar' to match attributes artifactType=android-mockable-jar, returnDefaultValues=false using transform MockableJarTransform
Caused by: java.lang.RuntimeException: Cannot create mockable android.jar
Caused by: java.util.zip.ZipException: invalid entry compressed size (expected 1821 but got 1807 bytes)
at com.android.builder.testing.MockableJarGenerator.createMockableJar(MockableJarGenerator.java:96)
at com.android.build.gradle.internal.dependency.MockableJarTransform.transform(MockableJarTransform.java:54)
... 109 more
Suppressed: java.util.zip.ZipException: invalid entry compressed size (expected 1821 but got 1807 bytes)
add a comment |
I've got a legacy app I'm maintaining that builds fine when targeting API 28 but fails at Q.
The full error from the gradle build looks like this:
> Task :lintVitalRelease
Calling mockable JAR artifact transform to create file: /Users/spartygw/.gradle/caches/transforms-1/files-1.1/android.jar/5fe3ee8a258b0a02d9b262c195a9ab63/android.jar with input /Users/spartygw/Library/Android/sdk/platforms/android-Q/android.jar
> Task :lintVitalRelease FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':lintVitalRelease'.
> Could not resolve all files for configuration ':androidApis'.
> Failed to transform file 'android.jar' to match attributes artifactType=android-mockable-jar, returnDefaultValues=false using transform MockableJarTransform
> Cannot create mockable android.jar
I've followed the guidelines for setting up the Android Q SDK from here.
I'm building from a command line outside of Android Studio.
I see the build progress through building the jni library but barfs immediately when it gets to java byte compilation.
EDIT: Because I can't include the entire gradle stack (limited to 30,000 bytes in a post) here is the synopsis:
* Exception is:
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':lintVitalRelease'.
Caused by: org.gradle.api.internal.artifacts.ivyservice.DefaultLenientConfiguration$ArtifactResolveException: Could not resolve all files for configuration ':androidApis'.
Caused by: org.gradle.api.artifacts.transform.ArtifactTransformException: Failed to transform file 'android.jar' to match attributes artifactType=android-mockable-jar, returnDefaultValues=false using transform MockableJarTransform
Caused by: java.lang.RuntimeException: Cannot create mockable android.jar
Caused by: java.util.zip.ZipException: invalid entry compressed size (expected 1821 but got 1807 bytes)
at com.android.builder.testing.MockableJarGenerator.createMockableJar(MockableJarGenerator.java:96)
at com.android.build.gradle.internal.dependency.MockableJarTransform.transform(MockableJarTransform.java:54)
... 109 more
Suppressed: java.util.zip.ZipException: invalid entry compressed size (expected 1821 but got 1807 bytes)
add a comment |
I've got a legacy app I'm maintaining that builds fine when targeting API 28 but fails at Q.
The full error from the gradle build looks like this:
> Task :lintVitalRelease
Calling mockable JAR artifact transform to create file: /Users/spartygw/.gradle/caches/transforms-1/files-1.1/android.jar/5fe3ee8a258b0a02d9b262c195a9ab63/android.jar with input /Users/spartygw/Library/Android/sdk/platforms/android-Q/android.jar
> Task :lintVitalRelease FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':lintVitalRelease'.
> Could not resolve all files for configuration ':androidApis'.
> Failed to transform file 'android.jar' to match attributes artifactType=android-mockable-jar, returnDefaultValues=false using transform MockableJarTransform
> Cannot create mockable android.jar
I've followed the guidelines for setting up the Android Q SDK from here.
I'm building from a command line outside of Android Studio.
I see the build progress through building the jni library but barfs immediately when it gets to java byte compilation.
EDIT: Because I can't include the entire gradle stack (limited to 30,000 bytes in a post) here is the synopsis:
* Exception is:
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':lintVitalRelease'.
Caused by: org.gradle.api.internal.artifacts.ivyservice.DefaultLenientConfiguration$ArtifactResolveException: Could not resolve all files for configuration ':androidApis'.
Caused by: org.gradle.api.artifacts.transform.ArtifactTransformException: Failed to transform file 'android.jar' to match attributes artifactType=android-mockable-jar, returnDefaultValues=false using transform MockableJarTransform
Caused by: java.lang.RuntimeException: Cannot create mockable android.jar
Caused by: java.util.zip.ZipException: invalid entry compressed size (expected 1821 but got 1807 bytes)
at com.android.builder.testing.MockableJarGenerator.createMockableJar(MockableJarGenerator.java:96)
at com.android.build.gradle.internal.dependency.MockableJarTransform.transform(MockableJarTransform.java:54)
... 109 more
Suppressed: java.util.zip.ZipException: invalid entry compressed size (expected 1821 but got 1807 bytes)
I've got a legacy app I'm maintaining that builds fine when targeting API 28 but fails at Q.
The full error from the gradle build looks like this:
> Task :lintVitalRelease
Calling mockable JAR artifact transform to create file: /Users/spartygw/.gradle/caches/transforms-1/files-1.1/android.jar/5fe3ee8a258b0a02d9b262c195a9ab63/android.jar with input /Users/spartygw/Library/Android/sdk/platforms/android-Q/android.jar
> Task :lintVitalRelease FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':lintVitalRelease'.
> Could not resolve all files for configuration ':androidApis'.
> Failed to transform file 'android.jar' to match attributes artifactType=android-mockable-jar, returnDefaultValues=false using transform MockableJarTransform
> Cannot create mockable android.jar
I've followed the guidelines for setting up the Android Q SDK from here.
I'm building from a command line outside of Android Studio.
I see the build progress through building the jni library but barfs immediately when it gets to java byte compilation.
EDIT: Because I can't include the entire gradle stack (limited to 30,000 bytes in a post) here is the synopsis:
* Exception is:
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':lintVitalRelease'.
Caused by: org.gradle.api.internal.artifacts.ivyservice.DefaultLenientConfiguration$ArtifactResolveException: Could not resolve all files for configuration ':androidApis'.
Caused by: org.gradle.api.artifacts.transform.ArtifactTransformException: Failed to transform file 'android.jar' to match attributes artifactType=android-mockable-jar, returnDefaultValues=false using transform MockableJarTransform
Caused by: java.lang.RuntimeException: Cannot create mockable android.jar
Caused by: java.util.zip.ZipException: invalid entry compressed size (expected 1821 but got 1807 bytes)
at com.android.builder.testing.MockableJarGenerator.createMockableJar(MockableJarGenerator.java:96)
at com.android.build.gradle.internal.dependency.MockableJarTransform.transform(MockableJarTransform.java:54)
... 109 more
Suppressed: java.util.zip.ZipException: invalid entry compressed size (expected 1821 but got 1807 bytes)
edited Mar 27 at 19:34
spartygw
asked Mar 27 at 18:53
spartygwspartygw
1,5231 gold badge14 silver badges26 bronze badges
1,5231 gold badge14 silver badges26 bronze badges
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
Anyone who might be coming here from a google search, I found the answer.
In the release notes for Android Q Beta 2 I found in the release notes this blurb:
When using Gradle 3.2.0 for projects targeting Android Q, you might encounter a lint-related issue with an error message similar to "Could not transform android.jar to a mockable jar." This issue does not occur in Gradle 3.3.0 and later.
If you are working on an app that targets Android Q and are unable to upgrade to Gradle 3.3.0 or later, you can use one of the following workarounds:
- Disable lint for release builds
- Unzip and rezip android.jar
Sure enough, unzipping and rezipping the android.jar allowed me to build and deploy to my test Android Q device
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55384576%2fbuild-fails-when-targeting-android-q-but-works-at-api-28-with-failed-to-transfo%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Anyone who might be coming here from a google search, I found the answer.
In the release notes for Android Q Beta 2 I found in the release notes this blurb:
When using Gradle 3.2.0 for projects targeting Android Q, you might encounter a lint-related issue with an error message similar to "Could not transform android.jar to a mockable jar." This issue does not occur in Gradle 3.3.0 and later.
If you are working on an app that targets Android Q and are unable to upgrade to Gradle 3.3.0 or later, you can use one of the following workarounds:
- Disable lint for release builds
- Unzip and rezip android.jar
Sure enough, unzipping and rezipping the android.jar allowed me to build and deploy to my test Android Q device
add a comment |
Anyone who might be coming here from a google search, I found the answer.
In the release notes for Android Q Beta 2 I found in the release notes this blurb:
When using Gradle 3.2.0 for projects targeting Android Q, you might encounter a lint-related issue with an error message similar to "Could not transform android.jar to a mockable jar." This issue does not occur in Gradle 3.3.0 and later.
If you are working on an app that targets Android Q and are unable to upgrade to Gradle 3.3.0 or later, you can use one of the following workarounds:
- Disable lint for release builds
- Unzip and rezip android.jar
Sure enough, unzipping and rezipping the android.jar allowed me to build and deploy to my test Android Q device
add a comment |
Anyone who might be coming here from a google search, I found the answer.
In the release notes for Android Q Beta 2 I found in the release notes this blurb:
When using Gradle 3.2.0 for projects targeting Android Q, you might encounter a lint-related issue with an error message similar to "Could not transform android.jar to a mockable jar." This issue does not occur in Gradle 3.3.0 and later.
If you are working on an app that targets Android Q and are unable to upgrade to Gradle 3.3.0 or later, you can use one of the following workarounds:
- Disable lint for release builds
- Unzip and rezip android.jar
Sure enough, unzipping and rezipping the android.jar allowed me to build and deploy to my test Android Q device
Anyone who might be coming here from a google search, I found the answer.
In the release notes for Android Q Beta 2 I found in the release notes this blurb:
When using Gradle 3.2.0 for projects targeting Android Q, you might encounter a lint-related issue with an error message similar to "Could not transform android.jar to a mockable jar." This issue does not occur in Gradle 3.3.0 and later.
If you are working on an app that targets Android Q and are unable to upgrade to Gradle 3.3.0 or later, you can use one of the following workarounds:
- Disable lint for release builds
- Unzip and rezip android.jar
Sure enough, unzipping and rezipping the android.jar allowed me to build and deploy to my test Android Q device
answered Apr 11 at 23:44
spartygwspartygw
1,5231 gold badge14 silver badges26 bronze badges
1,5231 gold badge14 silver badges26 bronze badges
add a comment |
add a comment |
Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.
Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55384576%2fbuild-fails-when-targeting-android-q-but-works-at-api-28-with-failed-to-transfo%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown