0

I got the following error when i tried to Install an APK on my device. It is working in device Galaxy POP, Galaxy ACE s 5830. The only problem in galaxy s3

enter image description here

My app's manifest file is below.

     <manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.example.fixcity_app"
    android:versionCode="1"
    android:versionName="1.0" >

    <uses-sdk
        android:minSdkVersion="8"
        android:targetSdkVersion="15" />

    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.CAMERA" />
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />

    <supports-screens
        android:anyDensity="true"
        android:largeScreens="true"
        android:normalScreens="true"
        android:resizeable="true"
        android:smallScreens="true"
        android:xlargeScreens="true" />

    <application
        android:icon="@drawable/icon_app_"
        android:label="@string/app_name"
        android:theme="@style/AppTheme" >
        <activity
            android:name=".MainActivity"
            android:label="@string/title_activity_main" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <activity
            android:name=".SignupActivity"
            android:configChanges="keyboardHidden|orientation|screenSize"
            android:theme="@android:style/Theme.NoTitleBar.Fullscreen" >
        </activity>
        <activity
            android:name=".LoginActivity"
            android:configChanges="keyboardHidden|orientation|screenSize"
            android:theme="@android:style/Theme.NoTitleBar.Fullscreen" >
        </activity>
        <activity
            android:name=".FIX_Activity"
            android:configChanges="keyboardHidden|orientation|screenSize"
            android:theme="@android:style/Theme.NoTitleBar.Fullscreen" >
        </activity>
        <activity
            android:name=".TakePictureActivity"
            android:configChanges="keyboardHidden|orientation|screenSize"
            android:theme="@android:style/Theme.NoTitleBar.Fullscreen" >
        </activity>
        <activity
            android:name=".HomeActivity"
            android:configChanges="keyboardHidden|orientation|screenSize"
            android:theme="@android:style/Theme.NoTitleBar.Fullscreen" >
        </activity>
        <activity
            android:name=".DisplayPhotoPblm"
            android:configChanges="keyboardHidden|orientation|screenSize"
            android:theme="@android:style/Theme.NoTitleBar.Fullscreen" >
        </activity>
        <activity
            android:name=".PostCommentActivity"
            android:configChanges="keyboardHidden|orientation|screenSize"
            android:theme="@android:style/Theme.NoTitleBar.Fullscreen" >
        </activity>
        <activity
            android:name=".SelCategoryActivity"
            android:configChanges="keyboardHidden|orientation|screenSize"
            android:theme="@android:style/Theme.NoTitleBar.Fullscreen" >
        </activity>

        <uses-library android:name="com.google.android.maps" />

        <activity
            android:name=".ProblemScreenActivity"
            android:configChanges="keyboardHidden|orientation|screenSize"
            android:theme="@android:style/Theme.NoTitleBar.Fullscreen" >
        </activity>
        <activity
            android:name=".ViewMapActivity"
            android:configChanges="keyboardHidden|orientation|screenSize"
            android:theme="@android:style/Theme.NoTitleBar.Fullscreen" >
        </activity>
        <activity
            android:name=".ChangeCategoryActivity"
            android:configChanges="keyboardHidden|orientation|screenSize"
            android:theme="@android:style/Theme.NoTitleBar.Fullscreen" >
        </activity>
        <activity
            android:name=".FixedDisplayPhotoPblm"
            android:configChanges="keyboardHidden|orientation|screenSize"
            android:theme="@android:style/Theme.NoTitleBar.Fullscreen" >
        </activity>
        <activity
            android:name=".FixedProblemScreenActivity"
            android:configChanges="keyboardHidden|orientation|screenSize"
            android:theme="@android:style/Theme.NoTitleBar.Fullscreen" >
        </activity>
        <activity
            android:name=".NoProofActivity"
            android:configChanges="keyboardHidden|orientation|screenSize"
            android:theme="@android:style/Theme.NoTitleBar.Fullscreen" >
        </activity>
        <activity
            android:name=".ListProblemActivity"
            android:configChanges="keyboardHidden|orientation|screenSize"
            android:theme="@android:style/Theme.NoTitleBar.Fullscreen" >
        </activity>
        <activity
            android:name="com.example.twitter_cls.PrepareRequestTokenActivity"
            android:configChanges="keyboardHidden|orientation|screenSize"
            android:theme="@android:style/Theme.NoTitleBar.Fullscreen" >
        </activity>
        <activity
            android:name=".ReportsActivity"
            android:configChanges="keyboardHidden|orientation|screenSize"
            android:theme="@android:style/Theme.NoTitleBar.Fullscreen" >
        </activity>
        <activity
            android:name=".SettingActivity"
            android:configChanges="keyboardHidden|orientation|screenSize"
            android:theme="@android:style/Theme.NoTitleBar.Fullscreen" >
        </activity>

        <uses-library
            android:name="com.google.android.maps"
            android:required="true" />
    </application>

