android-studio - 文件没问题的情况下not read packageName from xxxAndroidManifest.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>
代码排版好像有点问题,请见谅。
问题解答
回答1:你看看你的gradle里面有 applicationId 吗? 如果没有的话加上应该就可以了
相关文章:
1. docker gitlab 如何git clone?2. java报错Communications link failure 该如何解决?3. android - 项目时间长了,字符串文件strings有的字符串可能是多余的,有没有办法快速检测那些是没用的?4. javascript - 怎么看网站用了什么技术框架?5. mysql - 用PHPEXCEL将excel文件导入数据库数据5000+条,本地数据库正常,线上只导入15条,没有报错,哪里的问题?6. angular.js使用$resource服务把数据存入mongodb的问题。7. 刷新页面出现弹框8. 关于Android权限的获取问题,大家遇到过这样的情况嘛?9. angular.js - angularJs ngRoute怎么在路由传递空字符串及用ng-switch取得10. PC 手机兼容的 编辑器
