I got solution(it worked for someone) for my problem:
Error with Autogenerated file BuildConfig.java - Android
Actually I do not have idea how to do this in Sybase unwired platform/eclipse:
"Fix project properties". Right click project-->android tools.
Note: I have generated code in Sybase unwired platfrom V2.1.3 for Android device.After this automatic code generation I'm getting this error, in following method:
The type android.content.Context cannot be resolved. It is indirectly referenced from required .class files
public static synchronized void setApplication(com.sybase.mobile.Application app)
{
com.sybase.sup.client.mbs.RegistryUtil.setApplicationContext(app.getInstance().getApplicationContext());
initialize();
}
How to solve this? Thanks.
Right click the project -> Properties -> Java Build Path -> Libraries -> Add Library -> Android Clathpath Container -> Select your project from avaliable projects in your workspace -> Finish.
Adding jar from Android SDK path...cleared the error. :)
Josh Edit: Basically I copied the file android.jar from my computer and added it to the path of my Sap Mobile Platform project, which is running on a remote virtual machine. These are the detailed steps (We all love detailed steps):
go to: YourAndroidSDKPath\sdk\platforms\android-17 (instead of 17 go to your version number)
...and copy the file android.jar somewhere else
Now, go to your SMP project, highlight the red "app.getInstance().getApplicationContext()" code where the error is, so that a yellow popup appears, with a hyperlink to "Fix Path"
Go to the Library tab, click on add external JAR, and browse to the android.jar file that you copied before.
Voila!!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With