</manifest>

Please Help me, thanks in Advance.

EDITED.

this is happened only when i install apk from gmail. if i run app directly from eclipse then its worked.

why this happens i want to k'no. please help me....

EDIT 11/10/2012 :

    10-11 06:06:33.626: I/ActivityManager(98): START {dat=file:///mnt/sdcard/Download/FixMyCity.apk cmp=com.android.packageinstaller/.InstallAppProgress (has extras)} from pid 1192
10-11 06:06:33.626: W/WindowManager(98): Failure taking screenshot for (240x394) to layer 21015
10-11 06:06:33.776: W/InstallAppProgress(1192): Replacing package:com.example.fixmycity
10-11 06:06:33.856: D/dalvikvm(1192): GC_FOR_ALLOC freed 11791K, 27% free 33725K/45575K, paused 74ms
10-11 06:06:33.876: I/dalvikvm-heap(1192): Grow heap (frag case) to 44.460MB for 12027004-byte allocation
10-11 06:06:34.086: D/dalvikvm(1192): GC_CONCURRENT freed 7K, 1% free 45462K/45575K, paused 6ms+7ms
10-11 06:06:34.156: I/Process(98): Sending signal. PID: 1192 SIG: 3
10-11 06:06:34.156: I/dalvikvm(1192): threadid=3: reacting to signal 3
10-11 06:06:34.166: I/dalvikvm(1192): Wrote stack traces to '/data/anr/traces.txt'
10-11 06:06:34.656: I/Process(98): Sending signal. PID: 1192 SIG: 3
10-11 06:06:34.656: I/dalvikvm(1192): threadid=3: reacting to signal 3
10-11 06:06:34.676: I/dalvikvm(1192): Wrote stack traces to '/data/anr/traces.txt'
10-11 06:06:34.856: D/dalvikvm(1192): GC_FOR_ALLOC freed <1K, 1% free 45462K/45575K, paused 66ms
10-11 06:06:34.856: I/dalvikvm-heap(1192): Forcing collection of SoftReferences for 21381328-byte allocation
10-11 06:06:34.946: D/dalvikvm(1192): GC_BEFORE_OOM freed 9K, 1% free 45453K/45575K, paused 93ms
10-11 06:06:34.946: E/dalvikvm-heap(1192): Out of memory on a 21381328-byte allocation.
10-11 06:06:34.957: I/dalvikvm(1192): "main" prio=5 tid=1 RUNNABLE
10-11 06:06:34.957: I/dalvikvm(1192):   | group="main" sCount=0 dsCount=0 obj=0x409c1460 self=0x12810
10-11 06:06:34.957: I/dalvikvm(1192):   | sysTid=1192 nice=0 sched=0/0 cgrp=default handle=1074082952
10-11 06:06:34.957: I/dalvikvm(1192):   | schedstat=( 3530101707 2280882759 989 ) utm=303 stm=50 core=0
10-11 06:06:34.957: I/dalvikvm(1192):   at android.graphics.Bitmap.nativeCreate(Native Method)
10-11 06:06:34.957: I/dalvikvm(1192):   at android.graphics.Bitmap.createBitmap(Bitmap.java:605)
10-11 06:06:34.957: I/dalvikvm(1192):   at android.graphics.Bitmap.createBitmap(Bitmap.java:551)
10-11 06:06:34.957: I/dalvikvm(1192):   at android.graphics.Bitmap.createScaledBitmap(Bitmap.java:437)
10-11 06:06:34.957: I/dalvikvm(1192):   at android.graphics.BitmapFactory.finishDecode(BitmapFactory.java:524)
10-11 06:06:34.957: I/dalvikvm(1192):   at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:499)
10-11 06:06:34.957: I/dalvikvm(1192):   at android.graphics.BitmapFactory.decodeResourceStream(BitmapFactory.java:351)
10-11 06:06:34.957: I/dalvikvm(1192):   at android.graphics.drawable.Drawable.createFromResourceStream(Drawable.java:773)
10-11 06:06:34.957: I/dalvikvm(1192):   at android.content.res.Resources.loadDrawable(Resources.java:1935)
10-11 06:06:34.966: I/dalvikvm(1192):   at android.content.res.Resources.getDrawable(Resources.java:664)
10-11 06:06:34.966: I/dalvikvm(1192):   at com.android.packageinstaller.PackageUtil.getAppSnippet(PackageUtil.java:177)
10-11 06:06:34.966: I/dalvikvm(1192):   at com.android.packageinstaller.InstallAppProgress.initView(InstallAppProgress.java:223)
10-11 06:06:34.966: I/dalvikvm(1192):   at com.android.packageinstaller.InstallAppProgress.onCreate(InstallAppProgress.java:164)
10-11 06:06:34.966: I/dalvikvm(1192):   at android.app.Activity.performCreate(Activity.java:4465)
10-11 06:06:34.966: I/dalvikvm(1192):   at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1049)
10-11 06:06:34.966: I/dalvikvm(1192):   at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1920)
10-11 06:06:34.966: I/dalvikvm(1192):   at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1981)
10-11 06:06:34.966: I/dalvikvm(1192):   at android.app.ActivityThread.access$600(ActivityThread.java:123)
10-11 06:06:34.966: I/dalvikvm(1192):   at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1147)
10-11 06:06:34.966: I/dalvikvm(1192):   at android.os.Handler.dispatchMessage(Handler.java:99)
10-11 06:06:34.966: I/dalvikvm(1192):   at android.os.Looper.loop(Looper.java:137)
10-11 06:06:34.966: I/dalvikvm(1192):   at android.app.ActivityThread.main(ActivityThread.java:4424)
10-11 06:06:34.966: I/dalvikvm(1192):   at java.lang.reflect.Method.invokeNative(Native Method)
10-11 06:06:34.976: I/dalvikvm(1192):   at java.lang.reflect.Method.invoke(Method.java:511)
10-11 06:06:34.976: I/dalvikvm(1192):   at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
10-11 06:06:34.976: I/dalvikvm(1192):   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
10-11 06:06:34.976: I/dalvikvm(1192):   at dalvik.system.NativeStart.main(Native Method)
10-11 06:06:34.976: D/AndroidRuntime(1192): Shutting down VM
10-11 06:06:34.976: W/dalvikvm(1192): threadid=1: thread exiting with uncaught exception (group=0x409c01f8)
10-11 06:06:35.006: E/AndroidRuntime(1192): FATAL EXCEPTION: main
10-11 06:06:35.006: E/AndroidRuntime(1192): java.lang.OutOfMemoryError
10-11 06:06:35.006: E/AndroidRuntime(1192):     at android.graphics.Bitmap.nativeCreate(Native Method)
10-11 06:06:35.006: E/AndroidRuntime(1192):     at android.graphics.Bitmap.createBitmap(Bitmap.java:605)
10-11 06:06:35.006: E/AndroidRuntime(1192):     at android.graphics.Bitmap.createBitmap(Bitmap.java:551)
10-11 06:06:35.006: E/AndroidRuntime(1192):     at android.graphics.Bitmap.createScaledBitmap(Bitmap.java:437)
10-11 06:06:35.006: E/AndroidRuntime(1192):     at android.graphics.BitmapFactory.finishDecode(BitmapFactory.java:524)
10-11 06:06:35.006: E/AndroidRuntime(1192):     at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:499)
10-11 06:06:35.006: E/AndroidRuntime(1192):     at android.graphics.BitmapFactory.decodeResourceStream(BitmapFactory.java:351)
10-11 06:06:35.006: E/AndroidRuntime(1192):     at android.graphics.drawable.Drawable.createFromResourceStream(Drawable.java:773)
10-11 06:06:35.006: E/AndroidRuntime(1192):     at android.content.res.Resources.loadDrawable(Resources.java:1935)
10-11 06:06:35.006: E/AndroidRuntime(1192):     at android.content.res.Resources.getDrawable(Resources.java:664)
10-11 06:06:35.006: E/AndroidRuntime(1192):     at com.android.packageinstaller.PackageUtil.getAppSnippet(PackageUtil.java:177)
10-11 06:06:35.006: E/AndroidRuntime(1192):     at com.android.packageinstaller.InstallAppProgress.initView(InstallAppProgress.java:223)
10-11 06:06:35.006: E/AndroidRuntime(1192):     at com.android.packageinstaller.InstallAppProgress.onCreate(InstallAppProgress.java:164)
10-11 06:06:35.006: E/AndroidRuntime(1192):     at android.app.Activity.performCreate(Activity.java:4465)
10-11 06:06:35.006: E/AndroidRuntime(1192):     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1049)
10-11 06:06:35.006: E/AndroidRuntime(1192):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1920)
10-11 06:06:35.006: E/AndroidRuntime(1192):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1981)
10-11 06:06:35.006: E/AndroidRuntime(1192):     at android.app.ActivityThread.access$600(ActivityThread.java:123)
10-11 06:06:35.006: E/AndroidRuntime(1192):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1147)
10-11 06:06:35.006: E/AndroidRuntime(1192):     at android.os.Handler.dispatchMessage(Handler.java:99)
10-11 06:06:35.006: E/AndroidRuntime(1192):     at android.os.Looper.loop(Looper.java:137)
10-11 06:06:35.006: E/AndroidRuntime(1192):     at android.app.ActivityThread.main(ActivityThread.java:4424)
10-11 06:06:35.006: E/AndroidRuntime(1192):     at java.lang.reflect.Method.invokeNative(Native Method)
10-11 06:06:35.006: E/AndroidRuntime(1192):     at java.lang.reflect.Method.invoke(Method.java:511)
10-11 06:06:35.006: E/AndroidRuntime(1192):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
10-11 06:06:35.006: E/AndroidRuntime(1192):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
10-11 06:06:35.006: E/AndroidRuntime(1192):     at dalvik.system.NativeStart.main(Native Method)
10-11 06:06:35.046: W/ActivityManager(98):   Force finishing activity com.android.packageinstaller/.InstallAppProgress
10-11 06:06:35.186: I/Process(98): Sending signal. PID: 1192 SIG: 3
10-11 06:06:35.186: I/dalvikvm(1192): threadid=3: reacting to signal 3
10-11 06:06:35.186: I/dalvikvm(1192): Wrote stack traces to '/data/anr/traces.txt'
10-11 06:06:35.566: W/ActivityManager(98): Activity pause timeout for ActivityRecord{41a415b8 com.android.packageinstaller/.InstallAppProgress}
10-11 06:06:35.576: I/Process(98): Sending signal. PID: 1192 SIG: 3
10-11 06:06:35.576: I/dalvikvm(1192): threadid=3: reacting to signal 3
10-11 06:06:35.586: I/dalvikvm(1192): Wrote stack traces to '/data/anr/traces.txt'
10-11 06:06:35.836: D/dalvikvm(98): GC_CONCURRENT freed 479K, 11% free 15792K/17671K, paused 6ms+74ms
10-11 06:06:35.926: W/NetworkManagementSocketTagger(98): setKernelCountSet(10014, 1) failed with errno -2
10-11 06:06:36.816: W/NetworkManagementSocketTagger(98): setKernelCountSet(10029, 0) failed with errno -2
10-11 06:06:46.369: W/ActivityManager(98): Activity destroy timeout for ActivityRecord{41a415b8 com.android.packageinstaller/.InstallAppProgress}
10-11 06:06:46.526: W/ActivityManager(98): Activity destroy timeout for ActivityRecord{419f82a0 com.android.packageinstaller/.PackageInstallerActivity}
10-11 06:08:40.916: I/GTalkService/c(226): [AndroidEndpoint@1097419944] connect: acct=1000000, state=CONNECTING
10-11 06:08:40.976: E/GTalkService(226): connectionClosed: no XMPPConnection - That's strange!
10-11 06:08:43.986: D/ConnectivityService(98): handleInetConditionHoldEnd: net=0, condition=0, published condition=0
10-11 06:11:02.866: D/dalvikvm(426): GC_CONCURRENT freed 505K, 17% free 14262K/17159K, paused 6ms+9ms
Nik Reiman
  • 39,067
  • 29
  • 104
  • 160
