lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Uwe Schindler (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (LUCENE-4204) Error with Codec on android
Date Tue, 10 Jul 2012 10:12:34 GMT

    [ https://issues.apache.org/jira/browse/LUCENE-4204?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13410201#comment-13410201
] 

Uwe Schindler edited comment on LUCENE-4204 at 7/10/12 10:11 AM:
-----------------------------------------------------------------

This is not a problem of Lucene itsself, as the Android ApkBuilder component is buggy and
excludes META-INF completely from the resulting APK (although Android supports SPI and other
parts of Java 6).

There are several workaround possible, but none of them is fixed in the official Anbdroid
SDK, you have to use a customized Maven plugin [https://github.com/pa314159/maven-android-plugin]
or patch ApkBuilder.java to not exclude META-INF [http://androidxref.com/source/xref/sdk/sdkmanager/libs/sdklib/src/com/android/sdklib/build/ApkBuilder.java]:

{noformat}
 public static boolean checkFolderForPackaging(String folderName) {
   return folderName.equalsIgnoreCase("CVS") == false &&
          folderName.equalsIgnoreCase(".svn") == false &&
          folderName.equalsIgnoreCase("SCCS") == false &&
-         folderName.equalsIgnoreCase("META-INF") == false &&
          folderName.startsWith("_") == false;
 }
{noformat}
                
      was (Author: thetaphi):
    This is not a problem, as the Android ApkBuilder component is buggy and excludes META-INF
completely from the resulting APK (although Android supports SPI and other parts of Java 6).

There are several workaround possible, but none of them is fixed in the official Anbdroid
SDK, you have to use a customized Maven plugin [https://github.com/pa314159/maven-android-plugin]
or patch ApkBuilder.java to not exclude META-INF [http://androidxref.com/source/xref/sdk/sdkmanager/libs/sdklib/src/com/android/sdklib/build/ApkBuilder.java]:

{noformat}
 public static boolean checkFolderForPackaging(String folderName) {
   return folderName.equalsIgnoreCase("CVS") == false &&
          folderName.equalsIgnoreCase(".svn") == false &&
          folderName.equalsIgnoreCase("SCCS") == false &&
-         folderName.equalsIgnoreCase("META-INF") == false &&
          folderName.startsWith("_") == false;
 }
{noformat}
                  
> Error with Codec on android
> ---------------------------
>
>                 Key: LUCENE-4204
>                 URL: https://issues.apache.org/jira/browse/LUCENE-4204
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: core/codecs
>    Affects Versions: 4.0
>         Environment: Android 
>            Reporter: ROULLAND Bruno
>            Assignee: Uwe Schindler
>            Priority: Minor
>              Labels: error, newbie
>
> Hello, with the latest version of Lucene 4.0, I have an error :
> "Codec with name ‘Lucene40′ does not exist.
> You need to add the corresponding JAR file supporting this SPI to
> your classpath. The current classpath supports the following names:
> []"
> Classpath is OK, but the method for initialise Codec don't work. 
> This error does not append with Lucene 3.6.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message