meta-inf

Using serviceloader on android

 ̄綄美尐妖づ 提交于 2019-11-27 04:33:16
I am very new to java and android development and to learn I am trying to start with an application to gather statistics and information like munin does. I am trying to be able to load "plugins" in my application. These plugins are already in the application but I don't want to have to invoke them all separately, but be able to iterate over them. I was trying to use serviceloader but could never get the META-INF/services into my apk. So I am wondering if it is possible to use serviceloader on android Thanks EDIT: I am asking about java.util.ServiceLoader, I think it should, but I can't figure

Android Studio: Duplicate files copied in APK META-INF/DEPENDENCIES when compile

有些话、适合烂在心里 提交于 2019-11-27 04:11:39
I exported my project from Eclipse and imported to Android Studio using the instructions in this link: http://developer.android.com/sdk/installing/migrate.html When I build, I have an error: Duplicate files copied in APK META-INF/DEPENDENCIES After searching, I found a solution: add packagingOptions { exclude 'META-INF/DEPENDENCIES' } into build.gradle . And it works! But I don't understand why I had this error and why I've had to apply that fix. Can anybody explain? Scott Barta In Android Gradle builds, you're not permitted to include the same file with the same path more than once in the

What's the purpose of META-INF?

南楼画角 提交于 2019-11-26 21:10:01
In Java, you often see a META-INF folder containing some meta files. What is the purpose of this folder and what can I put there? Generally speaking, you should not put anything into META-INF yourself. Instead, you should rely upon whatever you use to package up your JAR. This is one of the areas where I think Ant really excels: specifying JAR file manifest attributes. It's very easy to say something like: <jar ...> <manifest> <attribute name="Main-Class" value="MyApplication"/> </manifest> </jar> At least, I think that's easy... :-) The point is that META-INF should be considered an internal

Idea to avoid that spring.handlers/spring.schemas get overwritten when merging multiple spring dependencies in a single jar

ⅰ亾dé卋堺 提交于 2019-11-26 18:39:21
I got the error Unable to locate NamespaceHandler when using context:annotation-config running (java -jar) a jar assembled by the maven-assembly-plugin and containing my project and all its dependencies. As other people correctly spotted on the forum.springsource.org thread (message #7/8) the problem occurs because the files META-INF/spring.handlers and META-INF/spring.schemas that are present in different jars, get overwritten when the maven-assembly-plugin repackages the jars in a single file. Looking at the content of two spring-*.jar files you can see the files sits in the same position

What&#39;s the purpose of META-INF?

折月煮酒 提交于 2019-11-26 12:17:48
问题 In Java, you often see a META-INF folder containing some meta files. What is the purpose of this folder and what can I put there? 回答1: Generally speaking, you should not put anything into META-INF yourself. Instead, you should rely upon whatever you use to package up your JAR. This is one of the areas where I think Ant really excels: specifying JAR file manifest attributes. It's very easy to say something like: <jar ...> <manifest> <attribute name="Main-Class" value="MyApplication"/> <

Android Studio: Duplicate files copied in APK META-INF/DEPENDENCIES when compile

馋奶兔 提交于 2019-11-26 11:06:35
问题 I exported my project from Eclipse and imported to Android Studio using the instructions in this link: http://developer.android.com/sdk/installing/migrate.html When I build, I have an error: Duplicate files copied in APK META-INF/DEPENDENCIES After searching, I found a solution: add packagingOptions { exclude \'META-INF/DEPENDENCIES\' } into build.gradle . And it works! But I don\'t understand why I had this error and why I\'ve had to apply that fix. Can anybody explain? 回答1: In Android

How to build an Uber JAR (Fat JAR) using SBT within IntelliJ IDEA?

[亡魂溺海] 提交于 2019-11-26 10:12:47
I'm using SBT (within IntelliJ IDEA) to build a simple Scala project. I would like to know what is the simplest way to build an Uber JAR file (aka Fat JAR, Super JAR). I'm currently using SBT but when I'm submiting my JAR file to Apache Spark I get the following error: Exception in thread "main" java.lang.SecurityException: Invalid signature file digest for Manifest main attributes Or this error during compilation time: java.lang.RuntimeException: deduplicate: different file contents found in the following: PATH\DEPENDENCY.jar:META-INF/DEPENDENCIES PATH\DEPENDENCY.jar:META-INF/MANIFEST.MF It

Idea to avoid that spring.handlers/spring.schemas get overwritten when merging multiple spring dependencies in a single jar

只愿长相守 提交于 2019-11-26 06:29:39
问题 I got the error Unable to locate NamespaceHandler when using context:annotation-config running (java -jar) a jar assembled by the maven-assembly-plugin and containing my project and all its dependencies. As other people correctly spotted on the forum.springsource.org thread (message #7/8) the problem occurs because the files META-INF/spring.handlers and META-INF/spring.schemas that are present in different jars, get overwritten when the maven-assembly-plugin repackages the jars in a single

How to build an Uber JAR (Fat JAR) using SBT within IntelliJ IDEA?

天涯浪子 提交于 2019-11-26 01:49:04
问题 I\'m using SBT (within IntelliJ IDEA) to build a simple Scala project. I would like to know what is the simplest way to build an Uber JAR file (aka Fat JAR, Super JAR). I\'m currently using SBT but when I\'m submiting my JAR file to Apache Spark I get the following error: Exception in thread \"main\" java.lang.SecurityException: Invalid signature file digest for Manifest main attributes Or this error during compilation time: java.lang.RuntimeException: deduplicate: different file contents