Chris from Stafford
Aspiring developer
Profile
Posts: 335
Reg: Oct 14, 2013
Stafford
5,750
07/05/17 10:23 AM (7 years ago)

Android errors

I feel I am getting somewhere with Android Studio but being not great with coding I have always found it a struggle. Started from scratch with a clean install of the software and added the SDK's & libraries etc. I have got rid of most of the 275 errors I had before - got rid of the NDK error ( not exactly sure how - but it's gone) Just these are flagging up - but unsure exactly what they mean: /Users/christopheremery/Downloads/nssc_Android_BTv4/app/src/main/java/com/nssc/core/BT_application.java:41: error: package com.bmsreferralandroid.database does not exist import com.bmsreferralandroid.database.BT_database; ^ /Users/christopheremery/Downloads/nssc_Android_BTv4/app/src/main/java/com/nssc/core/BT_application.java:417: error: package BT_database does not exist Cursor cursor = bmsreferralandroid_appDelegate.getContext().getContentResolver().query(BT_contract.BT_Screens.CONTENT_URI, BT_contract.BT_Screens.PROJECTION_ALL, BT_database.BT_SCREENS_COLUMNS.ITEM_ID + "=?", args, BT_contract.BT_Screens.DEFAULT_SORT + " LIMIT 1"); ^ /Users/christopheremery/Downloads/nssc_Android_BTv4/app/src/main/java/com/nssc/core/BT_application.java:417: error: cannot find symbol Cursor cursor = bmsreferralandroid_appDelegate.getContext().getContentResolver().query(BT_contract.BT_Screens.CONTENT_URI, BT_contract.BT_Screens.PROJECTION_ALL, BT_database.BT_SCREENS_COLUMNS.ITEM_ID + "=?", args, BT_contract.BT_Screens.DEFAULT_SORT + " LIMIT 1"); ^ symbol: variable bmsreferralandroid_appDelegate location: class BT_application Note: Some input files use or override a deprecated API. Note: Recompile with -Xlint:deprecation for details. 3 errors :app:compileDebugJavaWithJavac FAILED FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':app:compileDebugJavaWithJavac'. > Compilation failed; see the compiler error output for details. * Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. BUILD FAILED Seems it's something to do with the BT_database - does anyone know what it could be I'm doing wrong. Maybe I'm missing some settings in Android Studio.
 
AlanMac
Aspiring developer
Profile
Posts: 2612
Reg: Mar 05, 2012
Esher, UK
37,120
like
07/06/17 01:56 AM (7 years ago)
I believe I found the same thing and I think it means the BT database can't be found. The problem starts in BT_application.java. The import statement that fails is: import com.bmsreferralandroid.database.BT_database;
 
Chris from Staffor...
Aspiring developer
Profile
Posts: 335
Reg: Oct 14, 2013
Stafford
5,750
like
07/06/17 09:19 AM (7 years ago)
Thanks Alan - is there a way around it or is it something that needs fixing in Buzztouch?
 
AlanMac
Aspiring developer
Profile
Posts: 2612
Reg: Mar 05, 2012
Esher, UK
37,120
like
07/06/17 09:35 AM (7 years ago)
One for Buzztouch I believe. If there is a fix I don 't know it.
 
chris1
Code is Art
Profile
Posts: 3862
Reg: Aug 10, 2012
Austin, TX
50,120
like
07/06/17 07:34 PM (7 years ago)
I just uploaded some changes. This should fix the issue you were experiencing.
 
AlanMac
Aspiring developer
Profile
Posts: 2612
Reg: Mar 05, 2012
Esher, UK
37,120
like
07/07/17 05:35 AM (7 years ago)
fixed it for me, thanks @Chris1
 
Chris from Staffor...
Aspiring developer
Profile
Posts: 335
Reg: Oct 14, 2013
Stafford
5,750
like
07/07/17 09:34 AM (7 years ago)
Not for me - maybe I have some build settings wrong in Android Studio. Do you think that could be it? It seems to be going ok then I get a fatal exception error: -07 17:29:01.366 28652-28652/? E/AndroidRuntime: FATAL EXCEPTION: main Process: com.nssc, PID: 28652 java.lang.IllegalStateException: Can not perform this action after onSaveInstanceState at android.support.v4.app.FragmentManagerImpl.checkStateLoss(FragmentManager.java:1832) at android.support.v4.app.FragmentManagerImpl.enqueueAction(FragmentManager.java:1850) at android.support.v4.app.BackStackRecord.commitInternal(BackStackRecord.java:643) at android.support.v4.app.BackStackRecord.commit(BackStackRecord.java:603) at com.nssc.ui.bt_screens.BT_activity_host.showFragmentForPlugin(BT_activity_host.java:794) at com.nssc.ui.bt_screens.BT_activity_host$6.onDataReady(BT_activity_host.java:824) at com.nssc.core.BT_application$5$1.run(BT_application.java:448) at android.os.Handler.handleCallback(Handler.java:733) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:146) at android.app.ActivityThread.main(ActivityThread.java:5598) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:515) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1283) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1099) at dalvik.system.NativeStart.main(Native Method) 07-07 17:29:01.376 28652-28652/? I/Process: Sending signal. PID: 28652 SIG: 9
 
