0

On android, build APK: duplicate plugin.xml in following jars.

    compile group: 'org.datanucleus', name: 'datanucleus-core', version: '5.1.1'
    compile group: 'org.datanucleus', name: 'datanucleus-api-jpa', version: '5.1.1'
    compile group: 'org.datanucleus', name: 'datanucleus-rdbms', version: '5.1.1'

How to solve this? merge them?

UPDATE

Merged the 3 jars and plugin.xml as described into one jar, and created the MANIFEST.MF inside the merged jar as described.

Bundle-SymbolicName: org.datanucleus;singleton:=true
Premain-Class: org.datanucleus.enhancer.DataNucleusClassFileTransformer

When building android APK, the jar MANIFEST.MF is discarded by android build. At runtime:

java.lang.NoClassDefFoundError: Failed resolution of: Lorg/datanucleus/enhancement/Detachable;

Is this error related to the MANIFEST.MF? Is there any workaround? For example, rename MANIFEST.MF so that it can be included in APK.

eastwater
  • 4,624
  • 9
  • 49
  • 118
  • Should you want to merge `plugin.xml` files, this link provides a way used by one person. https://stackoverflow.com/a/37511856/380338 but then I already provided you with a link to a group who have used DataNucleus on Android and no doubt their process is more refined for Android – Neil Stockton Aug 18 '17 at 06:00
  • updated question. got runtime error. thanks. – eastwater Aug 19 '17 at 04:11

0 Answers0