테스트 앱에 내장 된 일부 앱 요소가 있는데 기본 앱에 요소를 복사했지만 실행하면 앱이 폭탄을 터뜨립니다.Android 앱 오류
내 매니페스트에 문제가 있다고 느끼지만 그 사실을 정확히 지적 할 수 없습니다. 이것은 내 매니페스트입니다 : -
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="police.uk.greatermanchesterpoliceandroid"
android:versionCode="1"
android:versionName="1.0">
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/CustomTheme">
<activity
android:name=".MainActivity"
android:label="@string/app_name"
android:screenOrientation="portrait">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".CustomizedListView" 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=".DetailsActivity"
android:label="@string/app_name"
android:screenOrientation="portrait">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".FileCache"
android:label="@string/app_name"
android:screenOrientation="portrait">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".ImageLoader"
android:label="@string/app_name"
android:screenOrientation="portrait">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".LazyAdapter"
android:label="@string/app_name"
android:screenOrientation="portrait">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".MemoryCache"
android:label="@string/app_name"
android:screenOrientation="portrait">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".Utils"
android:label="@string/app_name"
android:screenOrientation="portrait">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".XMLParser"
android:label="@string/app_name"
android:screenOrientation="portrait">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".ac2"
android:label="@string/app_name"
android:screenOrientation="portrait">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<meta-data
android:name="com.google.android.maps.v2.API_KEY"
android:value="AIzaSyAioYkrj1Wl44z2LQvTCOw6GXPXdTroGng"/>
</application>
<permission
android:name="com.example.mapdemo.permission.MAPS_RECEIVE"
android:protectionLevel="signature" />
<uses-permission android:name="com.example.mapdemo.permission.MAPS_RECEIVE"/>
<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.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-feature
android:glEsVersion="0x00020000"
android:required="true"/>
<uses-sdk android:minSdkVersion="11" />
사람이 문제를 볼 수 있을까요?
내 로그 캣에서이 줄은 저를 걱정 : - 당신은 모든 활동에 대한
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
를 사용하는
04-24 11:42:16.769: D/dalvikvm(18849): Late-enabling CheckJNI
04-24 11:42:16.794: I/dalvikvm(18849): Turning on JNI app bug workarounds for target SDK version 11...
04-24 11:42:16.799: E/jdwp(18849): Failed sending reply to debugger: Broken pipe
04-24 11:42:16.799: D/dalvikvm(18849): Debugger has detached; object registry had 1 entries
04-24 11:42:16.904: D/AbsListView(18849): Get MotionRecognitionManager
04-24 11:42:16.914: D/AndroidRuntime(18849): Shutting down VM
04-24 11:42:16.914: W/dalvikvm(18849): threadid=1: thread exiting with uncaught exception (group=0x41b082a0)
04-24 11:42:16.914: E/AndroidRuntime(18849): FATAL EXCEPTION: main
04-24 11:42:16.914: E/AndroidRuntime(18849): java.lang.RuntimeException: Unable to start activity ComponentInfo{police.uk.greatermanchesterpoliceandroid/police.uk.greatermanchesterpoliceandroid.CustomizedListView}: android.os.NetworkOnMainThreadException
04-24 11:42:16.914: E/AndroidRuntime(18849): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2100)
04-24 11:42:16.914: E/AndroidRuntime(18849): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2125)
04-24 11:42:16.914: E/AndroidRuntime(18849): at android.app.ActivityThread.access$600(ActivityThread.java:140)
04-24 11:42:16.914: E/AndroidRuntime(18849): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1227)
04-24 11:42:16.914: E/AndroidRuntime(18849): at android.os.Handler.dispatchMessage(Handler.java:99)
04-24 11:42:16.914: E/AndroidRuntime(18849): at android.os.Looper.loop(Looper.java:137)
04-24 11:42:16.914: E/AndroidRuntime(18849): at android.app.ActivityThread.main(ActivityThread.java:4898)
04-24 11:42:16.914: E/AndroidRuntime(18849): at java.lang.reflect.Method.invokeNative(Native Method)
04-24 11:42:16.914: E/AndroidRuntime(18849): at java.lang.reflect.Method.invoke(Method.java:511)
04-24 11:42:16.914: E/AndroidRuntime(18849): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1008)
04-24 11:42:16.914: E/AndroidRuntime(18849): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:775)
04-24 11:42:16.914: E/AndroidRuntime(18849): at dalvik.system.NativeStart.main(Native Method)
04-24 11:42:16.914: E/AndroidRuntime(18849): Caused by: android.os.NetworkOnMainThreadException
04-24 11:42:16.914: E/AndroidRuntime(18849): at android.os.StrictMode$AndroidBlockGuardPolicy.onNetwork(StrictMode.java:1118)
04-24 11:42:16.914: E/AndroidRuntime(18849): at java.net.InetAddress.lookupHostByName(InetAddress.java:385)
04-24 11:42:16.914: E/AndroidRuntime(18849): at java.net.InetAddress.getAllByNameImpl(InetAddress.java:236)
04-24 11:42:16.914: E/AndroidRuntime(18849): at java.net.InetAddress.getAllByName(InetAddress.java:214)
04-24 11:42:16.914: E/AndroidRuntime(18849): at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:137)
04-24 11:42:16.914: E/AndroidRuntime(18849): at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:164)
04-24 11:42:16.914: E/AndroidRuntime(18849): at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:119)
04-24 11:42:16.914: E/AndroidRuntime(18849): at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:360)
04-24 11:42:16.914: E/AndroidRuntime(18849): at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:670)
04-24 11:42:16.914: E/AndroidRuntime(18849): at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:509)
04-24 11:42:16.914: E/AndroidRuntime(18849): at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:487)
04-24 11:42:16.914: E/AndroidRuntime(18849): at police.uk.greatermanchesterpoliceandroid.XMLParser.getXmlFromUrl(XMLParser.java:45)
04-24 11:42:16.914: E/AndroidRuntime(18849): at police.uk.greatermanchesterpoliceandroid.CustomizedListView.onCreate(CustomizedListView.java:47)
04-24 11:42:16.914: E/AndroidRuntime(18849): at android.app.Activity.performCreate(Activity.java:5206)
04-24 11:42:16.914: E/AndroidRuntime(18849): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1094)
04-24 11:42:16.914: E/AndroidRuntime(18849): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2064)
04-24 11:42:16.914: E/AndroidRuntime(18849): ... 11 more
당신이 로그 캣 출력을 게시 할 수 있습니까? – AlexVogel
우리는 hide & seak를하지 않습니다 ... 여기에 기록을 올려주세요. –
전체 logcat 출력을 게시하십시오. – caiocpricci2