# Cannot build for Android even with debug key

**URL:** <https://forums.solar2d.com/t/cannot-build-for-android-even-with-debug-key/353308>\
**Category:** Android\
**Created:** [March 24, 2021, 9:33pm UTC](https://forums.solar2d.com/t/cannot-build-for-android-even-with-debug-key/353308 "2021-03-24T21:33:01Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![graham.h.bignell](https://forums.solar2d.com/letter_avatar_proxy/v4/letter/g/65b543/32.png) [@graham.h.bignell](https://forums.solar2d.com/u/graham.h.bignell)\
**Post date:** [March 24, 2021, 9:33pm UTC](https://forums.solar2d.com/t/cannot-build-for-android-even-with-debug-key/353308/1 "2021-03-24T21:33:02Z")

</div>

This is the error I am getting. It is on a Mac using Solar2d 3640 and using the ore provided inside the simulator. Have tried using different versions of Java but all fail with different types of errors. I assume the are packaged with the simulator should work. Same problem on both Big Sur or Catalina. Please help. It appears to be a problem with the dynamic loading of a class that does not implement one of the methods.

```
Testing credentials for '/Applications/Corona-3640/Resource Library/Android/debug.keystore': 
Mar 25 08:20:05.920 Picked up JAVA_TOOL_OPTIONS: -Duser.language=en
Mar 25 08:20:06.317 Exception in thread "main" 
Mar 25 08:20:06.326 java.lang.NoSuchMethodError: com.sun.jarsigner.ContentSignerParameters.getTSAPolicyID()Ljava/lang/String;
Mar 25 08:20:06.326 at sun.security.tools.jarsigner.TimestampedSigner.generateSignedData(TimestampedSigner.java:141)
                    	at sun.security.tools.jarsigner.SignatureFile$Block.(Main.java:2807)
                    	at sun.security.tools.jarsigner.SignatureFile.generateBlock(Main.java:2704)
                    	at sun.security.tools.jarsigner.Main.signJar(Main.java:1669)
                    	at sun.security.tools.jarsigner.Main.run(Main.java:281)
                    	at sun.security.tools.jarsigner.Main.main(Main.java:128)
```

---

<div class="post-metadata">

**Author:** ![bgmadclown](https://forums.solar2d.com/user_avatar/forums.solar2d.com/bgmadclown/32/490_2.png) [@bgmadclown](https://forums.solar2d.com/u/bgmadclown)\
**Post date:** [March 26, 2021, 1:50am UTC](https://forums.solar2d.com/t/cannot-build-for-android-even-with-debug-key/353308/2 "2021-03-26T01:50:21Z")

</div>

Have you been able to build an empty project? Otherwise, it could help if you could provide more details.

---

<div class="post-metadata">

**Author:** ![graham.h.bignell](https://forums.solar2d.com/letter_avatar_proxy/v4/letter/g/65b543/32.png) [@graham.h.bignell](https://forums.solar2d.com/u/graham.h.bignell)\
**Post date:** [March 26, 2021, 6:49am UTC](https://forums.solar2d.com/t/cannot-build-for-android-even-with-debug-key/353308/3 "2021-03-26T06:49:25Z")

</div>

Thanks for the response. I have tried building the HelloWorld project supplied with the Solar2D distribution and it fails in the same way. It has to be something to do with the java environment. I have tried removing all versions of java so that it will use the one packed with the Solar2D distribution and it does. I also got a friend to try and build the same project on their Mac and it built OK. I am about to give up dn have ordered a cheap Windows laptop to just run Solar2D on.

The other strange thing about the Mac is it is not possible to remove the version of java in /usr/bin.

---

<div class="post-metadata">

**Author:** ![elifares](https://forums.solar2d.com/user_avatar/forums.solar2d.com/elifares/32/4539_2.png) [@elifares](https://forums.solar2d.com/u/elifares)\
**Post date:** [January 6, 2026, 7:15pm UTC](https://forums.solar2d.com/t/cannot-build-for-android-even-with-debug-key/353308/4 "2026-01-06T19:15:39Z")

</div>

I have the same problem. I get Error code: 256 when I try to build for Android and fail. Were you able to resolve it?
