Unfortunately there is no easier way than looping. This post is about doing the opposite but the idea is the same...
Since another answer recommends Apache Commons and you are on Android - if I were to include an additional dependency I would rather go for guava Longs utility class:
long[] primitive = Longs.toArray(listOfLongObjects);
For reference, the code is:
public static long[] toArray(Collection<? extends Number> collection) {
if (collection instanceof LongArrayAsList) {
return ((LongArrayAsList) collection).toLongArray();
}
Object[] boxedArray = collection.toArray();
int len = boxedArray.length;
long[] array = new long[len];
for (int i = 0; i < len; i++) {
// checkNotNull for GWT (do not optimize)
array[i] = ((Number) checkNotNull(boxedArray[i])).longValue();
}
return array;
}