wesley tanaka

Tech

WARNING: Class Joiner loaded from appengine.jar has a dependency which is not part of App Engine's supported API

()

Using optimizeWar = true in gradle-gae-plugin will cause it to run fatJarPrepareFiles and fatJar which expand all of your dependency .jar files into .class files and then re-combine them all into a single appengine.jar file. Depending on what you have in your dependencies block, this can sometimes cause:

bootstrap class path not set in conjunction with -source 1.6

()

Running a simple build.gradle file with sourceCompatibility = 1.6 with Oracle's JDK 1.7

apply plugin: 'java'
defaultTasks 'build'
sourceCompatibility = 1.6

repositories {
  mavenCentral()
}

dependencies {
  testCompile 'junit:junit:3.8'
}

will cause this warning to be emitted by the JVM:

Upgrading Gradle to the latest version 1.6 or 1.7 on Ubuntu 12.04 (Precise Pangolin)

()

Ubuntu 12.04.3 has an old version of Gradle (1.0-milestone-3 from September 2011) installed by default.  To upgrade to a later version of Gradle, you can use Cheng-Wei Chien's PPA for Gradle at https://launchpad.net/~cwchien/+archive/gradle by issuing the following commands:

sudo add-apt-repository ppa:cwchien/gradle
sudo apt-get update

Then, to install Gradle 1.6

Setting a system property in Gradle

()

Java system properties can be specified in Gradle by creating a file in one of these locations:

  • $HOME/.gradle/gradle.properties
  • $MAIN_PROJECT_DIR/gradle.properties

And creating a property name that's prefixed with systemProp. For example, to set a system property called appengine.sdk.root, you'd create a gradle.properties file with this contents:

systemProp.appengine.sdk.root=/path/to/your/appengine-java-sdk

What is Groovy?

()

I started looking at Groovy the other day while trying to understand how Gradle works.  Here are some initial impressions:

What is Gradle? (comparison of gradle vs ant vs make)

()

Gradle is a build tool similar to make or ant which is being adopted by the Android project as a replacement for ant scripts and the automated "build" step in Eclipse.

There's a useful book about Gradle available online for free at http://www.gradleware.com/registered/books/building-and-testing/

Here is a comparison between gradle and two other commonly used build tools:

Android SQLiteOpenHelper onUpgrade()

()

It's not necessary to wrap your SQLiteOpenHelper.onUpgrade() code in beginTransaction() and endTransaction() pairs, because ever since the earliest version of SQLiteOpenHelper, the Android source code has done this for you:

Query the COUNT of rows in a SQLite table in Android

()

There's a function DatabaseUtils.queryNumEntries() which can be used to query SELECT COUNT(*) FROM table; in a SQLite database in Android.

java.lang.VerifyError: com.google.analytics.tracking.android.AppFieldsDefaultProvider

()

The Google Analytics SDK for Android v3 (Beta) does not support Android 1.5 (API version 3).  When you try to call EasyTracker.getInstance(this).activityStart(this); you will get this error:

java.lang.IllegalStateException: attempt to acquire a reference on a close SQLiteClosable

()

"java.lang.IllegalStateException: attempt to acquire a reference on a close SQLiteClosable" can occur in an Android program if you try to do an operation (like run a .query()) on a SQLiteDatabase object which has already been

Syndicate content
by Wesley Tanaka