Ik ben nieuw in de ontwikkeling van Android. Mijn besturingssysteem is WinXP.
Ik probeer twee verschillende toepassingen op een Android-apparaatemulator op de opdrachtregel te installeren .
I have two Android projects "ap1" and "ap2".
In the "ap1" project directory, I ran "ant debug". I got an "ap1.apk" executable.
In the "ap2" project directory, I ran "ant debug". I got an "ap2.apk" executable.
I created an Android Virtual Device:
cmd_line> android create avd -n avd1 -t 1 --abi x86
I launched the emulator:
cmd_line> emulator -avd avd1 -verbose
The "adb devices" command returns:
List of devices attached
emulator-5554 device
I installed the first program on the emulator:
cmd_line> adb -s emulator-5554 install "ap1.apk"
I ran the program:
cmd_line> adb shell am start -a android.intent.action.MAIN -n my.pkg.android/.Activity1
=> It worked.
I installed the second program on the emulator:
cmd_line> adb -s emulator-5554 install "ap2.apk"
I ran the program:
cmd_line> adb shell am start -a android.intent.action.MAIN -n my.pkg2.android/.AnotherActivity1
=> It worked.
Dit alles werkt behalve dat het tweede uitvoerbare bestand van de eerste wordt "vervangen".
Als ik probeer het eerste uitvoerbare bestand uit te voeren, krijg ik een foutmelding:
cmd_line> adb shell am start -a android.intent.action.MAIN -n my.pkg.android/.Activity1
Starting: Intent {act = android.intent.action.MAIN cmp = my.pkg.android/.Activity1}
Fouttype 3
Fout: Activiteitsklasse {my.pkg.android/my.pkg.android.Activity1} bestaat niet.
Het lijkt erop dat ik de twee apps niet tegelijkertijd in de emulator kan hebben.
Wat denk je?
Wat moet ik doen om de twee apps beschikbaar te hebben (tegelijkertijd) in de emulator?
Bedankt voor het helpen.
Vriendelijke groeten.