haipv1108 / androjena

Automatically exported from code.google.com/p/androjena
0 stars 0 forks source link

Cannot find class inside Jena library #11

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1.
2.
3.

What is the expected output? What do you see instead?
Expected to print out some message on screen, but each time the application 
stopped unexpectedly. After checking the LogCat, it keeps telling that one of 
the class cannot find.

If you're using a real device and not the emulated AVD, what is the device
model?

What version of Android runs on your device/emulated AVD? (please put an X
next to the correct version)

Android 1.1
Android 1.5 (Cupcake)
Android 1.6 (Donut)
Android 2.0/2.1 (Eclair)
Android 2.2 (Froyo) X
Android 2.3 (Gingerbread)
Android 3.0/3.1 (Honeycomb)
Android ??? (Ice Cream Sandwich)

What version of Android is your application targeting? (please put an X
next to the correct version)

Android 1.1
Android 1.5 (Cupcake)
Android 1.6 (Donut)
Android 2.0/2.1 (Eclair)
Android 2.2 (Froyo) X
Android 2.3 (Gingerbread) X
Android 3.0/3.1 (Honeycomb)
Android ??? (Ice Cream Sandwich)

What IDE/environment are you developing with? (Eclipse w/ ADT, Android SDK
w/ Apache Ant, ...)
 Eclipse with ADT

What operating system and hardware is your IDE/development environment
running on?

Win 7
Please attach the following application files (when applicable):

- AndroidManifest.xml
- .classpath
- default.properties
- a full LogCat dump from application launch to exception/crash
- a meaningful portion of the source code where the exception is thrown

Please provide any additional detail below

Original issue reported on code.google.com by shaka...@gmail.com on 3 Apr 2012 at 8:09

Attachments:

GoogleCodeExporter commented 8 years ago
Hi shaka,
you get this error because the androjena.jar library (and possibly its 
dependencies) are not correctly referenced and packaged with your application. 
This happend to other users in the past, please take a look at the older issues 
for detailed instructions on how to correctly reference and package external 
libraries with an Android app (this comment in particular: 
http://code.google.com/p/androjena/issues/detail?id=5#c1).
Let me know it this solves the problem,
bye
lorenzo

Original comment by loreca...@gmail.com on 5 Apr 2012 at 7:00

GoogleCodeExporter commented 8 years ago
Hi Lorenzo,

First of all, thanks very much for your comment!
I have tried this method, but it did not solve my problem. Meanwhile, I have 
also tried the methods given in 
http://code.google.com/p/androjena/issues/detail?id=8&can=1&q=issue  which also 
did not work.
Feel quite strange and do not know why!

Original comment by shaka...@gmail.com on 9 Apr 2012 at 11:16

GoogleCodeExporter commented 8 years ago
Hi shaka,
I've looked at .classpath in your project:

<?xml version="1.0" encoding="UTF-8"?>
<classpath>
    <classpathentry kind="src" path="src"/>
    <classpathentry kind="src" path="gen"/>
    <classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
    <classpathentry kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>
    <classpathentry kind="lib" path="lib/iri-0.8.jar"/>
    <classpathentry kind="lib" path="lib/androjena_0.5_sources.jar"/>
    <classpathentry kind="lib" path="lib/androjena_0.5.jar"/>
    <classpathentry kind="lib" path="lib/slf4j-android-1.6.1-RC1.jar"/>
    <classpathentry kind="output" path="bin/classes"/>
</classpath>

There are two problems here:
- you should NOT reference androjena_0.5_sources.jar as a library (it's just 
the source code), so remove it from your classpath.
- you should reference icu4j-3.4.5.jar as a library, so add it to your 
classpath (you already have it in the lib folder of your project)

However, i tried to compile and run your project and it worked fine (it gave 
another error because data/rule.rule cannot be found, but the androjena classes 
are found). I use Eclipse Galileo with ADT 10.0.1.

Hope this solves your problem, please let me know
bye
lorenzo

Original comment by loreca...@gmail.com on 23 Apr 2012 at 6:23

GoogleCodeExporter commented 8 years ago
Hi Lorenzo,

This has solved my problem.
Thanks very much for your help!

Original comment by shaka...@gmail.com on 15 May 2012 at 4:27

GoogleCodeExporter commented 8 years ago

Original comment by loreca...@gmail.com on 31 May 2012 at 4:50