Android Question The given key was not present in the dictionary

rafaelcamara

Member
Licensed User
Longtime User
Hello,

I payed for a basic4 license and I was working on my project since last month when I was surprised with a power shutdown at my home and my computer also shutdown. After that I try to open again my project and I received a message of error (The given key was not present in the dictionary) and I can´t open my project. Please I need help, will I lost my project?

Thanks in advance.
 

jalle007

Active Member
Licensed User
Longtime User
Check the contents of the b4a file with a text editor.

I got very same error in strange situation.
My Laptop shut down unexpectedly and I could not open project after.
Strange thing is that for the same project I had no problems opening it on other PC
(its located in Dropbox so I have access)

then I found in .b4a file some extra lines:
B4X:
ManifestCode='This code will be applied to the manifest file during compilation.~\n~'You do not need to modify it in most cases.~\n~'See this link for for more information: http://www.b4x.com/forum/showthread.php?p=78136~\n~AddManifestText(~\n~<uses-sdk android:minSdkVersion="4"/>~\n~<supports-screens android:largeScreens="true" ~\n~    android:normalScreens="true" ~\n~    android:smallScreens="true" ~\n~    android:anyDensity="true"/>)~\n~SetApplicationAttribute(android:icon, "@drawable/icon")~\n~SetApplicationAttribute(android:label, "$LABEL$")~\n~'End of default text.~\n~

Luckily after removing them everything was fine.

Maybe you should check how this could happen cause lot of people could have problem after they see they can not access their projects..
 
Upvote 0

vecino

Well-Known Member
Licensed User
Longtime User
Hi, I get the same error occurred.
The computer has been completely blocked.
Luckily I had made a backup was only 1 hour.

I attached the corrupted files.
 

Attachments

  • broken-files.zip
    30.4 KB · Views: 285
Upvote 0

vecino

Well-Known Member
Licensed User
Longtime User
I forgot to say that I was doing some tests remembering an old programming language for many years.

B4X:
bla bla bla

XX:
  bla bla bla
  bla bla bla
goto XX

bla bla bla
 
Upvote 0

vecino

Well-Known Member
Licensed User
Longtime User
I think it was a failure to compile B4A.
And what happened when I typed a "strange" instructions
 
Upvote 0

vecino

Well-Known Member
Licensed User
Longtime User
Well, the truth is I do not know what happened.
It never happened before.
 
Last edited:
Upvote 0

joseluis

Active Member
Licensed User
Longtime User
This just happened to me in B4J.

Everytime I compiled the project in release mode It said the jar was corrupted, and after switching to debug mode the message was the given key was not present in the dictionary. If I tried to clean the project it said the jar was opened by another process.

What I found is that somehow the output jarfile was locked by the IDE process itself and the IDE wasn0t able to let it go. Killing the process and opening B4J again solved the problem.
 
Upvote 0

TheJinJ

Active Member
Licensed User
Longtime User
Thought I'd bump this up as a log of who this might have happened to. During compile B4A crashed out, going back in throws key in dictionary error and nothing is loaded. Looking at the file it appears corrupt! PC didn't crash, nothing in the logs......looks like I've lost this mornings work, damn!
 
Upvote 0
Top