ant or Eclipse ADT (!) Add its build results as the target (bound) Java library. Two approaches to achieve that: 1) project.properties : LibraryProjectProperties build item created by "android update project -p ." add it ONLY AFTER you built it (ant debug)
Archive the OUTCOME of the build. a bit messier to build compared to C1), but you can distribute it in your project. (i.e. your library users don't have to build it.) (Gradle? ... expect those libs to create .aar)
API embedded EmbeddedJar ! embedded InputJar no need to bind API embedded EmbeddedReferenceJar ! embedded ReferenceJar new Android Library .aar embedded (always) LibraryProjectZip old Android Library .jar + res/ project.properties embedded (always) LibraryProjectZip LibraryProjectProperties
use it. C# API is generated for this, and the jar is embedded in the dll. EmbeddedReferenceJar NO C# API is generated, but it is embedded in the dll. Useful for jar dependencies.
for this, but the .jar is NOT embedded in the dll. Useful for <uses-library /> Manifest element based Java libs, or libraries that you cannot freely distribute by embedding to the .dll. Old Google Maps used it. Kindle libraries can be this too. ReferenceJar neither (useful under very limited situation e.g. java dependencies when generating "ACW")
Library...) You can also embed .jars and res/* in XA (non-binding) Library project. • AndroidJavaLibrary • AndroidExternalJavaLibrary (referenced when compiling sources, but NOT embedded in the final .apk) • AndroidResource, AndroidAsset
<attr path="/path/to/Derived" name="extends">PublicAncestor</attr> <add-node>(members in nonpublic class)</add-node> これは祖先でも可。大概めんどくさい。 package android.app.backup; class FileBackupHelperBase { ... } public class FileBackupHelper extends FileBackupHelperBase
Foo { protected void x () { ... } } class Foo { protected virtual void X () { ... } class Bar extends Foo { public void x () { ... } } class Bar : Foo { public override void X () { ... }
x () { ... } } class Foo { public virtual Object X () { ... } class Bar extends Foo { public Integer x () { ... } } class Bar : Foo { public override Integer X () { ... }
path="/path/to/base/method" name="generateDispatchingSetter">true</attr> public class Base { public void setXxx(int x) { ... } } public class Base { void SetXxx (int x) { ... } } public class Derived { public int getXxx() { ... } public void setXxx(int x) { ... } } public class Derived { public int Xxx { get { ... } set { ... } } }
generator). api.xml was part of AOSP (Android Open Source Project). But it WASN'T at some stage - Honeycomb. So, we ended up to create jar2xml. We enhanced these tools to support any Java libraries.
like "For whatever .NET has better API, we offer them rather than binding Java API" • e.g. no Java collections, no XML API, no apache http API etc. • But w/o those we could not bind arbitrary API. • So, ended up to bring (almost) everything. • At the same time the API "got frozen" to be "stable". • that causes several ugliness... (failed product strategy)