This afternoon, there is a problem bores so much, which is android SDK setup.exe. When I click the setup.exe to update some package of android platform, there is a error message box pop up, on which with a string that “GetTempFileName failed. The directory name is invalid”. It’s so strange, because it’s right yesterday. I search the web with Google, some people account this problem, but there is nothing help to resolve the problem.
I uninstall android SDK, then reinstall from the beginning, and restart, it’s no effect. So I doubt it’s not a SDK installation, according to error information, there is a error when program create temporary file. I dump the environment various, and compare with a environment of college’s OS, There is a same error during the loading of BeyondComparer, aha, temporary file. I see my environment various %TEMP%, %TMP% is not normal like other college. so it must be something in my environment.
In order to verify my idea, I edit the %TEMP% and %TMP% with identifying a absolute path, then the compiling with visual studio “hello world” project passed, that will create temporary file when compile a project. Then I delete the %TEMP% and %TMP%, create %TEMP% and %TMP% again, then set them with “%USERPROFILE%\Local Settings\Temp”, log off OS, then log in. The setup.exe is OK.
It took me about 1 hour to resolve the problem, although I have not known yet that which software lead the problem.�0�2 Anyway, the SDK reworks.
I write these words to record the process of resolving this problem. It maybe helpful for android new comers.