AlanMac
Aspiring developer
Profile
Posts: 2612
Reg: Mar 05, 2012
Esher, UK
37,120
like
07/07/17 11:48 PM (7 years ago)
Before it wouldn't compile. This looks like a different problem. I'm not an android guru but to me, the log suggests that the app compiles and crashes. Why I can't tell, but in my experience it could be a a 3rd party plugin that is not BT4 compatible.
 
Chris from Staffor...
Aspiring developer
Profile
Posts: 335
Reg: Oct 14, 2013
Stafford
5,750
like
07/08/17 02:49 AM (7 years ago)
Very odd but although it says there is a fatal exception the App had loaded onto my device and it works! Will see what happens when I build the APK & post again. Same result with a very simple test app - Android Studio says build failed but it's on my device. Android is very confusing and frustrating. If any Android gurus out there do pick up on the thread I would welcome any thoughts
 
Chris from Staffor...
Aspiring developer
Profile
Posts: 335
Reg: Oct 14, 2013
Stafford
5,750
like
07/08/17 07:01 AM (7 years ago)
Ok success - I can compile and run the app on my device now but Maps just won't work for some reason. Here's the error I'm getting: 07-08 14:56:03.185 676-676/com.nssc E/AndroidRuntime: FATAL EXCEPTION: main Process: com.nssc, PID: 676 java.lang.NullPointerException at com.nssc.ui.bt_screens.BT_screen_map.onCreateView(BT_screen_map.java:196) at android.support.v4.app.Fragment.performCreateView(Fragment.java:2184) at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1298) at android.support.v4.app.FragmentManagerImpl.moveFragmentsToInvisible(FragmentManager.java:2323) at android.support.v4.app.FragmentManagerImpl.executeOpsTogether(FragmentManager.java:2136) at android.support.v4.app.FragmentManagerImpl.optimizeAndExecuteOps(FragmentManager.java:2092) at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1998) at android.support.v4.app.FragmentManagerImpl$1.run(FragmentManager.java:709) at android.os.Handler.handleCallback(Handler.java:733) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:146) at android.app.ActivityThread.main(ActivityThread.java:5598) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:515) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1283) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1099) at dalvik.system.NativeStart.main(Native Method) 07-08 14:56:05.187 676-1329/com.nssc W/DynamiteModule: Local module descriptor class for com.google.android.gms.googlecertificates not found. 07-08 14:56:05.197 676-1329/com.nssc I/DynamiteModule: Considering local module com.google.android.gms.googlecertificates:0 and remote module com.google.android.gms.googlecertificates:3 07-08 14:56:05.197 676-1329/com.nssc I/DynamiteModule: Selected remote version of com.google.android.gms.googlecertificates, version >= 3 07-08 14:56:05.217 676-1329/com.nssc I/dalvikvm: Could not find method android.content.ContextWrapper.createCredentialProtectedStorageContext, referenced from method as.createCredentialProtectedStorageContext 07-08 14:56:05.217 676-1329/com.nssc W/dalvikvm: VFY: unable to resolve virtual method 65: Landroid/content/ContextWrapper;.createCredentialProtectedStorageContext ()Landroid/content/Context; 07-08 14:56:05.217 676-1329/com.nssc D/dalvikvm: VFY: replacing opcode 0x6f at 0x0002 07-08 14:56:05.217 676-1329/com.nssc I/dalvikvm: Could not find method android.content.ContextWrapper.createDeviceProtectedStorageContext, referenced from method as.createDeviceProtectedStorageContext 07-08 14:56:05.217 676-1329/com.nssc W/dalvikvm: VFY: unable to resolve virtual method 66: Landroid/content/ContextWrapper;.createDeviceProtectedStorageContext ()Landroid/content/Context; 07-08 14:56:05.217 676-1329/com.nssc D/dalvikvm: VFY: replacing opcode 0x6f at 0x0002 07-08 14:56:05.227 676-1329/com.nssc I/dalvikvm: Could not find method b.createCredentialProtectedStorageContext, referenced from method c.createCredentialProtectedStorageContext 07-08 14:56:05.227 676-1329/com.nssc W/dalvikvm: VFY: unable to resolve virtual method 171: Lb;.createCredentialProtectedStorageContext ()Landroid/content/Context; 07-08 14:56:05.227 676-1329/com.nssc D/dalvikvm: VFY: replacing opcode 0x6f at 0x0002 07-08 14:56:05.227 676-1329/com.nssc I/dalvikvm: Could not find method b.createDeviceProtectedStorageContext, referenced from method c.createDeviceProtectedStorageContext 07-08 14:56:05.227 676-1329/com.nssc W/dalvikvm: VFY: unable to resolve virtual method 172: Lb;.createDeviceProtectedStorageContext ()Landroid/content/Context; 07-08 14:56:05.227 676-1329/com.nssc D/dalvikvm: VFY: replacing opcode 0x6f at 0x0002 07-08 14:56:05.237 676-1329/com.nssc D/dalvikvm: DexOpt: couldn't find static field Landroid/os/Build;.SUPPORTED_64_BIT_ABIS 07-08 14:56:05.237 676-1329/com.nssc W/dalvikvm: VFY: unable to resolve static field 115 (SUPPORTED_64_BIT_ABIS) in Landroid/os/Build; 07-08 14:56:05.247 676-1329/com.nssc D/dalvikvm: VFY: replacing opcode 0x62 at 0x0012 07-08 14:56:05.247 676-1329/com.nssc D/dalvikvm: DexOpt: couldn't find static field Landroid/os/Build;.SUPPORTED_32_BIT_ABIS 07-08 14:56:05.247 676-1329/com.nssc W/dalvikvm: VFY: unable to resolve static field 114 (SUPPORTED_32_BIT_ABIS) in Landroid/os/Build; 07-08 14:56:05.247 676-1329/com.nssc D/dalvikvm: VFY: replacing opcode 0x62 at 0x0021 07-08 14:56:05.247 676-1329/com.nssc D/dalvikvm: DexOpt: couldn't find static field Landroid/os/Build;.SUPPORTED_64_BIT_ABIS 07-08 14:56:05.247 676-1329/com.nssc W/dalvikvm: VFY: unable to resolve static field 115 (SUPPORTED_64_BIT_ABIS) in Landroid/os/Build; 07-08 14:56:05.247 676-1329/com.nssc D/dalvikvm: VFY: replacing opcode 0x62 at 0x0008 07-08 14:56:05.247 676-1329/com.nssc D/dalvikvm: DexOpt: couldn't find static field Landroid/os/Build;.SUPPORTED_64_BIT_ABIS 07-08 14:56:05.247 676-1329/com.nssc I/dalvikvm: DexOpt: unable to optimize static field ref 0x0073 at 0x17 in Lw;.a 07-08 14:56:05.247 676-1329/com.nssc D/dalvikvm: DexOpt: couldn't find static field Landroid/os/Build;.SUPPORTED_32_BIT_ABIS 07-08 14:56:05.247 676-1329/com.nssc I/dalvikvm: DexOpt: unable to optimize static field ref 0x0072 at 0x26 in Lw;.a 07-08 14:56:05.247 676-1329/com.nssc D/dalvikvm: DexOpt: couldn't find static field Landroid/os/Build;.SUPPORTED_64_BIT_ABIS 07-08 14:56:05.247 676-1329/com.nssc I/dalvikvm: DexOpt: unable to optimize static field ref 0x0073 at 0x0d in Lw;.b 07-08 14:56:05.717 676-676/com.nssc I/Process: Sending signal. PID: 676 SIG: 9 I have the API key set up, so just can't figure this one out - unless there is a bug of course
 
