0

We are using the MobileFirst Platform 7.1 to build our Android app. once we import the google play services lib into the project and we try to build it we get the error like this.

[2015-11-19 14:34:46 - Dex Loader] Unable to execute dex: method ID not in [0, 0xffff]: 65536 [2015-11-19 14:34:46 - TestWL7] Conversion to Dalvik format failed: Unable to execute dex: method ID not in [0, 0xffff]: 65536

Any idea about this?

Wei
  • 51
  • 7

1 Answers1

0

Is there a reason why you added Google Play services library? Adding Google Play services increases the number of methods beyond the permissible 65K.

Using Proguard to obfuscate/ multi-dexing/ loading required libraries only should help resolve this issue.

More details here :

a) Building Apps with Over 65K Methods

b) Sky’s the limit? No, 65K methods is

c) Google Play services and DEX method limits

If you are configuring play-services for Push notifications, then please note that MFP comes out of the box with Push support. It works even without Google-Play-services. Adding Google-Play-services library is an optional step.

If Push notifications support is the only reason for adding Play services, then you can chose to remove it from the references.

Vivin K
  • 2,681
  • 1
  • 11
  • 14
  • Thank you so much for your tips. Basically we follow the ibm knowledage center guide : [link](https://developer.ibm.com/mobilefirstplatform/documentation/getting-started-7-0/notifications/push-notifications-hybrid-applications/) And we also try the proguard way to limit that. seems still have the same problem. – Wei Nov 20 '15 at 03:02
  • Ok, That make sense, but the proguard is only available in release mode. So if in the dev level, it still have this kind of problem, and MFP still not support the Gradle yet. Did you have any other example or suggestion? Thx so much – Wei Nov 23 '15 at 14:42
  • There is a iFix for this and the solution is mix using the android studio and MFP studio. Please check the ibm website. – Wei Apr 02 '16 at 04:21