Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google Play "Native platforms" showing commons-io-2.4.jar

I have just encountered a very weird problem where a build of my app, for distribution through Google Play's beta channel, was refusing to deploy to any devices. Some investigation and some help from Google revealed that the problem was this, when drilling down to the APK detail in the Google Play console:

screenshot of Google Play console

What could have caused that? This is how the dependency was specified in my build.gradle:

compile 'org.apache.directory.studio:org.apache.commons.io:2.4'

and the APK was built like this:

gradle clean
gradle assembleMarketRelease

where market is one of the product flavors. The app installs and runs just fine when side-loaded.

I worked around the issue by removing that dependency, and reimplementing the missing functionality myself, and now the app is being deployed as expected. But I would like to understand the underlying problem. Did I specify the dependency incorrectly? Did I build incorrectly?

Related: Google play developer console shows DS_Store in Native Platforms section of uploaded Apk

like image 204
Graham Borland Avatar asked Feb 13 '14 09:02

Graham Borland


2 Answers

I fixed it by replacing

compile 'org.apache.directory.studio:org.apache.commons.io:2.4'

with

compile 'commons-io:commons-io:2.4'

in build.gradle.


I found it out like this:

  1. Search "maven apache commons io".
  2. Find the Maven repository page for Apache Commons IO 2.4.
  3. Click on the Gradle tab, which says: 'commons-io:commons-io:2.4'.
like image 145
Pang Avatar answered Oct 20 '22 19:10

Pang


EDIT: The answer by Pang is actually correct https://stackoverflow.com/a/28759797/1436766. I will keep this answer as it did resolve a similar problem.

I was facing the same issue today. I uploaded my apk, and the console told me the apk had a Native platform 'joda-convert-1.5.jar'. Surprisingly I was not using that jar anywhere directly. After researching I found out that the jar was being used by another library I was using. And it was in the 'lib' folder of that jar. Since I had the source code of that library, I recompiled that library by placing that 'joda-convert-1.5.jar' in the 'libs' folder. And cleaned and recompiled my app. Everything was fixed.

It seems that anything in a 'lib' folder is seen as a Native Library, and hence the developer console shows it like that. Make sure the libraries are in the 'libs' folder.

Hope this helps.

like image 30
ProgrAmmar Avatar answered Oct 20 '22 20:10

ProgrAmmar