我正在尝试启动我的Android应用程序,但我无法使用SplashScreen& web视图。
您可以在GitHub上找到my source code。
这是我的 AndroidManifest.xml
文件的代码:
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2014-present iSC Apps & The Android Open Source Project
All rights reserved.
This material may not be reproduced, displayed, modified or distributed
without the express prior written permission of the copyright holder.
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="isc.apps.android.suriyaa" >
<!-- Set app permissions on a android device -->
<uses-permission android:name="android.permission.INTERNET" />
<!-- App permissions for Parse -->
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
<permission android:protectionLevel="signature"
android:name="isc.apps.android.suriyaa.permission.C2D_MESSAGE" />
<uses-permission android:name="isc.apps.android.suriyaa.permission.C2D_MESSAGE" />
<!-- Set icon -->
<application
android:allowBackup="false"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name">
<!-- SplashScreen activity -->
<activity
android:name="SplashScreen"
android:theme="@style/Theme.Transparent">
<intent-filter>
<action android:name="android.intent.action.MAIN"></action>
<category android:name="android.intent.category.LAUNCHER"></category>
</intent-filter>
</activity>
<!-- Main activity -->
<activity
android:name="MainActivity"
android:label="@string/app_name"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT"/>
</intent-filter>
<!-- Parse Push Service -->
<!--
<service android:name="com.parse.PushService" />
<receiver android:name="com.parse.ParsePushBroadcastReceiver"
android:exported="false">
<intent-filter>
<action android:name="com.parse.push.intent.RECEIVE" />
<action android:name="com.parse.push.intent.DELETE" />
<action android:name="com.parse.push.intent.OPEN" />
</intent-filter>
</receiver>
<receiver android:name="com.parse.GcmBroadcastReceiver"
android:permission="com.google.android.c2dm.permission.SEND">
<intent-filter>
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
<action android:name="com.google.android.c2dm.intent.REGISTRATION" />
<category android:name="isc.apps.android.suriyaa" />
</intent-filter>
</receiver>
-->
</activity>
</application>
<!-- DISABLED
<uses-sdk android:minSdkVersion="7" />
-->
</manifest>
<!-- Build the <> with <3 by iSC Apps Team -->
调试我的项目后。以下调试控制台输出如下:
Waiting for device.
Device connected: emulator-5554
Device AVD_for_Nexus_S_by_Google [emulator-5554] is online, waiting for processes to start up..
Device is ready: AVD_for_Nexus_S_by_Google [emulator-5554]
Target device: AVD_for_Nexus_S_by_Google [emulator-5554]
Uploading file
local path: C:\Users\Suriyaa\Documents\GitHub\isc.apps.android.suriyaa\app\build\outputs\apk\app-debug.apk
remote path: /data/local/tmp/isc.apps.android.suriyaa
Installing isc.apps.android.suriyaa
DEVICE SHELL COMMAND: pm install -r "/data/local/tmp/isc.apps.android.suriyaa"
pkg: /data/local/tmp/isc.apps.android.suriyaa
Success
Launching application: isc.apps.android.suriyaa/isc.apps.android.suriyaa.SplashScreen.
DEVICE SHELL COMMAND: am start -D -n "isc.apps.android.suriyaa/isc.apps.android.suriyaa.SplashScreen" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER
Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=isc.apps.android.suriyaa/.SplashScreen }
Waiting for process: isc.apps.android.suriyaa
Client not ready yet.
Connected to the target VM, address: 'localhost:8605', transport: 'socket'
Disconnected from the target VM, address: 'localhost:8605', transport: 'socket'
Android Studio中的调试程序自动停止。
无论如何,有没有办法解决这个错误?
答案 0 :(得分:2)
从manifest.xml的MainActivity中删除intent-filter
更改
<activity
android:name="MainActivity"
android:label="@string/app_name"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT"/>
</intent-filter>
</activity>
到
<activity
android:name="MainActivity"
android:label="@string/app_name"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen">
<intent-filter>
<category android:name="android.intent.category.DEFAULT"/>
</intent-filter>
</activity>
答案 1 :(得分:0)
重新启动Android Studio
。
如果这不能解决您的问题,请尝试:
打开终端并执行:
> adb get-state