I have made an simple app from the eclipse new android application wizard. At this point, everything worked fine.
After adding pdfnet.res to the project, the program can't start without crashing. the error was
10-20 15:28:41.035: E/AndroidRuntime(16287): FATAL EXCEPTION: main
10-20 15:28:41.035: E/AndroidRuntime(16287): Process: at.aec.solutions.pdftronviewer, PID: 16287
10-20 15:28:41.035: E/AndroidRuntime(16287): java.lang.RuntimeException: Unable to start activity ComponentInfo{at.aec.solutions.pdftronviewer/at.aec.solutions.pdftronviewer.MainActivity}: android.content.res.Resources$NotFoundException: Resource ID #0x7f030000
10-20 15:28:41.035: E/AndroidRuntime(16287): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2184)
10-20 15:28:41.035: E/AndroidRuntime(16287): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2233)
10-20 15:28:41.035: E/AndroidRuntime(16287): at android.app.ActivityThread.access$800(ActivityThread.java:135)
10-20 15:28:41.035: E/AndroidRuntime(16287): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196)
10-20 15:28:41.035: E/AndroidRuntime(16287): at android.os.Handler.dispatchMessage(Handler.java:102)
10-20 15:28:41.035: E/AndroidRuntime(16287): at android.os.Looper.loop(Looper.java:136)
10-20 15:28:41.035: E/AndroidRuntime(16287): at android.app.ActivityThread.main(ActivityThread.java:5001)
10-20 15:28:41.035: E/AndroidRuntime(16287): at java.lang.reflect.Method.invokeNative(Native Method)
10-20 15:28:41.035: E/AndroidRuntime(16287): at java.lang.reflect.Method.invoke(Method.java:515)
10-20 15:28:41.035: E/AndroidRuntime(16287): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:785)
10-20 15:28:41.035: E/AndroidRuntime(16287): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601)
10-20 15:28:41.035: E/AndroidRuntime(16287): at dalvik.system.NativeStart.main(Native Method)
10-20 15:28:41.035: E/AndroidRuntime(16287): Caused by: android.content.res.Resources$NotFoundException: Resource ID #0x7f030000
10-20 15:28:41.035: E/AndroidRuntime(16287): at android.content.res.Resources.getValue(Resources.java:1123)
10-20 15:28:41.035: E/AndroidRuntime(16287): at android.content.res.Resources.loadXmlResourceParser(Resources.java:2309)
10-20 15:28:41.035: E/AndroidRuntime(16287): at android.content.res.Resources.getLayout(Resources.java:939)
10-20 15:28:41.035: E/AndroidRuntime(16287): at android.view.LayoutInflater.inflate(LayoutInflater.java:395)
10-20 15:28:41.035: E/AndroidRuntime(16287): at android.view.LayoutInflater.inflate(LayoutInflater.java:353)
10-20 15:28:41.035: E/AndroidRuntime(16287): at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:290)
10-20 15:28:41.035: E/AndroidRuntime(16287): at android.app.Activity.setContentView(Activity.java:1929)
10-20 15:28:41.035: E/AndroidRuntime(16287): at at.aec.solutions.pdftronviewer.MainActivity.onCreate(MainActivity.java:13)
10-20 15:28:41.035: E/AndroidRuntime(16287): at android.app.Activity.performCreate(Activity.java:5231)
10-20 15:28:41.035: E/AndroidRuntime(16287): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
10-20 15:28:41.035: E/AndroidRuntime(16287): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2148)
10-20 15:28:41.035: E/AndroidRuntime(16287): ... 11 more
But i didn't change anything on the project itself.
And here is the manifest:
<uses-sdk
android:minSdkVersion="15"
android:targetSdkVersion="21" />
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name=".MainActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
btw, any other raw resource works fine. Only pdfnet.res is making problems. And as told in the getting-started-guide, i can't do anything without this res file.
Is there maybe a problem with VIsual Studio 2005? I am using Eclipse for Android Development, but the extension .res is linked with VS 2005.
Thanks in advance, Lukas