×

Discussion Board

Results 1 to 10 of 10
  1. #1
    Regular Contributor
    Join Date
    Dec 2012
    Location
    India
    Posts
    271

    How to use Tantalum library

    Hello all,

    I read a lot about how useful tantalum library is.I have been trying to implement the same in my apps,however, I am unable to run the example applications itself.I am not able to run Tantulum form or LWUIT or S40 example.I get an error stating that many android packages are not found.Where am I going wrong?How to state that I am developing for S40 and not Android.

    Arun.

  2. #2
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,165

    Re: How to use Tantalum library

    Basically you might want to explain in details on which tools you are using, and step-by-step on what you are doing, and then also copy paste (at least partially) the actual error's shown. And also do mention on which step you got these errors.

    Have to admit that I'm not expert on tantalum, but in general you should provide as much information you can on teh problem you are having, it would increase the possibilities on somebody being able to find what is going wrong in there.

  3. #3
    Registered User
    Join Date
    Feb 2013
    Location
    Madrid
    Posts
    84

    Re: How to use Tantalum library

    Ok, I have the same problem yesterday. If you are running Tantalum 4 is important to take a look on the libs that you are adding to the Tantalum examples. They need android.jar from sdk-8 to compile, because Tantalum 4 is compatible for Android too. Try first with the project Tantalum4Library.

  4. #4
    Regular Contributor
    Join Date
    Dec 2012
    Location
    India
    Posts
    271

    Re: How to use Tantalum library

    I am using Nokia SDK 2.0, Netbeans IDE. I downloaded the tantalum4 zip from here.I tried to run the TantalumS40 example.I got the following errors :

    error: package android.content does not exist
    import android.content.Context;
    C:\Users\notebook\Desktop\New folder\Tantalum4 (1)\Tantalum4\Tantalum4Library\src\android\app\Activity.java:8: error: package android.os does not exist
    import android.os.Bundle;
    C:\Users\notebook\Desktop\New folder\Tantalum4 (1)\Tantalum4\Tantalum4Library\src\android\app\Activity.java:24: error: cannot find symbol
    protected void onCreate(Bundle savedInstanceState) {
    symbol: class Bundle
    location: class Activity
    C:\Users\notebook\Desktop\New folder\Tantalum4 (1)\Tantalum4\Tantalum4Library\src\android\app\Activity.java:50: error: cannot find symbol
    public Context getApplicationContext() {
    symbol: class Context
    location: class Activity
    C:\Users\notebook\Desktop\New folder\Tantalum4 (1)\Tantalum4\Tantalum4Library\src\android\database\sqlite\SQLiteOpenHelper.java:7: error: package android.content does not exist
    import android.content.Context;
    C:\Users\notebook\Desktop\New folder\Tantalum4 (1)\Tantalum4\Tantalum4Library\src\android\database\sqlite\SQLiteOpenHelper.java:26: error: cannot find symbol
    public SQLiteOpenHelper(Context context, String name, SQLiteDatabase.CursorFactory factory, int version) {
    symbol: class Context
    location: class SQLiteOpenHelper
    C:\Users\notebook\Desktop\New folder\Tantalum4 (1)\Tantalum4\Tantalum4Library\src\android\database\sqlite\SQLiteOpenHelper.java:26: error: package SQLiteDatabase does not exist
    public SQLiteOpenHelper(Context context, String name, SQLiteDatabase.CursorFactory factory, int version) {
    C:\Users\notebook\Desktop\New folder\Tantalum4 (1)\Tantalum4\Tantalum4Library\src\android\database\sqlite\SQLiteOpenHelper.java:34: error: cannot find symbol
    public SQLiteDatabase getWritableDatabase() throws SQLiteException {
    symbol: class SQLiteDatabase
    location: class SQLiteOpenHelper
    C:\Users\notebook\Desktop\New folder\Tantalum4 (1)\Tantalum4\Tantalum4Library\src\org\tantalum\android\AndroidCache.java:26: error: package android.content does not exist
    import android.content.ContentValues;
    C:\Users\notebook\Desktop\New folder\Tantalum4 (1)\Tantalum4\Tantalum4Library\src\org\tantalum\android\AndroidCache.java:27: error: package android.content does not exist
    import android.content.Context;
    C:\Users\notebook\Desktop\New folder\Tantalum4 (1)\Tantalum4\Tantalum4Library\src\org\tantalum\android\AndroidCache.java:28: error: cannot find symbol
    import android.database.Cursor;
    symbol: class Cursor
    location: package android.database
    C:\Users\notebook\Desktop\New folder\Tantalum4 (1)\Tantalum4\Tantalum4Library\src\org\tantalum\android\AndroidCache.java:29: error: cannot find symbol
    import android.database.sqlite.SQLiteDatabase;
    symbol: class SQLiteDatabase
    location: package android.database.sqlite
    C:\Users\notebook\Desktop\New folder\Tantalum4 (1)\Tantalum4\Tantalum4Library\src\org\tantalum\android\AndroidCache.java:80: error: cannot find symbol
    private static Context context;
    symbol: class Context
    location: class AndroidCache
    C:\Users\notebook\Desktop\New folder\Tantalum4 (1)\Tantalum4\Tantalum4Library\src\org\tantalum\android\AndroidCache.java:81: error: cannot find symbol
    private volatile SQLiteDatabase db = null;
    symbol: class SQLiteDatabase
    location: class AndroidCache
    C:\Users\notebook\Desktop\New folder\Tantalum4 (1)\Tantalum4\Tantalum4Library\src\org\tantalum\android\AndroidCache.java:89: error: cannot find symbol
    public static void setContext(final Context c) {
    symbol: class Context
    location: class AndroidCache
    C:\Users\notebook\Desktop\New folder\Tantalum4 (1)\Tantalum4\Tantalum4Library\src\org\tantalum\android\AndroidCache.java:116: error: cannot find symbol
    public void onCreate(SQLiteDatabase db) {
    symbol: class SQLiteDatabase
    location: class AndroidCache
    C:\Users\notebook\Desktop\New folder\Tantalum4 (1)\Tantalum4\Tantalum4Library\src\org\tantalum\android\AndroidCache.java:127: error: cannot find symbol
    public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
    symbol: class SQLiteDatabase
    location: class AndroidCache
    C:\Users\notebook\Desktop\New folder\Tantalum4 (1)\Tantalum4\Tantalum4Library\src\org\tantalum\android\AndroidImageTypeHandler.java:26: error: package android.graphics does not exist
    import android.graphics.BitmapFactory;
    C:\Users\notebook\Desktop\New folder\Tantalum4 (1)\Tantalum4\Tantalum4Library\src\org\tantalum\android\AndroidLog.java:26: error: package android.util does not exist
    import android.util.Log;
    C:\Users\notebook\Desktop\New folder\Tantalum4 (1)\Tantalum4\Tantalum4Library\src\org\tantalum\android\AndroidPlatformUtils.java:30: error: package java.net does not exist
    import java.net.HttpURLConnection;
    C:\Users\notebook\Desktop\New folder\Tantalum4 (1)\Tantalum4\Tantalum4Library\src\org\tantalum\android\AndroidPlatformUtils.java:31: error: package java.net does not exist
    import java.net.URL;
    C:\Users\notebook\Desktop\New folder\Tantalum4 (1)\Tantalum4\Tantalum4Library\src\org\tantalum\android\AndroidPlatformUtils.java:133: error: cannot find symbol
    final HttpURLConnection httpConnection;
    symbol: class HttpURLConnection
    location: class AndroidHttpConn
    C:\Users\notebook\Desktop\New folder\Tantalum4 (1)\Tantalum4\Tantalum4Library\src\org\tantalum\android\TantalumActivity.java:27: error: package android.os does not exist
    import android.os.Bundle;
    C:\Users\notebook\Desktop\New folder\Tantalum4 (1)\Tantalum4\Tantalum4Library\src\org\tantalum\android\TantalumActivity.java:54: error: cannot find symbol
    protected void onCreate(final Bundle savedInstanceState) {
    symbol: class Bundle
    location: class TantalumActivity
    C:\Users\notebook\Desktop\New folder\Tantalum4 (1)\Tantalum4\Tantalum4Library\src\org\tantalum\android\AndroidCache.java:140: error: cannot find symbol
    Cursor cursor = null;
    symbol: class Cursor
    location: class AndroidCache
    C:\Users\notebook\Desktop\New folder\Tantalum4 (1)\Tantalum4\Tantalum4Library\src\org\tantalum\android\AndroidCache.java:183: error: cannot find symbol
    final ContentValues values = new ContentValues();
    symbol: class ContentValues
    location: class AndroidCache
    C:\Users\notebook\Desktop\New folder\Tantalum4 (1)\Tantalum4\Tantalum4Library\src\org\tantalum\android\AndroidCache.java:183: error: cannot find symbol
    final ContentValues values = new ContentValues();
    symbol: class ContentValues
    location: class AndroidCache
    C:\Users\notebook\Desktop\New folder\Tantalum4 (1)\Tantalum4\Tantalum4Library\src\org\tantalum\android\AndroidCache.java:230: error: cannot find symbol
    Cursor cursor = null;
    symbol: class Cursor
    location: class AndroidCache
    C:\Users\notebook\Desktop\New folder\Tantalum4 (1)\Tantalum4\Tantalum4Library\src\org\tantalum\android\AndroidImageTypeHandler.java:40: error: cannot find symbol
    return BitmapFactory.decodeByteArray(bytes, 0, bytes.length);
    symbol: variable BitmapFactory
    location: class AndroidImageTypeHandler
    C:\Users\notebook\Desktop\New folder\Tantalum4 (1)\Tantalum4\Tantalum4Library\src\org\tantalum\android\AndroidLog.java:53: error: cannot find symbol
    Log.e(LOG_TANTALUM, message);
    symbol: variable Log
    location: class AndroidLog
    C:\Users\notebook\Desktop\New folder\Tantalum4 (1)\Tantalum4\Tantalum4Library\src\org\tantalum\android\AndroidLog.java:56: error: cannot find symbol
    Log.i(LOG_TANTALUM, message);
    symbol: variable Log
    location: class AndroidLog
    C:\Users\notebook\Desktop\New folder\Tantalum4 (1)\Tantalum4\Tantalum4Library\src\org\tantalum\android\AndroidPlatformUtils.java:148: error: cannot find symbol
    httpConnection = (HttpURLConnection) new URL(url).openConnection();
    symbol: class HttpURLConnection
    location: class AndroidHttpConn
    C:\Users\notebook\Desktop\New folder\Tantalum4 (1)\Tantalum4\Tantalum4Library\src\org\tantalum\android\AndroidPlatformUtils.java:148: error: cannot find symbol
    httpConnection = (HttpURLConnection) new URL(url).openConnection();
    symbol: class URL
    location: class AndroidHttpConn
    33 errors

    I can see that this is because a lot of Android Packages are being referenced. I found a file called android.jar in the library.However it is 5 MB in size! That seems to be too huge to be included into the project!

    I am totally clueless now on what to do now

  5. #5
    Registered User
    Join Date
    Feb 2013
    Location
    Madrid
    Posts
    84

    Re: How to use Tantalum library

    Just what I said in the post. You need to fix the import of the android.jar lib in your project.

    The first time you decompress the project, you can find the android.jar inside the Tantalum4Porject, dist folder, release folder, lib. Take this jar outside of the dist folder. put in other folder and fix the import of the Tantalum4Project, with the new path of the android.jar lib....try this please

  6. #6
    Regular Contributor
    Join Date
    Dec 2012
    Location
    India
    Posts
    271

    Re: How to use Tantalum library

    Thank you! It worked after I moved the android.jar to a different location!

    But now I am getting this error :

    Error preverifying class android.database.CursorJoiner$Result
    VERIFIER ERROR android/database/CursorJoiner$Result.valueOf(L
    java/lang/String; )Landroid/database/CursorJoiner$Result;:
    Illegal type in constant pool

  7. #7
    Registered User
    Join Date
    Feb 2013
    Location
    Madrid
    Posts
    84

    Re: How to use Tantalum library

    Is this when you are trying to complie the TantalumLibrary?

    Try to do it without obfuscation and without optimization

  8. #8
    Registered User
    Join Date
    Jan 2013
    Posts
    2

    Re: How to use Tantalum library

    To help you out I packaged the new Tantalum5 as a binary release. Please see https://github.com/TantalumMobile/Ta...ironment-setup and download from https://projects.developer.nokia.com/Tantalum

    Some of the other issues you faced:
    - Please use the pre-build binaries. You only need the source version if you want to modify the library itself or see how it works.
    - Android.jar is only needed if you are developing for Android or cross-platfrom JME and Android. It comes from Google when you install their Android SDK tools

  9. #9
    Nokia Developer Expert
    Join Date
    Aug 2011
    Posts
    555

    Re: How to use Tantalum library

    Also I would advise you to look at the PicasaViewer example that uses the Tantalum5 library. The example has been tested on Nokia Asha 501.

  10. #10
    Registered User
    Join Date
    Jan 2013
    Posts
    2

    Re: How to use Tantalum library

    Hi Arun,

    Some of the pre-release packaging for Tantalum 5 included a dependency on the android.jar which you get with an Android SDK installed on your machine. The latest release at https://projects.developer.nokia.com/Tantalum and the latest documentation PDF and JavaDocs available there should clear this up. You may also find https://github.com/TantalumMobile/Ta...ironment-setup helps in association with this latest release.

    Another easy way is to get the latest Nokia Asha SDK from https://developer.nokia.com/Develop/asha/. In the bundled Eclipse environment, you can create a Tantalum MIDlet with "new -> MIDlet -> Create midlet used a template"

    Hope this helps!

Similar Threads

  1. XML library
    By wftomas in forum Symbian Tools & SDKs
    Replies: 3
    Last Post: 2004-10-29, 18:37
  2. Library
    By mngassa in forum Symbian
    Replies: 1
    Last Post: 2003-09-10, 12:23
  3. How to use MMS Library
    By mc123 in forum General Messaging
    Replies: 2
    Last Post: 2003-05-22, 12:43

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×