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.

[Android] React Native 0.28 error

See original GitHub issue

Hi,

I’m trying to upgrade my project to use release 0.28, but when I try to run on Android, show this:

:app:dexDebug
Unknown source file : UNEXPECTED TOP-LEVEL EXCEPTION:
Unknown source file : com.android.dex.DexException: Multiple dex files define Landroid/support/v7/appcompat/R$anim;
Unknown source file :   at com.android.dx.merge.DexMerger.readSortableTypes(DexMerger.java:596)
Unknown source file :   at com.android.dx.merge.DexMerger.getSortedTypes(DexMerger.java:554)
Unknown source file :   at com.android.dx.merge.DexMerger.mergeClassDefs(DexMerger.java:535)
Unknown source file :   at com.android.dx.merge.DexMerger.mergeDexes(DexMerger.java:171)
Unknown source file :   at com.android.dx.merge.DexMerger.merge(DexMerger.java:189)
Unknown source file :   at com.android.dx.command.dexer.Main.mergeLibraryDexBuffers(Main.java:502)
Unknown source file :   at com.android.dx.command.dexer.Main.runMonoDex(Main.java:334)
Unknown source file :   at com.android.dx.command.dexer.Main.run(Main.java:277)
Unknown source file :   at com.android.dx.command.dexer.Main.main(Main.java:245)
Unknown source file :   at com.android.dx.command.Main.main(Main.java:106)

:app:dexDebug FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:dexDebug'.
> com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/usr/lib/jvm/java-8-oracle/bin/java'' finished with non-zero exit value 2

my gradle.build:

...
dependencies {
    compile project(':react-native-image-picker')
    compile fileTree(dir: "libs", include: ["*.jar"])
    compile "com.android.support:appcompat-v7:23.0.1"
    compile "com.facebook.react:react-native:+"  // From node_modules
}
...

I installed another packages like vector-icons and this error didn’t happened, only when I added image-picker module. Can someone help me with this problem?

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:2
  • Comments:15 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
yfukscommented, Jul 11, 2016

Just need to be sure that we remove android/build before publishing a new version Basically we have to remove all builds folders (there are multiples build folder that are created) and nodes_modules

0reactions
marcshillingcommented, Jul 29, 2016

Ok, this should never happen again in future builds

https://github.com/marcshilling/react-native-image-picker/releases/tag/v0.21.4

Read more comments on GitHub >

github_iconTop Results From Across the Web

Troubleshooting - React Native
If you encounter an error such as npm WARN locking Error: EACCES while using the React Native CLI, try running the following:.
Read more >
I get Task :app:processDebugMainManifest error in react ...
I have a react native project it was implemented untill 2 days ago but after that it didnt. I get this error (...
Read more >
react-native-maps - npm
React Native Mapview component for iOS + Android. ... Start using react-native-maps in your project by running `npm i react-native-maps`.
Read more >
react native reanimated build error - You.com | The search engine ...
I have just upgraded to RN 0.65 stable and have the same error on Android. I think it is because it is a...
Read more >
expo-error-recovery - NPM Package Versions - Socket.dev
Updated react-native-webview from 11.13.0 to 11.15.0 . ... Fixed setUserIdAsync throwing error on Android when null is passed.
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