[英]dependencies/AndroidManifest error
I compiled a source code which made by colleague. 我编译了一个由同事编写的源代码。 But I got a few error messages.
但是我收到了一些错误消息。
At first, AndroidManifest error. 首先,AndroidManifest错误。
The address is 地址是
"app/build/intermediates/instant-run-support/debug/dependencies/AndroidManifest.xml" “ app / build / intermediates / instant-run-support / debug / dependencies / AndroidManifest.xml”
And the message is "resource string/app_version not found." 消息是“找不到资源字符串/ app_version”。
Actually, "app_version" is declared on string. 实际上,“ app_version”是在字符串上声明的。 And if I delete or modify the AndroidManifest file, it is created or recover automatically.
而且,如果我删除或修改AndroidManifest文件,则会自动创建或恢复该文件。 So I cannot delete or modify.
因此,我无法删除或修改。
This is AndroidManifest 这是AndroidManifest
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="asdasd"
android:versionCode="4"
android:versionName="1.5.1.0">
<uses-sdk
android:minSdkVersion="19"
android:targetSdkVersion="24" />
<uses-permission android:name="android.permission.BLUETOOTH" />
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
<uses-permission android:name="android.permission.VIBRATE"/>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<application
android:label="@string/app_name"
android:theme="@style/AppTheme"
android:icon="@mipmap/ic_launcher"
tools:replace="android:icon"
android:name="android.support.multidex.MultiDexApplication" >
<activity
android:name=".SplashActivity"
android:theme="@style/SplashTheme"
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=".MainActivity"
android:screenOrientation="portrait"
android:exported="false">
</activity>
<service
android:enabled="true"
android:name=".UartService"
android:exported="false" />
</application>
</manifest>
And this is dependencies/AndroidManifest 这是依赖项/ AndroidManifest
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="passtech.mobilelocker"
android:versionCode="4"
android:versionName="@string/app_version"
split="lib_dependencies_apk">
</manifest>
How can I solve this problem? 我怎么解决这个问题?
under this path "app/build/" every file generated automatically . 在此路径下,“ app / build /”会自动生成每个文件。 modify origin AndroidManifest.xml
修改原始AndroidManifest.xml
You try remove version code and version name on file manifest. 您尝试删除文件清单上的版本代码和版本名称。 Then add version code, version name on app build file like this:
然后在应用程序构建文件上添加版本代码,版本名称,如下所示:
defaultConfig {
applicationId "com.ifs.vpbs"
minSdkVersion 19
targetSdkVersion 27
versionCode 1
versionName "1.0"
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.