我想将我的应用程序放在system / app上。当我在Android板上安装我的应用程序时,它工作正常。但是,当我试图运行放入/ system / app的应用程序时。它显示以下错误。
java.lang.RuntimeException: Binary XML file line #31: You must supply a layout_height attribute.
W/WindowManager( 591): at android.content.res.TypedArray.getLayoutDimension(TypedArray.java:491)
W/WindowManager( 591): at android.view.ViewGroup$LayoutParams.setBaseAttributes(ViewGroup.java:5459)
W/WindowManager( 591): at android.view[ 2330.757820] mdp4_overlay_mdp_perf_upd mdp bw is changed [0] from 1 to 4
.ViewGroup$MarginLayoutParams.<init>(ViewGroup.java:5594)
W/WindowManager( 591): at android.widget.LinearLayout$LayoutParams.<init>(LinearLayout.java:1809)
W/WindowManager( 591): at android.widget.LinearLayout.generateLayoutParams(LinearLayout.java:1721)
W/WindowManager( 591): at android.widget.LinearLayout.ge[ 2330.775766] mdp4_overlay_mdp_perf_upd mdp bw is changed [1] from 4 to 1
nerateLayoutParams(LinearLayout.java:58)
W/WindowManager( 591): at android.view.LayoutInflater.rInflate(LayoutInflater.java:748)
W/WindowManager( 591): at android.view.LayoutInflater.inflate(LayoutInflater.java:489)
W/WindowManager( 591): at android.view.LayoutInflater.inflate(LayoutInflater.java:396)
W/WindowManager( 591): at android.view.LayoutInflater.inflate(LayoutInflater.java:352)
W/WindowManager( 591): at com.android.internal.policy.impl.PhoneWindow.generateLayout(PhoneWindow.java:2784)
W/WindowManager( 591): at com.android.internal.policy.impl.[ 2330.846970] mdp4_overlay_mdp_perf_upd mdp bw is changed [0] from 1 to 4
PhoneWindow.installDecor(PhoneWindow.java:2844)
W/WindowManager( 591): at com.android.internal.policy.impl.PhoneWindow.getDecorView(PhoneWindow.java:1542)
W/WindowManager( 591): at com.android.internal.policy.impl.PhoneWindowManager.addStartingWindow(PhoneWindowManager.java:1561)
W/WindowManager( 591): at com.android.server.wm.WindowManagerService$H.handleMessage(WindowManagerService.java:6987)
W/WindowManager( 591): at android.os.Handler.dispatchMessage(Handler.java:99)
W/WindowManager( 591): at android.os.Looper.loop(Looper.java:137)
W/WindowManager( 591): at com.android.server.wm.WindowManagerService$WMThread.run(WindowManagerService.java:828)
D/PowerManagerService( 591): acquireWakeLock flags=0x1 tag=AudioOut_3
I/ActivityManager( 591): START {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=peer.ir/.MainActivity u=0} from pid 805
但是,我在xml的所有视图中都使用了layout_height。我在下面提供了我的xml文件供您参考。我无法找出我做错了什么?
答案 0 :(得分:-1)
仍然是您尝试安装为System App的设备吗?
如果有根,请在SD卡上复制您的应用程序,然后按照以下ADB步骤操作:
adb shell
su
cd sdcard/
mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
cat YOURAPP.apk > /system/app/YOURAPP.apk
chmod 644 /system/app/YOURAPP.apk
reboot