on 06-03-2013 11:52 AM
Dear All,
I am using Sybase Unwired Workspace( Mobile SDK) version 2.1 esd 3.
When I am adding an MBO in my Mobile App project. It gives out a error:
> Invalid attribute name : '<mbo name>-TYPE'.name cannot be a Java or C# language keyboard
When I am trying to generate the code, it gives out a information message:
> The third-party class 'android.content.Context' cannot be found
When I am generating code. In the 'src' folder the program '<project name>DB.java' program I'm getting error in the following code:
How to overcome these errors.
SUP wont allow you to create your MBO attributes with keywords like TYPE. Use any other Name for your attribute or just modify "TYPE" to "_TYPE" as said above.
Regards
Srinivas.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
just change your attirbute "TYPE" to another name (like "_TYPE") to fix the first error: Invalid attribute name : '<mbo name>-TYPE'.name cannot be a Java or C# language keyboard. I think it is the main cause.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Supriyo,
When you right click and say generate code it starts a wizard..... In the last step of the wizard it asks for Third-party jar file so here you need to provide Android API file ie. Android.jar.
You will find this file in android sdk (<path>\android-sdk\platforms\android-8\Android.jar).....
After this copy your code in Android Project.....
Still you will find some errors....
Now you need to copy some more jar files into your android project's lib directory....
Go to C:\Sybase\UnwiredPlatform\MobileSDK22\ObjectAPI\Android\ copy all jar files....
Also copy that armeabi folder in same directory....
After this right click on project -> go to properties -> Java Build Path -> Libraries -> Add Jar
Select all jar files from the lib directory....
Over.....
Regards
ShashanK MarathE
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The third-party class 'android.content.Context' cannot be found
Once you add the code to the Eclipse environment where you develop the android app this error will be solved. It is related to the missing of the android context.
The image is not clear. The image texts are given below:
public static synchronized void setApplication(com.sybase.mobile.Application app)
{
com.sybase.sup.client.mbs.RegistryUtil.setApplicationContext(app.getInstance().getApplicationContext());
initialize();
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.