开发者

use adb to install .apk file on phone, game does not show up, but shows up in delete list

开发者 https://www.devze.com 2023-03-30 06:08 出处:网络
I installed my game onto my phone using adb. It shows up on the delete app screen but not on the regular app screen, I think there is a problem with my phone registering applications correctly.Help!

I installed my game onto my phone using adb. It shows up on the delete app screen but not on the regular app screen, I think there is a problem with my phone registering applications correctly. Help!

Heres the install log from command prompt: C:\Program Files\Android\android-sdk\platform-tools>adb install D:\EclipseWorksp ace\GreenThumbs\bin\GreenThumbs.apk 1462 KB/s (443800 bytes in 0.296s) pkg: /data/local/tmp/GreenThumbs.apk Success

Edit:By "delete app screen" I meant when you are on the app screen and you hit menu and then remove, you go to a screen where you can select apps to uninstal.

Here's my manifest, it does have the intent and it was working at one point:

<?xml version="1.0" encoding="utf-8"?>
    <manifest xmlns:android="http://schemas.android.com/apk/res/android"
          package="com.hernblog.GreenThumbs"
          android:versionCode="1"
          android:versionName="1.0">

        <uses-sdk android:minSdkVersion="10" />

        <application>
           <uses-library android:name="android.test.runner" />
        </application>
        <instrumentation android:name="android.test.InstrumentationTestRunner"
               android:targetPackage="com.hernblog.GreenThumbs" android:label="GreenThumbs Tests" />

        <application android:icon="@drawable/icon" android:label="@string/app_name"> 
                <activity a开发者_运维技巧ndroid:name="GreenThumbs" 
                          android:label="@string/app_name"
                          android:screenOrientation="landscape"> 
                    <intent-filter> 
                        <action android:name="android.intent.action.MAIN" /> 
                        <category android:name="android.intent.category.LAUNCHER" /> 
                    </intent-filter> 
                </activity> 
        </app`lication>
</manifest>


Make sure that you have the correct intent in your AndroidManifest.xml. It sound's like you don't have the launcher intent. These few lines should be under your activity block:

            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>


Ian is right, but you should also make sure that the package signature of you class remains the same from one version to another.

BTW your package name and your activity name looks wrong: Try something like:

package="com.hernblog"

and

android:name=".GreenThumbs"
0

精彩评论

暂无评论...
验证码 换一张
取 消