Back to project page android-gradle-template.
The source code is released under:
Apache License
If you think the Android project android-gradle-template listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.example.gradle_example; //from w w w .ja v a2s .co m import org.joda.time.DateTime; import android.app.Activity; import android.os.Bundle; import android.view.Menu; public class MainActivity extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); final DateTime dt = new DateTime(); System.out.println("Year: " + dt.getYear()); } @Override public boolean onCreateOptionsMenu(Menu menu) { // Inflate the menu; this adds items to the action bar if it is present. getMenuInflater().inflate(R.menu.main, menu); return true; } }