simpligility / android-maven-plugin

Maven Plugin for Android Application development and more
http://simpligility.github.io/android-maven-plugin/
Apache License 2.0
1.05k stars 394 forks source link

createMarshaller error #812

Open oldoldman opened 1 year ago

oldoldman commented 1 year ago

Hi guys, When execute mvn android:d8 -e, got the following exception, any suggestion? Many thanks!!!

Caused by: java.lang.NullPointerException: Cannot invoke "javax.xml.bind.JAXBContext.createMarshaller()" because "context" is null
    at com.android.repository.impl.meta.SchemaModuleUtil.marshal (SchemaModuleUtil.java:264)
    at com.android.repository.impl.manager.LocalRepoLoaderImpl.writePackage (LocalRepoLoaderImpl.java:275)
    at com.android.repository.impl.manager.LocalRepoLoaderImpl.parsePackages (LocalRepoLoaderImpl.java:169)
    at com.android.repository.impl.manager.LocalRepoLoaderImpl.getPackages (LocalRepoLoaderImpl.java:124)
    at com.android.repository.impl.manager.RepoManagerImpl$LoadTask.run (RepoManagerImpl.java:517)
    at com.android.repository.api.RepoManager$DummyProgressRunner.runSyncWithProgress (RepoManager.java:397)
    at com.android.repository.impl.manager.RepoManagerImpl.load (RepoManagerImpl.java:364)
    at com.android.repository.api.RepoManager.loadSynchronously (RepoManager.java:290)
    at com.android.sdklib.repository.AndroidSdkHandler$RepoConfig.createRepoManager (AndroidSdkHandler.java:718)
    at com.android.sdklib.repository.AndroidSdkHandler.getSdkManager (AndroidSdkHandler.java:295)
    at com.android.sdklib.repository.AndroidSdkHandler.getAndroidTargetManager (AndroidSdkHandler.java:330)
    at com.simpligility.maven.plugins.android.AndroidSdk.findPlatformByApiLevel (AndroidSdk.java:129)
    at com.simpligility.maven.plugins.android.AndroidSdk.<init> (AndroidSdk.java:107)
    at com.simpligility.maven.plugins.android.AbstractAndroidMojo.getAndroidSdk (AbstractAndroidMojo.java:1172)
    at com.simpligility.maven.plugins.android.phase08preparepackage.D8Mojo.dexDefaultCommands (D8Mojo.java:361)
    at com.simpligility.maven.plugins.android.phase08preparepackage.D8Mojo.runD8 (D8Mojo.java:397)
    at com.simpligility.maven.plugins.android.phase08preparepackage.D8Mojo.execute (D8Mojo.java:219)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:126)
    at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 (MojoExecutor.java:342)
    at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:330)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:213)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:175)
    at org.apache.maven.lifecycle.internal.MojoExecutor.access$000 (MojoExecutor.java:76)
    at org.apache.maven.lifecycle.internal.MojoExecutor$1.run (MojoExecutor.java:163)
    at org.apache.maven.plugin.DefaultMojosExecutionStrategy.execute (DefaultMojosExecutionStrategy.java:39)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:160)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:105)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:73)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:53)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:118)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:261)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:173)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:101)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:910)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:283)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:206)
    at jdk.internal.reflect.DirectMethodHandleAccessor.invoke (DirectMethodHandleAccessor.java:104)
    at java.lang.reflect.Method.invoke (Method.java:578)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:283)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:226)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:407)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:348)