Can't assign value '${codename1.version}' to attribute version

21 views
Skip to first unread message

Gareth Murfin

unread,
Sep 19, 2019, 2:14:53 PM9/19/19
to CodenameOne Discussions
Everything was working fine, but suddenly now when I send Android build I get this error, any ideas?

C:\Users\Gaz\Documents\hobmonitor-app_v2_bitbucket\codenameoneProject\build.xml:346: Can't assign value '${codename1.version}' to attribute version, reason: class java.lang.NumberFormatException with message 'For input string: "${codename1.version}"'

Steve Hannah

unread,
Sep 19, 2019, 2:27:01 PM9/19/19
to codenameone...@googlegroups.com
Probably your app version number is not in a valid format.  Needs to be a decimal number.  
1.01 == OK
1.0.1 == NOT OK

See this SO answer for more:

On Thu, Sep 19, 2019 at 11:14 AM Gareth Murfin <gareth...@gmail.com> wrote:
Everything was working fine, but suddenly now when I send Android build I get this error, any ideas?

C:\Users\Gaz\Documents\hobmonitor-app_v2_bitbucket\codenameoneProject\build.xml:346: Can't assign value '${codename1.version}' to attribute version, reason: class java.lang.NumberFormatException with message 'For input string: "${codename1.version}"'

--
You received this message because you are subscribed to the Google Groups "CodenameOne Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to codenameone-discu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/codenameone-discussions/73e8f47e-cf75-431f-8fc3-c1358a3a47e8%40googlegroups.com.


--
Steve Hannah
Software Developer
Codename One

Gareth Murfin

unread,
Sep 19, 2019, 3:46:24 PM9/19/19
to CodenameOne Discussions
Thanks Steve, though I have not changed the version number at all, it is still 1.0 in the settings.

Now if I try to run in netbeans I am getting errors too.. (all of this came out of the blue, I think perhaps I sent a build to server while one was still cleaning?)

Compile is forcing compliance to the supported API's/features for maximum device compatibility. This allows smaller
        code size and wider device support
compile:
run:
java.lang.ClassNotFoundException: ${codename1.packageName}.${codename1.mainName}
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at java.lang.ClassLoader.findSystemClass(ClassLoader.java:1001)
at com.codename1.impl.javase.ClassPathLoader.findClass(ClassPathLoader.java:105)
at com.codename1.impl.javase.ClassPathLoader.loadClass(ClassPathLoader.java:55)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:264)
at com.codename1.impl.javase.Executor$3.run(Executor.java:217)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.awt.EventQueue$3.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:726)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)

On Thursday, September 19, 2019 at 7:27:01 PM UTC+1, Steve Hannah wrote:
Probably your app version number is not in a valid format.  Needs to be a decimal number.  
1.01 == OK
1.0.1 == NOT OK

See this SO answer for more:

On Thu, Sep 19, 2019 at 11:14 AM Gareth Murfin <gareth...@gmail.com> wrote:
Everything was working fine, but suddenly now when I send Android build I get this error, any ideas?

C:\Users\Gaz\Documents\hobmonitor-app_v2_bitbucket\codenameoneProject\build.xml:346: Can't assign value '${codename1.version}' to attribute version, reason: class java.lang.NumberFormatException with message 'For input string: "${codename1.version}"'

--
You received this message because you are subscribed to the Google Groups "CodenameOne Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to codenameone-discussions+unsub...@googlegroups.com.

Gareth Murfin

unread,
Sep 19, 2019, 3:58:56 PM9/19/19
to CodenameOne Discussions
Looks like something has got corrupted, title, packagename, main class, all of that is gone.. android signing etc , all my codenameone settings are gone. I should have back ups, which files should I copy back? bit of a disaster really!..

Steve Hannah

unread,
Sep 19, 2019, 4:01:49 PM9/19/19
to codenameone...@googlegroups.com
Looks like it's not picking up the codenameone_settings.properties file.

To unsubscribe from this group and stop receiving emails from it, send an email to codenameone-discu...@googlegroups.com.


--
Steve Hannah
Software Developer
Codename One

--
You received this message because you are subscribed to the Google Groups "CodenameOne Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to codenameone-discu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/codenameone-discussions/1053463a-ea4d-4bc3-ba4c-1b0e278076cc%40googlegroups.com.

Gareth Murfin

unread,
Sep 19, 2019, 4:03:57 PM9/19/19
to CodenameOne Discussions
OK it seems codenameone_settings.properties was overwritten somehow.. it was much smaller, I copied one from my backup and things work fine now!.. not quite sure why that would happen.


On Thursday, September 19, 2019 at 8:46:24 PM UTC+1, Gareth Murfin wrote:
Reply all
Reply to author
Forward
0 new messages