6
getenv("TMPDIR")
返回NULL
。什麼是臨時文件夾/在哪裏創建一個建議?如何從Android上的本機代碼獲取臨時文件夾的路徑?
getenv("TMPDIR")
返回NULL
。什麼是臨時文件夾/在哪裏創建一個建議?如何從Android上的本機代碼獲取臨時文件夾的路徑?
據我所知在Android中沒有全局/ tmp,你應該使用緩存 dir。
使用getCacheDir()
得到「tmp」dir。
http://developer.android.com/guide/topics/data/data-storage.html#filesInternal和 http://developer.android.com/reference/android/content/Context.html#getCacheDir%28%29
你可能想看看http://stackoverflow.com/questions/7595324/creating-temporary-files-in-android-with-ndk,這似乎解決了確切的問題你有。 – Samveen 2012-04-26 11:45:46