搜索

首页  >  问答  >  正文

android-studio - 文件没问题的情况下not read packageName from xxx\AndroidManifest.xml?

之前没问题的项目打开之后Gradle报错:


Try Again以后还是不行,Messages显示如下:

仔细检查没有发现问题,最后新建一个工程把文件挨个拷贝,新工程一切正常,想知道遇到这种问题如何解决,不能总是新建工程吧。最后附上还是有问题的老工程AndroidManifest文件:

<?xml version="1.0" encoding="utf-8" standalone="no"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:installLocation="preferExternal"
     package="com.kunpo.loner">
    <supports-screens android:anyDensity="true" android:largeScreens="true" android:normalScreens="true" android:smallScreens="true" android:xlargeScreens="true"/>

    <uses-sdk android:minSdkVersion="15" android:targetSdkVersion="25"/>

    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
    <uses-permission android:name="android.permission.READ_PHONE_STATE" />
    <uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS"/>
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />

    <application android:icon="@drawable/icon" android:isGame="false" android:label="@string/app_name">
        <activity android:configChanges="locale|fontScale|keyboard|keyboardHidden|mcc|mnc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|touchscreen|uiMode"
            android:label="@string/app_name" android:launchMode="singleTask" android:name="com.kunpo.loner.MainActivity" android:screenOrientation="landscape">
            <intent-filter>
                <action android:name="android.intent.action.MAIN"/>
                <category android:name="android.intent.category.LAUNCHER"/>
            </intent-filter>
            <intent-filter>
                <action android:name="android.intent.action.VIEW"/>
                <category android:name="android.intent.category.DEFAULT"/>
                <data android:scheme="wxf111111111111"/>
            </intent-filter>
            <meta-data android:name="unityplayer.UnityActivity" android:value="true"/>
        </activity>

        <activity
            android:name="com.kunpo.loner.wxapi.WXPayEntryActivity"
            android:exported="true"
            android:launchMode="singleTop" />

        <activity
            android:name="com.alipay.sdk.app.H5PayActivity"
            android:configChanges="orientation|keyboardHidden|navigation"
            android:exported="false"
            android:screenOrientation="behind" >
        </activity>
        <activity
            android:name="com.alipay.sdk.auth.AuthActivity"
            android:configChanges="orientation|keyboardHidden|navigation"
            android:exported="false"
            android:screenOrientation="behind" >
        </activity>

    </application>

    <uses-feature android:name="android.hardware.touchscreen" android:required="false"/>
    <uses-feature android:name="android.hardware.touchscreen.multitouch" android:required="false"/>
    <uses-feature android:name="android.hardware.touchscreen.multitouch.distinct" android:required="false"/>

</manifest>

代码排版好像有点问题,请见谅。

PHPzPHPz2734 天前1262

全部回复(1)我来回复

  • 我想大声告诉你

    我想大声告诉你2017-05-24 11:39:47

    你看看你的gradle里面有 applicationId 吗? 如果没有的话加上应该就可以了

    回复
    0
  • 取消回复