- Home /
update to unity5 plugin error with android AndroidManifest.xml
I wrote a plugin with java , it works with unity4.6. These day I am try update to unity personal edtion, than error happen. when I bulid apk file, it says "No resource found that matches the given name (at 'icon' with value '@drawable/ic_launcher')." , I am sure I had put ic_launcher.png into all drawable folders. after that, I reinstall android sdk , and it seams unity5 need android API21 and bulid tools 23. it still not work. before that, in unity4.6 I use API19 and bulid tools 21, it works. so it's a bug with unity5?
I build the jar with eclipise , I found some one said it was beacuse R.java lost in build, but I am sure R.class is bulid. BTW,And if I delete the android:icon="@drawable/ic_launcher" or change another name , it can bulid , but if I run it ,it crash when invoke java class .
Error: CommandInvokationFailure: Failed to re-package resources. See the Console for details. F:\downloads\sdk\android\adt_2015_10\build-tools\23.0.1\aapt.exe package --auto-add-overlay -v -f -m -J gen -M AndroidManifest.xml -S "res" -I "F:/downloads/sdk/android/adt_2015_10\platforms\android-21\android.jar" -F bin/resources.ap_ stderr[ AndroidManifest.xml:4: error: Error: No resource found that matches the given name (at 'icon' with value '@drawable/ic_launcher'). ] stdout[ Configurations: (default) xhdpi-v4
[link text][1] AndroidManifest.xml
![<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.xys"
android:versionCode="1"
android:versionName="1.0"
>
<uses-sdk android:minSdkVersion="10" />
<application
android:icon="@drawable/ic_launcher"
android:label="@string/app_name" >
<activity
android:screenOrientation="landscape"
android:name=".UnityTestActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:screenOrientation="landscape"
android:name=".WebViewActivity">
</activity>
</application>
<!-- 连接互联网的权限 -->
<uses-permission android:name="android.permission.INTERNET" />
<!-- SDCard中创建与删除文件权限 -->
<uses-permission android:name="android.permission.MOUNT_UNMOUNT_FILESYSTEMS"/>
<!-- SDCard写入数据权限 -->
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
</manifest>][2]
more pictures here: [1]: http://note.youdao.com/share/web/file.html?id=f373811861eb5c2c42ad76386fdc4b93&type=note [2]: /storage/temp/56498-clipboard.png
Your answer
Follow this Question
Related Questions
Android Plugin with AppCompat Theme 2 Answers
Unable to retrieve application from network 2 Answers
Facebook sdk 7.9 with Unity 5.4.2f2 and Android sdk compatibility !? 1 Answer
Failed to re-package resources. See the Console for details. error building 0 Answers
Fortumo android plugin stopped working on unity 5.3 ? 1 Answer