search

Home  >  Q&A  >  body text

android-studio - not read packageName from xxx\AndroidManifest.xml when there is no problem with the file?

Gradle reported an error after opening the project that was fine before:


Try Again still doesn’t work, Messages are displayed as follows:

After careful inspection, no problem was found. Finally, I created a new project and copied the files one by one. Everything in the new project was normal. I want to know how to solve this kind of problem. I can't always create a new project. Finally, the AndroidManifest file of the old project that still has problems is attached:

<?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>

There seems to be some problem with code layout, please forgive me.

PHPzPHPz2765 days ago1299

reply all(1)I'll reply

  • 我想大声告诉你

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

    See if there is applicationId in your gradle? If not, you should be able to add it

    reply
    0
  • Cancelreply