我正在尝试来自 build-plugin 的新功能 - 不幸的是,它从 res/raw 中删除了我的声音,即使它们在代码中被引用。有没有办法保护资源不被删除?
编辑 - 在玩了一会儿之后 - 似乎这个功能还没有成熟并且可以使用 - 另一个项目它从支持库中删除了所需的布局 xml:
D/PassAndroid(7137):将未处理的异常写入:
/data/data/org.ligi.passandroid/files/2.4.2-1414944524128.tracedroid
D/PassAndroid( 7137): java.lang.RuntimeException: Unable to start activity ComponentInfo{org.ligi.passandroid/org.ligi.passandroid.ui.PassListActivity}: android.content.res.Resources$NotFoundException: File res/layout/abc_screen_toolbar.xml from xml type layout resource ID #0x7f030013
D/PassAndroid( 7137): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2404)
D/PassAndroid( 7137): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2464)
D/PassAndroid( 7137): at android.app.ActivityThread.access$900(ActivityThread.java:172)
D/PassAndroid( 7137): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1308)
D/PassAndroid( 7137): at android.os.Handler.dispatchMessage(Handler.java:102)
D/PassAndroid( 7137): at android.os.Looper.loop(Looper.java:146)
D/PassAndroid( 7137): at android.app.ActivityThread.main(ActivityThread.java:5653)
D/PassAndroid( 7137): at java.lang.reflect.Method.invokeNative(Native Method)
D/PassAndroid( 7137): at java.lang.reflect.Method.invoke(Method.java:515)
D/PassAndroid( 7137): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1291)
D/PassAndroid( 7137): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1107)
D/PassAndroid( 7137): at dalvik.system.NativeStart.main(Native Method)
D/PassAndroid( 7137): Caused by: android.content.res.Resources$NotFoundException: File res/layout/abc_screen_toolbar.xml from xml type layout resource ID #0x7f030013
D/PassAndroid( 7137): at android.content.res.Resources.loadXmlResourceParser(Resources.java:3659)
D/PassAndroid( 7137): at android.content.res.Resources.loadXmlResourceParser(Resources.java:3606)
D/PassAndroid( 7137): at android.content.res.Resources.getLayout(Resources.java:2121)
D/PassAndroid( 7137): at android.view.LayoutInflater.inflate(LayoutInflater.java:396)
D/PassAndroid( 7137): at android.view.LayoutInflater.inflate(LayoutInflater.java:354)
D/PassAndroid( 7137): at android.support.v7.app.ActionBarActivityDelegateBase.q(Unknown Source)
D/PassAndroid( 7137): at android.support.v7.app.ActionBarActivityDelegateBase.a(Unknown Source)
D/PassAndroid( 7137): at android.support.v7.app.ActionBarActivity.setContentView(Unknown Source)
D/PassAndroid( 7137): at org.ligi.passandroid.ui.PassListActivity.onCreate(Unknown Source)
D/PassAndroid( 7137): at android.app.Activity.performCreate(Activity.java:5541)
D/PassAndroid( 7137): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1093)
D/PassAndroid( 7137): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2368)
D/PassAndroid( 7137): ... 11 more
D/PassAndroid( 7137): Caused by: java.io.FileNotFoundException: res/layout/abc_screen_toolbar.xml
D/PassAndroid( 7137): at android.content.res.AssetManager.openXmlAssetNative(Native Method)
D/PassAndroid( 7137): at android.content.res.AssetManager.openXmlBlockAsset(AssetManager.java:488)
D/PassAndroid( 7137): at android.content.res.Resources.loadXmlResourceParser(Resources.java:3637)
D/PassAndroid( 7137): ... 22 more