Hi Karl,
Am Samstag, den 27.02.2021, 11:20 -0500 schrieb Karl:
> > > I don't believe jna-platform is needed. But with or without it,
> > > when
> > > I specify <type>aar</aar> for jna, `mvn packages` gives a null
> > > pointer
> > > exception in CompilerMojo.preparePaths like in
> > >
https://issues.apache.org/jira/browse/MCOMPILER-359 . I haven't
> > > found
> > > a way around this yet but am slowly trying different avenues.
> > >
> > > Is there a working example anywhere?
> >
> > you could show your source and I would take a look. The referenced
> > issue is solved for 2 years, maybe your compiler version is just
> > ancient and it fails because of this?
>
> Here's where I'm at with the pom file:
>
https://github.com/xloem/brainflow/blob/android-3-test/java-package/brainflow/pom.xml
>
> Specifying <type>aar</type> is a temporary kludge because a jar for
> non-android is also built, but I could simply make two pom files.
as already written, please direct this at google. They decided that
Java was not good enough and had a serious NIH syndrom.
> Unfortunately although the referenced issue with maven-compiler-
> plugin
> has been fixed, there doesn't appear to have been a release yet that
> includes the fix.
>
At least after I got it to compile, I got this trace:
Caused by: java.lang.NullPointerException
at com.android.repository.api.SchemaModule$SchemaModuleVersion.<init> (SchemaModule.java:157)
at com.android.repository.api.SchemaModule.<init> (SchemaModule.java:75)
at com.android.sdklib.repository.AndroidSdkHandler.<clinit> (AndroidSdkHandler.java:81)
at com.simpligility.maven.plugins.android.AndroidSdk.<init> (AndroidSdk.java:91)
at com.simpligility.maven.plugins.android.AbstractAndroidMojo.getAndroidSdk (AbstractAndroidMojo.java:1172)
at com.simpligility.maven.plugins.android.phase01generatesources.GenerateSourcesMojo.generateR (GenerateSourcesMojo.java:789)
at com.simpligility.maven.plugins.android.phase01generatesources.GenerateSourcesMojo.execute (GenerateSourcesMojo.java:240)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:208)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:154)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:146)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
To my knowledge, google decided to abandon the original eclise based
IDE, the maven tooling and switched to Android Studio + gradle.
Given, that there is only one elephant in the room (google) I strongly
suggest to follow their best practices or be prepared to debug all
steps yourself.
Greetings
Matthias