Cannot create the APKBuilder object

221 views
Skip to first unread message

Daniel Rindt

unread,
Mar 12, 2012, 4:45:57 AM3/12/12
to maven-androi...@googlegroups.com
Hello,

i try to build a project what is using the pom from the helloflashlight sample with jenkins. A couple of problems in could fixed myself but now i am stall. The output is the following:

[ERROR] Cannot create the APKBuilder object
java.lang.NoClassDefFoundError: com/android/prefs/AndroidLocation at com.android.sdklib.internal.build.DebugKeyProvider.getDefaultKeyStoreOsPath(DebugKeyProvider.java:119) at com.android.sdklib.build.ApkBuilder.getDebugKeystore(ApkBuilder.java:897) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:616) at com.jayway.maven.plugins.android.phase09package.ApkBuilder.<init>(ApkBuilder.java:212) at com.jayway.maven.plugins.android.phase09package.ApkMojo.doAPKWithAPKBuilder(ApkMojo.java:337) at com.jayway.maven.plugins.android.phase09package.ApkMojo.createApkFile(ApkMojo.java:252) at com.jayway.maven.plugins.android.phase09package.ApkMojo.execute(ApkMojo.java:210) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59) at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156) at org.jvnet.hudson.maven3.launcher.Maven3Launcher.main(Maven3Launcher.java:79) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:616) at org.codehaus.plexus.classworlds.launcher.Launcher.launchStandard(Launcher.java:329) at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:239) at org.jvnet.hudson.maven3.agent.Maven3Main.launch(Maven3Main.java:158) at hudson.maven.Maven3Builder.call(Maven3Builder.java:104) at hudson.maven.Maven3Builder.call(Maven3Builder.java:70) at hudson.remoting.UserRequest.perform(UserRequest.java:118) at hudson.remoting.UserRequest.perform(UserRequest.java:48) at hudson.remoting.Request$2.run(Request.java:287) at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) at java.util.concurrent.FutureTask.run(FutureTask.java:166) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) at java.lang.Thread.run(Thread.java:636) Caused by: java.lang.ClassNotFoundException: com.android.prefs.AndroidLocation at java.net.URLClassLoader$1.run(URLClassLoader.java:217) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:205) at java.lang.ClassLoader.loadClass(ClassLoader.java:319) at java.lang.ClassLoader.loadClass(ClassLoader.java:264) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:332) ... 39 more

Hopefully someone can help me to fix it.

Thanks a lot
Daniel

Daniel Rindt

unread,
Mar 12, 2012, 5:41:54 AM3/12/12
to maven-androi...@googlegroups.com
I find now out that the apkbuilder can't find the debugKeystore. How can i provide them the debugKeystore?

Manfred Moser

unread,
Mar 12, 2012, 12:17:52 PM3/12/12
to maven-androi...@googlegroups.com
This is a dependency of the lint integration in my path ... not sure how this would come up in your case. Could you put more details together and file a bug?

manfred
--
You received this message because you are subscribed to the Google Groups "Maven Android Developers" group.
To view this discussion on the web visit https://groups.google.com/d/msg/maven-android-developers/-/yuRNo8f8mScJ.
To post to this group, send email to maven-androi...@googlegroups.com.
To unsubscribe from this group, send email to maven-android-deve...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/maven-android-developers?hl=en.

Manfred Moser

unread,
Mar 12, 2012, 12:18:46 PM3/12/12
to maven-androi...@googlegroups.com
Just do one build on the command line with ant or in Eclipse..

On 12-03-12 02:41 AM, Daniel Rindt wrote:
> I find now out that the apkbuilder can't find the debugKeystore. How
> can i provide them the debugKeystore?

> --
> You received this message because you are subscribed to the Google
> Groups "Maven Android Developers" group.
> To view this discussion on the web visit

> https://groups.google.com/d/msg/maven-android-developers/-/bk-GX372ZEIJ.

Daniel Rindt

unread,
Mar 12, 2012, 12:21:56 PM3/12/12
to maven-androi...@googlegroups.com
Hello Manfred,

Am 12. März 2012 17:17 schrieb Manfred Moser <man...@mosabuam.com>:
> This is a dependency of the lint integration in my path ... not sure how
> this would come up in your case. Could you put more details together and
> file a bug?

I found the issue. After installing the sdk, the file permissions are
set to "o-r". I found also that couple of folder permissions had same
restrictive permissions. I could just suggest to check the
permissions, i am pretty sure that lots of issues result from that.

Thanks for your help!
Daniel

Manfred Moser

unread,
Mar 12, 2012, 1:44:22 PM3/12/12
to maven-androi...@googlegroups.com
On 12-03-12 09:21 AM, Daniel Rindt wrote:
> Hello Manfred,

Thats an issue with the sdk though right?

Daniel Rindt

unread,
Mar 12, 2012, 5:55:49 PM3/12/12
to maven-androi...@googlegroups.com
Am 12. März 2012 18:44 schrieb Manfred Moser <man...@mosabuam.com>:
> Thats an issue with the sdk though right?

Would say yes. I have used strace and other tools to get in deep
information whats going wrong. Nearly every problem i found under the
issues in the project. I could fix everything of that problems by
adjusting the permissions.

Btw i am using jenkins for building...

If you have questions let me please know about.
Daniel

Reply all
Reply to author
Forward
0 new messages