More than one-hundred buildings were damaged as tremors were felt in central and western regions of the island and even in Jakarta.
The quake was about 56 miles (91km) deep and located just inland, the US Geological Survey said.
There was no immediate indication of a tsunami, but authorities said they had issued a warning following the tremor, which struck a coastal region some 300 kilometres (190 miles) from the capital.
The quake struck at 11.47pm (12.47am HKT) only about 350 kilometres southeast of Jakarta.
He posted on his Twitter page photos of people scouring collapsed buildings.
An natural disaster recorded at 7.3 magnitude on the Richter scale shook Tasikmalaya, West Java late Friday evening, killing at least one person, local media reported.
OnePlus 5T Star Wars Limited Edition Variants Launch
I wouldn't call myself a super fan of the series, but I've seen all the movies and do enjoy the depth of the Star Wars universe. Apart from the minimal design changes, the Star Wars Edition of the phone doesn't differ much from the original OnePlus 5T .
Residents were advised to return to their homes but seek temporary shelter if the dwellings aren't safe. But there have not been reports of deaths or major damage, the spokesman said.
Almost three people were killed and seven injured in a 6.5-magnitude quake that struck the Indonesian island of Java damaging 950 buildings, officials said on Saturday.
"Suddenly, we felt dizzy... We then realised it was a quake and immediately ran downstairs", Warouw said. There has been no tsunami reported on the southern coast of Java.
The worst affected areas were in West Java and include Pangandaran, Ciamis and Tasikmalaya, which is located in Cipatujah and has a population of 1.7 million.
Indonesia experiences frequent seismic and volcanic activity due to its position on the Pacific "Ring of Fire", where tectonic plates collide.
An natural disaster struck Aceh again in December 2016, killing more than 100 people, injuring many others and leaving tens of thousands homeless.