Dhaval Parmar
  • 18,812
  • 8
  • 82
  • 177
  • please read my question again. i got this when install apk from mail to device.. – Dhaval Parmar Sep 27 '12 at 07:10
  • as this application install in emulator successfully? – Pratik Sep 27 '12 at 07:12
  • yes this app install in emulator of ICS2 Motorola, and device Galaxy POP, Galaxy ACE s 5830. but this is not working in Galaxy s3. – Dhaval Parmar Sep 27 '12 at 07:19
  • Could you add the logcat output when the error happened to your question? – Joe Oct 06 '12 at 12:00
  • @Joe : i got this error when install apk from gmail. when i run app directly from eclipse its worked. – Dhaval Parmar Oct 06 '12 at 18:10
  • @DhavalSodhaParmar, you can see the logcat output even when not running it from Eclipse, just select "All messages (no filters)". We want to see if especially the `PackageManager` log any exceptions. – Joe Oct 06 '12 at 22:54
  • @Joe: i was edit my question please check it. i put all log which i found when install apk in s3 emulator. i have't s3 device. – Dhaval Parmar Oct 11 '12 at 06:15

4 Answers4

5

i solved this problem by resize my apps images like layout's background. please try this your problem may solve. in your app there is high resolution images please make it low resolution.

check you manifest

