I compiled a source code which made by colleague. But I got a few error messages.
At first, AndroidManifest error.
The address is
"app/build/intermediates/instant-run-support/debug/dependencies/AndroidManifest.xml"
And the message is "resource string/app_version not found."
Actually, "app_version" is declared on string. And if I delete or modify the AndroidManifest file, it is created or recover automatically. So I cannot delete or modify.
This is 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
<?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 . modify origin 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"
}
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.