StephenBlackWasAlreadyTaken / xDrip

Android Application that collects dex signals, allows calibrations, and uploads
GNU General Public License v3.0
207 stars 176 forks source link

NPE in ActiveAndroid #190

Closed gwoody1984 closed 6 years ago

gwoody1984 commented 6 years ago

I clone the master branch of the project and am trying to debug in Android Studio, but ActiveAndroid seems to be having issues. I am not familiar with the ActiveAndroid project, but it complains about not being able to find the sensor table on startup. Actual error message is:

Exception 'java.lang.NullPointerException' occurred in thread 'main' at com.activeandroid.Cache.getTableName(:0)

Very generic error, but anyone else come across the same and know how to resolve this?

gwoody1984 commented 6 years ago

For anyone who might encounter the same, the issue was a problem with using gradle 2.0. It was built using gradle 1.3. The work around is to list the ActiveAndroid models in the manifest like so:

<meta-data android:name="AA_MODELS" android:value="com.eveningoutpost.dexdrip.Sensor, ...."

Found the fix in this thread