zetavg / react-native-system-notification

Android system notifications for React Native. Supports push notifications with GCM integrated.
https://www.npmjs.com/package/react-native-system-notification
244 stars 102 forks source link

com.android.dex.DexException: Multiple dex files define Lcom/google/android/gms/internal/zzlv$zza #48

Open GeoffreyPlitt opened 8 years ago

GeoffreyPlitt commented 8 years ago

My builds are failing, anyone seen this before? NodeJS 4, ReactNative 0.26, on Mac OS X.

app:mergeDebugAssets UP-TO-DATE :app:generateDebugResValues UP-TO-DATE :app:generateDebugResources UP-TO-DATE :app:mergeDebugResources :app:bundleDebugJsAndAssets SKIPPED :app:processDebugManifest :app:processDebugResources Unknown source file : warning: string 'catalyst_debugjs' has no default translation. Unknown source file : warning: string 'catalyst_element_inspector' has no default translation. Unknown source file : warning: string 'catalyst_jsload_error' has no default translation. Unknown source file : warning: string 'catalyst_jsload_message' has no default translation. Unknown source file : warning: string 'catalyst_jsload_title' has no default translation. Unknown source file : warning: string 'catalyst_reloadjs' has no default translation. Unknown source file : warning: string 'catalyst_settings' has no default translation. Unknown source file : warning: string 'catalyst_settings_title' has no default translation.

:app:generateDebugSources :app:processDebugJavaRes UP-TO-DATE :app:compileDebugJavaWithJavac :app:compileDebugNdk UP-TO-DATE :app:compileDebugSources :app:preDexDebug UP-TO-DATE :app:dexDebug Unknown source file : UNEXPECTED TOP-LEVEL EXCEPTION: Unknown source file : com.android.dex.DexException: Multiple dex files define Lcom/google/android/gms/internal/zzlv$zza; 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)

OmniSliver commented 8 years ago

I got the same error when I updated the react-native version. Fixed it by deleting the build folders (the android\build folder and the node_modules\react-native-system-notification\android\build folder) and recompiling.

peterpme commented 7 years ago

Unfortunately deleting both build folders didn't work.

tureki commented 7 years ago

It worked for me when I change play-services-gcm version (build.gradle)

dependencies {
   ...
    compile 'com.google.android.gms:play-services-gcm:+'
   ...
}