<activity
    android:name="com.example.twitter_cls.PrepareRequestTokenActivity"
    android:configChanges="keyboardHidden|orientation|screenSize"
    android:theme="@android:style/Theme.NoTitleBar.Fullscreen" >
</activity>

change above code to

<activity
    android:name=".PrepareRequestTokenActivity"
    android:configChanges="keyboardHidden|orientation|screenSize"
    android:theme="@android:style/Theme.NoTitleBar.Fullscreen" >
</activity>

resize all you background images to below size:

xlarge screens are at least 960dp x 720dp
large screens are at least 640dp x 480dp
normal screens are at least 470dp x 320dp
small screens are at least 426dp x 320dp

more details click here

you app icon 'll be

36x36 for low-density
48x48 for medium-density
72x72 for high-density
96x96 for extra high-density

more details click here

for edit 11/10/2012 click here

"this is funny but i want to share with others it may help some one : i remove all other packages from app's source code!! please try it."


its also heaped when we download apk from email or server because of MIME type(.apk) not set on server side.

Community
  • 1
  • 1
  • This does not really answer the question. If you have a different question, you can ask it by clicking [Ask Question](http://stackoverflow.com/questions/ask). You can also [add a bounty](http://stackoverflow.com/privileges/set-bounties) to draw more attention to this question. – evilone Sep 28 '12 at 08:53
4

I had this problem too, I changed my application icon size to 512*512 (it was very big before) and then it resolved!

Maryam Zakani
  • 513
  • 4
  • 7
0

You seem to be missing periods in your activity names.

android:name="SettingActivity" should probably be android:name=".SettingActivity"

Your main activity seems named correctly though.

pjco
  • 3,826
  • 25
  • 25
0

I think the reason this is happening is that gmail is sending the Intent to install which launches the install activity. This makes it all happen in the memory space of gmail which. In that case I would perhaps expect a similar outcome if I were installing via the browser since I know browser apps also take a lot of memory.

Douglas Jones
  • 2,522
  • 1
  • 23
  • 27