When I try to make a make an Android app with GreenDroid, so I put the code in there but it asks for a ;
while there already is one.
as people asked for the whole code hereby the whole code!
import greendroid.app.GDApplication;
import android.content.Intent;
import android.net.Uri;
public class GreenDroidTest extends GDApplication {
@Override
public Class<?> getHomeActivityClass() {
return GreenDroidTest.class;
}
@Override
public Intent getMainApplicationIntent() {
return new Intent(Intent.ACTION_VIEW, Uri.parse(getString(R.string.app_url)));
}
}
And I can't find any solutions. I already tried Cleaning and building the workspace.
Cut some of that nesting up into multiple lines. That way you can get better visibility as to the location the compiler is complaining about. For example
1 @Override
2 public Intent getMainApplicationIntent() {
3 return new Intent(Intent.ACTION_VIEW, Uri.parse(getString(R.string.app_url)));
4 }
might tell you a semicolon is needed at line 3, but
1 @Override
2 public Intent getMainApplicationIntent() {
3 return new Intent(
4 Intent.ACTION_VIEW,
5 Uri.parse(
6 getString(
7 R.string.app_url
8 )
9 )
10 );
11 }
might tell you a semicolon is needed at line 8.
After you have identified where the semicolon is needed, you can happily put the line back together, with a semicolon in the "right" spot.