question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Build-Apks have no dex-files after upgrading to gradle plugin version 4.0.0

See original GitHub issue

I have a couple of dynamic feature modules in my project. When I updated AGP to 4.0.0, I’m unable to install/test my app because of the following error I get when installing the apks using bundletool.

Module 'module1' has no dex files but the attribute 'hasCode' is not set to false in the AndroidManifest.xml.

I’ve got minifyenabled set to true and proguard rules as well. It worked fine without issues on AGP 3.6.3.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
ymakhnocommented, Jun 1, 2020

Your project uses very old version of R8 as you override it in your build.gradle to classpath "com.android.tools:r8:1.6.84" and AGP 4.0 is shipped with version 2.0.74 by default. If I remove this dependency from your build script the project builds successfully with and without additional proguard rules you provided in proguard-rules.pro.

1reaction
ymakhnocommented, Jun 1, 2020

Thank you for providing the sample project. We will investigate and return back to you.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Android Gradle plugin release notes - Android Developers
If the specified plugin version has not been downloaded, Gradle downloads it the next time you build your project or click File >...
Read more >
Ask Question - Stack Overflow
This error started when I upgraded the Gradle Wrapper to 6.1.1 and the Android Gradle Plugin 4.0.0. The main change was the one...
Read more >
Upgrading your build from Gradle 4.x to 5.0
This chapter provides the information you need to migrate your older Gradle 4.x builds to Gradle 5.0. In most cases, you will need...
Read more >
Solved: AppDynamics Android Gradle Plugin 20.4.0 issues wi...
Solved: Hi, we upgraded our Gradle Versions to the most recent ones, ... APK to include no DEX-Files when AppDynamics Plugin is applied....
Read more >
Bug: IDE suggest to update gradle version for a new project ...
It tells you to update gradle plugin for some reason, instead of doing it on its ... And after: ... it caused a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found