[2011-08-25 12:45:15 - JlptQuiz3Free] Installation error: INSTALL_FAILED_INSUFFICIENT_STORAGE
[2011-08-25 12:45:15 - JlptQuiz3Free] Please check logcat output for more details.
[2011-08-25 12:45:15 - JlptQuiz3Free] Launch canceled!
Let's try this:
http://stackoverflow.com/questions/2239330/how-to-increase-storage-for-android-emulator-install-failed-insufficient-storag
I
was searching for the answer to this question, and was unsatisfied with the above answers. But then I found the answer, so here it is for future reference:
http://groups.google.com/group/android-developers/browse_thread/thread/41852900bd603070/583943d91dc9f754?lnk=gst&q=insufficient+memory#583943d91dc9f754
To summarize (and clarify), in Eclipse, go to "Debug Configurations". You can find that in the drop-down under the "debug" icon. Select "target", and select a preferred emulator target to launch. Then under "additional emulator command line options," add this:
-partition-size 1024
Then CLOSE the emulator (and remove any devices), and click the debug icon, which will launch the preferred emulator you selected. This is important: Eclipse needs to launch the debugger, not AVD.
That fixed the problem for me.
link|edit|flag
answered Oct 15 '10 at 20:33
SomeCallMeTim
70147
3
Note that the "partition-size" is in megabytes, and that generally to install an APK you need at least twice as much disk space as the size of the APK. – Christopher Dec 26 '10 at 17:11
1
@Christopher: Good points, both. – SomeCallMeTim Jan 30 at 23:41
Another note to make: You must right click on the project you want to run in eclipse -> Run->Run Configuration->Select Project->Target ->scroll down->add -partition-size 1024 to additional Em options-> then run the project from eclipse – Scott Apr 27 at 16:48
1
Google should add this an explicit property parameters for Android 3.2 or 4.0. Fix the damn Eclipse AVD plugin – peter_pilgrim May 26 at 11:19
Unfortunately, this doesn't seem to do the trick. It's not getting the error message, but it just sits there with a black screen once the app starts.
Ok. Interestingly, it's having trouble finding the file to write to.
W/ActivityManager( 62): Launch timeout has expired, giving up wake lock!
D/szipinf ( 357): Initializing inflate state
W/System.err( 357): java.io.FileNotFoundException: /null/.data/jlpt (No such file or directory)
W/System.err( 357): at org.apache.harmony.luni.platform.OSFileSystem.open(Native Method)
W/System.err( 357): at dalvik.system.BlockGuard$WrappedFileSystem.open(BlockGuard.java:232)
W/System.err( 357): at java.io.FileOutputStream.
W/System.err( 357): at java.io.FileOutputStream.
W/System.err( 357): at java.io.FileOutputStream.
W/System.err( 357): at com.jlptquiz.app.DataBaseHelper.copyDataBase(DataBaseHelper.java:223)
W/System.err( 357): at com.jlptquiz.app.DataBaseHelper.createDataBase(DataBaseHelper.java:144)
W/System.err( 357): at com.jlptquiz.app.DataBaseHelper.createDB(DataBaseHelper.java:95)
W/System.err( 357): at com.jlptquiz.app.InitUtils.initializeWordGroupings(InitUtils.java:405)
W/System.err( 357): at com.jlptquiz.app.InitUtils.initialize(InitUtils.java:83)
Why is it null? That null should be filled in by get external cache command. Here's the line:
myOutput = new FileOutputStream(outFileName);
Here's outfileName:
// Create path to the just created empty db
String outFileName = DataBaseHelper.getRootPathName() + DB_NAME;
Here's the relevant info:
static String getRootPathName() {
// String rootPathName = null;
if (null == DataBaseHelper.rootPathName) {
// rootPathName = c.getApplicationContext().getExternalCacheDir() +
// "/data/.com.kanjisoft.jlpt/";
// rootPathName = Environment.getExternalStorageDirectory() +
// databasePath;
rootPathName = msContext.getExternalCacheDir() + databasePath;
}
return rootPathName;
}
Here's databasePath:
public static String databasePath = "/.data/";
(The "." in front of "data" keeps the media files from showing up as music files in the media player).
msContext is declared here:
private static Context msContext;
And filled in here:
public static DataBaseHelper createDB(Context context) {
DataBaseHelper.msContext = context;
if (myDbHelper == null) {
myDbHelper = new DataBaseHelper(context);
Man - all sort of things are going wrong here. I'm debugging stuff I wouldn't need to debug if I had my phone.
It *should* run on the emulator, but it might be one of those things that just don't work right on it.
I could try using getExternalStorage...
rootPathName = Environment.getExternalStorageDirectory() +
databasePath;
It's slightly different, but it goes to an NPE on this line:
I/Database( 436): sqlite returned: error code = 14, msg = cannot open file at source line 25467
E/Database( 436): sqlite3_open_v2("/mnt/sdcard/.data/jlpt", &handle, 2, NULL) failed
D/szipinf ( 436): Initializing inflate state
W/System.err( 436): java.io.IOException: No such file or directory
W/System.err( 436): at java.io.File.createNewFileImpl(Native Method)
I think it's just an issue of the emulator not being able to deal properly with SD Cards. I'm going to have to wait till my battery rechargers show up. Good. I'll have some time to work on my IOS version!
No comments:
Post a Comment