chris1
Code is Art
Profile
Posts: 3862
Reg: Aug 10, 2012
Austin, TX
50,120
like
07/08/17 07:10 AM (7 years ago)
Please report bugs using the bug report page. Please also link your app's dataUrl in that form so I can make sure I am testing against a similar environment as you.
 
Chris from Staffor...
Aspiring developer
Profile
Posts: 335
Reg: Oct 14, 2013
Stafford
5,750
like
07/08/17 07:14 AM (7 years ago)
I'm not sure it is a bug - I'm playing about with google play settings & API's now - will probably start from scratch and check I have all the libraries etc
 
chris1
Code is Art
Profile
Posts: 3862
Reg: Aug 10, 2012
Austin, TX
50,120
like
07/08/17 07:15 AM (7 years ago)
Please post it there anyway so I can check it out. If it's not a bug, no big deal.
 
Chris from Staffor...
Aspiring developer
Profile
Posts: 335
Reg: Oct 14, 2013
Stafford
5,750
like
07/08/17 07:20 AM (7 years ago)
Posted - thanks
 
Chris from Staffor...
Aspiring developer
Profile
Posts: 335
Reg: Oct 14, 2013
Stafford
5,750
like
07/10/17 10:55 AM (7 years ago)
Latest update Have built the APK and it builds fine and installs ok on device The only problem I have now is that Location Map still crashes the app
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.