Open Alkene opened 6 years ago
With those changes it compiles and does not crash for me: https://github.com/StephenBlackWasAlreadyTaken/NightWatch/pull/100
Hi, did you get it working? I'm using studio3 branch but APK is crashing every time at the beginning. I can compile it succesfully. Same result in emulator and in Hardware. Just wondering if there is something wrong in my android studio& setup in general.
Kind of. After AdrianLxM made the changes I'm able to make a signed APK and install it separate from Android Studio, (via email it to myself and open) and it will run on my phone. But if I try and use USB to put it on phone to use debugging or what not, it crashes every time either in the emulator or by phone. I was able to enter the debugger on my watch by enabling debugging by wifi though. Just can't get into the debugger for the code that is run on the phone.
I was able to get my own APK working after disabling "Instant run". If instant run was enabled, I got following error:
02-08 00:59:03.843 9771-9771/com.dexdrip.stephenblack.nightwatch E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.dexdrip.stephenblack.nightwatch, PID: 9771
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.dexdrip.stephenblack.nightwatch/com.dexdrip.stephenblack.nightwatch.activities.Home}: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String com.activeandroid.TableInfo.getIdName()' on a null object reference
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2724)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2785)
at android.app.ActivityThread.-wrap12(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1532)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:163)
at android.app.ActivityThread.main(ActivityThread.java:6342)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:880)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:770)
Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String com.activeandroid.TableInfo.getIdName()' on a null object reference
at com.activeandroid.Model.
When I try and compile the code and build an APK using Android Studio 3.0.1, I get a error message: Error:Unsupported method: BaseConfig.getApplicationIdSuffix(). The version of Gradle you connect to does not support that method. To resolve the problem you can change/upgrade the target version of Gradle you connect to. Alternatively, you can ignore this exception and read other information from the model. If I increase the gradle version to 2.3.2 as seen on this website: https://stackoverflow.com/questions/44546849/unsupported-method-baseconfig-getapplicationidsuffix I can get it to compile, but the app crashes immediately when I try and run the build on my phone. Any suggestions?