我有一个主应用程序,它依赖于android libary。我在android库中有一个活动。我验证了布局文件和活动类。 Activity类调用正确的布局文件。但我不知道由于某种原因,我无法从主应用程序调用库的活动。依赖性明智,我验证了一切。我有另一个库,主应用程序依赖,但该库工作gr8没有任何问题。对于这个图书馆,我一直在,
java.lang.RuntimeException: Unable to start activity ComponentInfo{}: android.content.res.Resources$NotFoundException: Resource ID #0x7f03001a
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2389)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2451)
at android.app.ActivityThread.access$800(ActivityThread.java:151)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1354)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5499)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:942)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:737)
Caused by: android.content.res.Resources$NotFoundException: Resource ID #0x7f03001a
at android.content.res.Resources.getValue(Resources.java:1266)
at android.content.res.Resources.loadXmlResourceParser(Resources.java:2656)
at android.content.res.Resources.getLayout(Resources.java:1082)
at android.view.LayoutInflater.inflate(LayoutInflater.java:412)
at android.view.LayoutInflater.inflate(LayoutInflater.java:365)
at android.support.v7.app.AppCompatDelegateImplV7.setContentView(AppCompatDelegateImplV7.java:256)
at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:109)
at XXXXXXXXXXXX.onCreate(Unknown Source)
at android.app.Activity.performCreate(Activity.java:5990)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1117)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2342)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2451)
at android.app.ActivityThread.access$800(ActivityThread.java:151)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1354)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5499)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:942)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:737)
答案 0 :(得分:0)
我在活动中导入了特定于包的R文件并且问题消失了。感谢大家的时间。