当我尝试在我的设备上安装APK时出现以下错误。它正在使用设备Galaxy POP,Galaxy ACE的5830.Galaxy s3中唯一的问题
我的应用程序的清单文件位于下方。
<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>
请帮助我,先谢谢。
已编辑。
只有当我从gmail安装apk时才会发生这种情况。如果我直接从eclipse运行app,那么它就可以了。
为什么会发生这种情况我想知道。请帮帮我....
编辑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
答案 0 :(得分:5)
我通过调整我的应用图片大小来解决这个问题,比如布局的背景。请尝试这个你的问题可以解决。 在你的应用程序中有高分辨率图像请低分辨率。
检查清单
<activity
android:name="com.example.twitter_cls.PrepareRequestTokenActivity"
android:configChanges="keyboardHidden|orientation|screenSize"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen" >
</activity>
将上述代码更改为
<activity
android:name=".PrepareRequestTokenActivity"
android:configChanges="keyboardHidden|orientation|screenSize"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen" >
</activity>
将所有背景图片调整为以下尺寸:
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
更多详情click here
你的app图标将会是
36x36 for low-density
48x48 for medium-density
72x72 for high-density
96x96 for extra high-density
更多详情click here
用于编辑11/10/2012 click here
“这很有趣,但我想与其他人分享它可能对某人有所帮助:我从应用程序源代码中删除所有其他软件包!!请尝试一下。”
答案 1 :(得分:3)
我也有这个问题, 我将应用程序图标大小更改为512 * 512(之前非常大),然后解决了!
答案 2 :(得分:0)
您似乎在活动名称中缺少句号。
android:name="SettingActivity"
应该是android:name=".SettingActivity"
您的主要活动似乎正确命名。
答案 3 :(得分:0)
我认为发生这种情况的原因是gmail正在发送安装Intent以启动安装活动。这使得它全部发生在gmail的内存空间中。在那种情况下,如果我通过浏览器进行安装,我可能会期望得到类似的结果,因为我知道浏览器应用程序也会占用大量内存。