Using com.bea.xml.stream package on android

Check FAQ #18: This error indicates that the class XMLEventFactory does not provide functionality which POI is depending upon. There can be a number of different reasons for this: Outdated xml-apis.jar, stax-apis.jar or xercesImpl.jar: These libraries were required with Java 5 and lower, but are not actually required with spec-compliant Java 6 implementations, so try … Read more

how to build an APK and separate libraries that the app loads dynamically

This tutorial is a good start for external loading of DEX files. Only three small files of source (MainActivity.java, LibraryInterface.java, LibraryProvider.java) and it copies secondary_dex.jar from the assets folder, into internal application storage [outdex/dex] (the internet is also stated as possible in the tutorial). You have to build it with ant, because it uses custom … Read more

Android Studio 0.4.3 – Task ‘assemble’ not found in root project

Quick Answer Remove everything betweeen and including the component tag <component name=”FacetManager”> … <!– remove all in this node </component>` Long Answer See http://tools.android.com/knownissues If you get the following error message: Gradle: FAILURE: Could not determine which tasks to execute. * What went wrong: Task ‘assemble’ not found in root project ‘MyProject’. * Try: Run … Read more

How To Exclude Specific Resources from an AAR Depedency?

EDIT: Wrote advanced gradle task for you: final List<String> exclusions = []; Dependency.metaClass.exclude = { String[] currentExclusions -> currentExclusions.each { exclusions.add(“${getGroup()}/${getName()}/${getVersion()}/${it}”) } return thisObject } dependencies { compile fileTree(dir: ‘libs’, include: [‘*.jar’]) testCompile ‘junit:junit:4.12’ compile (‘com.android.support:appcompat-v7:20.+’) debugCompile (‘com.squareup.leakcanary:leakcanary-android:1.3.1’) .exclude(“res/values-v21/values-v21.xml”) releaseCompile (‘com.squareup.leakcanary:leakcanary-android-no-op:1.3.1’) } tasks.create(“excludeTask”) << { exclusions.each { File file = file(“${buildDir}/intermediates/exploded-aar/${it}”) println(“Excluding file ” + … Read more

Gradle: How to publish a Android library to local repository

I just found a solution. In the build.gradle of the library project, add this apply plugin: ‘maven’ group = ‘com.mygroup’ version = ‘1.0’ uploadArchives { repositories { mavenDeployer { repository(url: “file://[your local maven path here]”) // or repository(url: mavenLocal().getUrl()) } } } In the project folder, type following command gradle uploadArchives Read Publishing artifacts for … Read more