Android应用程序错误
我在一个测试应用程序中构建了我的应用程序的一些元素,我已经将这些元素复制到我的主应用程序中,但当我运行它时,应用程序爆炸了 我觉得我的清单有问题,但我不能很准确地指出。这是我的舱单:-Android应用程序错误,android,android-manifest,Android,Android Manifest,我在一个测试应用程序中构建了我的应用程序的一些元素,我已经将这些元素复制到我的主应用程序中,但当我运行它时,应用程序爆炸了 我觉得我的清单有问题,但我不能很准确地指出。这是我的舱单:- <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="police.uk.greatermanchesterpo
<?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>
请在XMLParser或CustomizedListView上检查代码,并将网络操作移动到后台线程中。最好的方法是。您正在使用
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
请在XMLParser或CustomizedListView上检查代码,并将网络操作移动到后台线程中。最好的方法是。从更改您的权限
<permission
android:name="com.example.mapdemo.permission.MAPS_RECEIVE"
android:protectionLevel="signature" />
<uses-permission android:name="com.example.mapdemo.permission.MAPS_RECEIVE"/>
到
我刚刚更改了包名,更改了您的权限
<permission
android:name="com.example.mapdemo.permission.MAPS_RECEIVE"
android:protectionLevel="signature" />
<uses-permission android:name="com.example.mapdemo.permission.MAPS_RECEIVE"/>
到
我刚刚更改了程序包名称您已经放置了多个
意味着它是您应用程序的起点,并且它必须只包含一个活动,并且您已将它放置在每个活动中。。这是一个错误。将
放在您想要在Android中开始活动的位置。。希望这有帮助
让我让你的工作变得简单,,,:)
您已经放置了多个
表示它是您应用程序的起点,并且它必须只包含一个活动,并且您已经在每个活动中放置了它。。这是一个错误。将
放在您想要在Android中开始活动的位置。。希望这有帮助
让我让你的工作变得简单,,,:)
此错误指出您正试图在活动主线程上执行网络操作。不建议这样做,因为在获得ApplicationNotResponding异常之前,您只有5秒的时间响应交互
请考虑将网络操作移到后台线程EG,通过服务或:
此错误指出您正在尝试在活动主线程上进行网络操作。不建议这样做,因为在获得ApplicationNotResponding异常之前,您只有5秒的时间响应交互
请考虑将网络操作移到后台线程EG,通过服务或:
你可以发布LogCAT输出吗?我们不是在玩隐藏和SEK…请把你的日志放在这里。发布整个logcat输出,这是不够的。好的,我已经添加了整个logcat。你可以发布logcat输出吗?我们不是在玩隐藏和搜索。。。请把你的日志放在这里。发布整个logcat输出,这是不够的。好的,我已经添加了整个LogCatI,我已经删除了所有其他的,但是问题仍然存在。这是我的日志:-04-24 11:11:39.130:E/AndroidRuntime(12561):致命异常:main 04-24 11:11:39.130:E/AndroidRuntime(12561):java.lang.RuntimeException:无法启动活动组件信息{police.uk.greatermanchesterpoliceandroid/police.uk.greatermanchesterpoliceandroid.CustomizedListView}:android.os.networkonMainThreadException我已删除所有其他的,但问题仍然存在。这是我的日志:-04-24 11:11:39.130:E/AndroidRuntime(12561):致命异常:main 04-24 11:11:39.130:E/AndroidRuntime(12561):java.lang.RuntimeException:无法启动活动组件信息{police.uk.greatermanchesterpoliceandroid/police.uk.greatermanchesterpoliceandroid.CustomizedListView}:android.os.NetworkOnMainThreadException<permission
android:name="police.uk.greatermanchesterpoliceandroid.permission.MAPS_RECEIVE"
android:protectionLevel="signature" />
<uses-permission android:name="police.uk.greatermanchesterpoliceandroid.permission.MAPS_RECEIVE"/>
<?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">
</activity>
<activity
android:name=".DetailsActivity"
android:label="@string/app_name"
android:screenOrientation="portrait">
</activity>
<activity
android:name=".FileCache"
android:label="@string/app_name"
android:screenOrientation="portrait">
</activity>
<activity
android:name=".ImageLoader"
android:label="@string/app_name"
android:screenOrientation="portrait">
</activity>
<activity
android:name=".LazyAdapter"
android:label="@string/app_name"
android:screenOrientation="portrait">
</activity>
<activity
android:name=".MemoryCache"
android:label="@string/app_name"
android:screenOrientation="portrait">
</activity>
<activity
android:name=".Utils"
android:label="@string/app_name"
android:screenOrientation="portrait">
</activity>
<activity
android:name=".XMLParser"
android:label="@string/app_name"
android:screenOrientation="portrait">
</activity>
<activity
android:name=".ac2"
android:label="@string/app_name"
android:screenOrientation="portrait">
</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" />