Hallo,
jedes Mal wenn ich meine App im Emulator öffnen will zeigt der Emulator an: "unfortunately the process com.android.phone has stopped"
Logcat:
[JAVA]
09-03 10:26:35.297: W/zipro(1220): Error opening archive /data/app/com.Steve.tak-1.apk: Invalid file
09-03 10:26:35.297: D/asset(1220): failed to open Zip archive '/data/app/com.Steve.tak-1.apk'
09-03 10:26:35.297: W/PackageManager(1220): Failed to parse /data/app/com.Steve.tak-1.apk: Failed adding asset path: /data/app/com.Steve.tak-1.apk
09-03 10:26:35.297: W/zipro(1220): Error opening archive /data/app/com.Steve.tak-2.apk: Invalid file
09-03 10:26:35.297: D/asset(1220): failed to open Zip archive '/data/app/com.Steve.tak-2.apk'
09-03 10:26:35.297: W/PackageManager(1220): Failed to parse /data/app/com.Steve.tak-2.apk: Failed adding asset path: /data/app/com.Steve.tak-2.apk
09-03 10:26:35.358: I/PackageManager(1220): /data/app/com.Steve.tak-4 changed; collecting certs
09-03 10:26:35.501: W/PackageManager(1220): Failed to parse /data/app/com.Steve.tak-4: Application package com.Steve.tak already installed. Skipping duplicate.
09-03 10:26:35.535: I/PackageManager(1220): /data/app/com.Steve.tak-3 changed; collecting certs
09-03 10:26:35.736: W/PackageManager(1220): Failed to parse /data/app/com.Steve.tak-3: Application package com.Steve.tak already installed. Skipping duplicate.
09-03 10:26:35.820: I/PackageManager(1220): /data/app/com.Steve.tak-5 changed; collecting certs
09-03 10:26:35.957: W/PackageManager(1220): Failed to parse /data/app/com.Steve.tak-5: Application package com.Steve.tak already installed. Skipping duplicate.
09-03 10:26:35.974: I/PackageManager(1220): /data/app/com.Steve.tak-6 changed; collecting certs
09-03 10:26:36.133: W/PackageManager(1220): Failed to parse /data/app/com.Steve.tak-6: Application package com.Steve.tak already installed. Skipping duplicate.
09-03 10:26:39.605: W/PackageManager(1296): Failure retrieving resources for com.Steve.tak: Resource ID #0x0
09-03 10:26:45.048: D/PackageManager(1220): Renaming /data/app/vmdl200701327.tmp to /data/app/com.Steve.tak-1
09-03 10:26:45.050: I/ActivityManager(1220): Force stopping com.Steve.tak appid=10046 user=-1: uninstall pkg
09-03 10:26:45.129: I/PackageManager(1220): Package com.Steve.tak codePath changed from /data/app/com.Steve.tak-2 to /data/app/com.Steve.tak-1; Retaining data and using new
09-03 10:26:45.130: I/PackageManager(1220): Running dexopt on: /data/app/com.Steve.tak-1/base.apk pkg=com.Steve.tak isa=x86 vmSafeMode=false
09-03 10:26:45.214: I/dex2oat(1616): /system/bin/dex2oat --zip-fd=6 --zip-location=/data/app/com.Steve.tak-1/base.apk --oat-fd=7 --oat-location=/data/dalvik-cache/x86/data@app@com.Steve.tak-1@base.apk@classes.dex --instruction-set=x86 --instruction-set-features=default --runtime-arg -Xms64m --runtime-arg -Xmx512m --swap-fd=10
09-03 10:26:49.842: W/PackageManager(1220): Code path for pkg : com.Steve.tak changing from /data/app/com.Steve.tak-2 to /data/app/com.Steve.tak-1
09-03 10:26:49.842: W/PackageManager(1220): Resource path for pkg : com.Steve.tak changing from /data/app/com.Steve.tak-2 to /data/app/com.Steve.tak-1
09-03 10:26:49.903: I/ActivityManager(1220): Force stopping com.Steve.tak appid=10046 user=-1: update pkg
09-03 10:26:50.167: I/ActivityManager(1220): Force stopping com.Steve.tak appid=10046 user=0: pkg removed
09-03 10:26:50.213: D/BackupManagerService(1220): Received broadcast Intent { act=android.intent.action.PACKAGE_REMOVED dat=package:com.Steve.tak flg=0x4000010 (has extras) }
09-03 10:26:50.243: D/BackupManagerService(1220): Received broadcast Intent { act=android.intent.action.PACKAGE_ADDED dat=package:com.Steve.tak flg=0x4000010 (has extras) }
09-03 10:26:50.243: W/BackupManagerService(1220): Removing schedule queue dupe of com.Steve.tak
09-03 10:26:50.691: I/ActivityManager(1220): START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 cmp=com.Steve.tak/.MainActivity} from uid 0 on display 0
09-03 10:26:50.696: V/WindowManager(1220): addAppToken: AppWindowToken{27269b token=Token{3c5d2aaa ActivityRecord{343d8995 u0 com.Steve.tak/.MainActivity t252}}} to stack=1 task=252 at 0
09-03 10:26:50.699: V/WindowManager(1220): Adding window Window{80c6502 u0 Starting com.Steve.tak} at 1 of 6 (after Window{268e68c2 u0 com.android.launcher/com.android.launcher2.Launcher})
09-03 10:26:50.738: I/ActivityManager(1220): Start proc 1693:com.Steve.tak/u0a46 for activity com.Steve.tak/.MainActivity
09-03 10:26:50.984: V/WindowManager(1220): Adding window Window{39097c u0 com.Steve.tak/com.Steve.tak.MainActivity} at 1 of 7 (before Window{80c6502 u0 Starting com.Steve.tak})
09-03 10:26:51.259: I/ActivityManager(1220): Displayed com.Steve.tak/.MainActivity: +553ms
[/JAVA]
Manifest:
[JAVA]
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.Steve.tak"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="22" />
<application
android:allowBackup="true"
android:icon="@drawable/axe"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name=".MainActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".Norden"
android:label="@string/app_name" >
<intent-filter>
<action android:name="com.Steve.tak.Norden" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
</application>
</manifest>
[/JAVA]
MainActivity:
[JAVA]
package com.Steve.tak;
import android.support.v7.app.ActionBarActivity;
import android.content.Intent;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.TextView;
public class MainActivity extends ActionBarActivity{
Button norden;
Button sueden;
Button osten;
Button westen;
Button untersuchen;
TextView tv;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
initialize();
tv.setText("");
norden.setOnClickListener(onc);
sueden.setOnClickListener(onc);
osten.setOnClickListener(onc);
westen.setOnClickListener(onc);
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.main, menu);
return true;
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
// Handle action bar item clicks here. The action bar will
// automatically handle clicks on the Home/Up button, so long
// as you specify a parent activity in AndroidManifest.xml.
int id = item.getItemId();
if (id == R.id.action_settings) {
return true;
}
return super.onOptionsItemSelected(item);
}
private void initialize() {
// TODO Auto-generated method stub
norden = (Button)findViewById(R.id.norden);
sueden = (Button)findViewById(R.id.sueden);
osten = (Button)findViewById(R.id.osten);
westen = (Button)findViewById(R.id.westen);
tv = (TextView)findViewById(R.id.tv);
}
OnClickListener onc = new OnClickListener() {
@Override
public void onClick(View v) {
// TODO Auto-generated method stub
switch(v.getId()){
case R.id.norden:
Intent i = new Intent("com.Steve.tak.Norden");
startActivityForResult(i, 0);
break;
}
}
};
}
[/JAVA]
Danke für die Hilfe!
jedes Mal wenn ich meine App im Emulator öffnen will zeigt der Emulator an: "unfortunately the process com.android.phone has stopped"
Logcat:
[JAVA]
09-03 10:26:35.297: W/zipro(1220): Error opening archive /data/app/com.Steve.tak-1.apk: Invalid file
09-03 10:26:35.297: D/asset(1220): failed to open Zip archive '/data/app/com.Steve.tak-1.apk'
09-03 10:26:35.297: W/PackageManager(1220): Failed to parse /data/app/com.Steve.tak-1.apk: Failed adding asset path: /data/app/com.Steve.tak-1.apk
09-03 10:26:35.297: W/zipro(1220): Error opening archive /data/app/com.Steve.tak-2.apk: Invalid file
09-03 10:26:35.297: D/asset(1220): failed to open Zip archive '/data/app/com.Steve.tak-2.apk'
09-03 10:26:35.297: W/PackageManager(1220): Failed to parse /data/app/com.Steve.tak-2.apk: Failed adding asset path: /data/app/com.Steve.tak-2.apk
09-03 10:26:35.358: I/PackageManager(1220): /data/app/com.Steve.tak-4 changed; collecting certs
09-03 10:26:35.501: W/PackageManager(1220): Failed to parse /data/app/com.Steve.tak-4: Application package com.Steve.tak already installed. Skipping duplicate.
09-03 10:26:35.535: I/PackageManager(1220): /data/app/com.Steve.tak-3 changed; collecting certs
09-03 10:26:35.736: W/PackageManager(1220): Failed to parse /data/app/com.Steve.tak-3: Application package com.Steve.tak already installed. Skipping duplicate.
09-03 10:26:35.820: I/PackageManager(1220): /data/app/com.Steve.tak-5 changed; collecting certs
09-03 10:26:35.957: W/PackageManager(1220): Failed to parse /data/app/com.Steve.tak-5: Application package com.Steve.tak already installed. Skipping duplicate.
09-03 10:26:35.974: I/PackageManager(1220): /data/app/com.Steve.tak-6 changed; collecting certs
09-03 10:26:36.133: W/PackageManager(1220): Failed to parse /data/app/com.Steve.tak-6: Application package com.Steve.tak already installed. Skipping duplicate.
09-03 10:26:39.605: W/PackageManager(1296): Failure retrieving resources for com.Steve.tak: Resource ID #0x0
09-03 10:26:45.048: D/PackageManager(1220): Renaming /data/app/vmdl200701327.tmp to /data/app/com.Steve.tak-1
09-03 10:26:45.050: I/ActivityManager(1220): Force stopping com.Steve.tak appid=10046 user=-1: uninstall pkg
09-03 10:26:45.129: I/PackageManager(1220): Package com.Steve.tak codePath changed from /data/app/com.Steve.tak-2 to /data/app/com.Steve.tak-1; Retaining data and using new
09-03 10:26:45.130: I/PackageManager(1220): Running dexopt on: /data/app/com.Steve.tak-1/base.apk pkg=com.Steve.tak isa=x86 vmSafeMode=false
09-03 10:26:45.214: I/dex2oat(1616): /system/bin/dex2oat --zip-fd=6 --zip-location=/data/app/com.Steve.tak-1/base.apk --oat-fd=7 --oat-location=/data/dalvik-cache/x86/data@app@com.Steve.tak-1@base.apk@classes.dex --instruction-set=x86 --instruction-set-features=default --runtime-arg -Xms64m --runtime-arg -Xmx512m --swap-fd=10
09-03 10:26:49.842: W/PackageManager(1220): Code path for pkg : com.Steve.tak changing from /data/app/com.Steve.tak-2 to /data/app/com.Steve.tak-1
09-03 10:26:49.842: W/PackageManager(1220): Resource path for pkg : com.Steve.tak changing from /data/app/com.Steve.tak-2 to /data/app/com.Steve.tak-1
09-03 10:26:49.903: I/ActivityManager(1220): Force stopping com.Steve.tak appid=10046 user=-1: update pkg
09-03 10:26:50.167: I/ActivityManager(1220): Force stopping com.Steve.tak appid=10046 user=0: pkg removed
09-03 10:26:50.213: D/BackupManagerService(1220): Received broadcast Intent { act=android.intent.action.PACKAGE_REMOVED dat=package:com.Steve.tak flg=0x4000010 (has extras) }
09-03 10:26:50.243: D/BackupManagerService(1220): Received broadcast Intent { act=android.intent.action.PACKAGE_ADDED dat=package:com.Steve.tak flg=0x4000010 (has extras) }
09-03 10:26:50.243: W/BackupManagerService(1220): Removing schedule queue dupe of com.Steve.tak
09-03 10:26:50.691: I/ActivityManager(1220): START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 cmp=com.Steve.tak/.MainActivity} from uid 0 on display 0
09-03 10:26:50.696: V/WindowManager(1220): addAppToken: AppWindowToken{27269b token=Token{3c5d2aaa ActivityRecord{343d8995 u0 com.Steve.tak/.MainActivity t252}}} to stack=1 task=252 at 0
09-03 10:26:50.699: V/WindowManager(1220): Adding window Window{80c6502 u0 Starting com.Steve.tak} at 1 of 6 (after Window{268e68c2 u0 com.android.launcher/com.android.launcher2.Launcher})
09-03 10:26:50.738: I/ActivityManager(1220): Start proc 1693:com.Steve.tak/u0a46 for activity com.Steve.tak/.MainActivity
09-03 10:26:50.984: V/WindowManager(1220): Adding window Window{39097c u0 com.Steve.tak/com.Steve.tak.MainActivity} at 1 of 7 (before Window{80c6502 u0 Starting com.Steve.tak})
09-03 10:26:51.259: I/ActivityManager(1220): Displayed com.Steve.tak/.MainActivity: +553ms
[/JAVA]
Manifest:
[JAVA]
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.Steve.tak"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="22" />
<application
android:allowBackup="true"
android:icon="@drawable/axe"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name=".MainActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".Norden"
android:label="@string/app_name" >
<intent-filter>
<action android:name="com.Steve.tak.Norden" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
</application>
</manifest>
[/JAVA]
MainActivity:
[JAVA]
package com.Steve.tak;
import android.support.v7.app.ActionBarActivity;
import android.content.Intent;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.TextView;
public class MainActivity extends ActionBarActivity{
Button norden;
Button sueden;
Button osten;
Button westen;
Button untersuchen;
TextView tv;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
initialize();
tv.setText("");
norden.setOnClickListener(onc);
sueden.setOnClickListener(onc);
osten.setOnClickListener(onc);
westen.setOnClickListener(onc);
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.main, menu);
return true;
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
// Handle action bar item clicks here. The action bar will
// automatically handle clicks on the Home/Up button, so long
// as you specify a parent activity in AndroidManifest.xml.
int id = item.getItemId();
if (id == R.id.action_settings) {
return true;
}
return super.onOptionsItemSelected(item);
}
private void initialize() {
// TODO Auto-generated method stub
norden = (Button)findViewById(R.id.norden);
sueden = (Button)findViewById(R.id.sueden);
osten = (Button)findViewById(R.id.osten);
westen = (Button)findViewById(R.id.westen);
tv = (TextView)findViewById(R.id.tv);
}
OnClickListener onc = new OnClickListener() {
@Override
public void onClick(View v) {
// TODO Auto-generated method stub
switch(v.getId()){
case R.id.norden:
Intent i = new Intent("com.Steve.tak.Norden");
startActivityForResult(i, 0);
break;
}
}
};
}
[/JAVA]
Danke für die Hilfe!