Failure [-12]

by Brian Williamson » Wed, 25 Nov 2009 00:06:07 GMT


Sponsored Links
 Hi All, I tried to load an app onto the Android dev 1 phone and got
the following message: Failure [-12]

Does anyone know what this message means?

--



Failure [-12]

by Xavier Ducrohet » Wed, 25 Nov 2009 09:06:41 GMT


 The list of install failure code is in the PackageManager class.

-12 is defined here:
 http://android.git.kernel.org/?p=platform/frameworks/base.git ;a=blob;f=core/java/android/content/pm/PackageManager.java;h=cd48dcbcba3b5886f01a986ef71cb08412505e46;hb=refs/heads/eclair#l358

Basically the minSdkVersion in your app is higher than the device you are
trying to install on.

I'm guessing this is a relative old device image? More recent device builds
properly display most errors as INSTALL_FAILED_OLDER_SDK.

Xav

On Mon, Nov 23, 2009 at 8:15 PM, Brian Williamson <



>


Sponsored Links


Other Threads

1. parseSdkContent failed java.lang.NullPointerException

I have been using Eclipse 3.5.2 for some time now working on an
android app, but for some reason my computer froze when launching the
emulator.  After a restart, Eclipse will no longer launch giving the
error:

parseSdkContent failed
java.lang.NullPointerException


I've deleted and re-extracted both eclipse and the android SDK, and
tried a different workspace.  All yields the same results.

Here is the log content:
!SESSION 2010-09-15 16:52:15.143
-----------------------------------------------
eclipse.buildId=unknown
java.version=1.6.0_18
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US
Framework arguments:  -product org.eclipse.epp.package.java.product
Command-line arguments:  -os win32 -ws win32 -arch x86 -product
org.eclipse.epp.package.java.product

!ENTRY com.android.ide.eclipse.adt 4 0 2010-09-15 16:52:24.576
!MESSAGE Unknown exception in parseSdkContent.
!STACK 0
java.lang.NullPointerException
        at
com.android.sdklib.internal.avd.AvdManager.parseAvdInfo(AvdManager.java:
1146)
        at
com.android.sdklib.internal.avd.AvdManager.buildAvdList(AvdManager.java:
1127)
        at com.android.sdklib.internal.avd.AvdManager.<init>(AvdManager.java:
375)
        at com.android.ide.eclipse.adt.internal.sdk.Sdk.loadSdk(Unknown
Source)
        at com.android.ide.eclipse.adt.AdtPlugin$13.run(Unknown Source)
        at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)

!ENTRY com.android.ide.eclipse.adt 4 0 2010-09-15 16:52:24.581
!MESSAGE parseSdkContent failed
!STACK 0
java.lang.NullPointerException
        at
com.android.sdklib.internal.avd.AvdManager.parseAvdInfo(AvdManager.java:
1146)
        at
com.android.sdklib.internal.avd.AvdManager.buildAvdList(AvdManager.java:
1127)
        at com.android.sdklib.internal.avd.AvdManager.<init>(AvdManager.java:
375)
        at com.android.ide.eclipse.adt.internal.sdk.Sdk.loadSdk(Unknown
Source)
        at com.android.ide.eclipse.adt.AdtPlugin$13.run(Unknown Source)
        at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)


Hmm, just got around the problem by deleting the .android directory
out of my user's profile.

-- 

2. Creating files/directories on SD CARD

I cannot create directories and files on sd card.

-------------------------------
This is the simple example:
-------------------------------
File sdcard = android.os.Environment.getExternalStorageDirectory();
File dir = new File(sdcard, "data/com.samples.fileio/");

Log.d("FileIOTest", "Directory: "+dir);

if(!dir.exists()) {
     Log.w("FileIOTest", "Directory does not exists");
     if(!dir.mkdirs())
          Log.e("FileIOTest", "Cannot create directories");
     else
          Log.d("FileIOTest", "Directory created");
}
-------------------------------
Log output:
-------------------------------
09-15 22:27:23.634: DEBUG/FileIOTest(5049): Directory: /sdcard/data/
com.samples.fileio
09-15 22:27:23.634: WARN/FileIOTest(5049): Directory does not exists
09-15 22:27:23.634: ERROR/FileIOTest(5049): Cannot create directories
-------------------------------

Directory /sdcard/data exists and has 'd---rwxr-x' permissions (both).
Why mkdirs() fails?

-- 

3. After an exception appears this exception keeps coming back until the program has been reset.

4. xml transformation in android

5. Child activity lifetime in background

6. Urgent Opening for Android Developer in Austin, TX for Long Term

7. Intent filter to launch an application