Brandsum Well-Known Member Licensed User Nov 11, 2019 #1 Hi, I was trying to extend ARActivity from ARToolkit. But while compiling I got this error, Code: Copy B4A Version: 9.50 Java Version: 8 Parsing code. (0.00s) Building folders structure. (6.84s) Compiling code. (2.49s) Compiling layouts code. (0.00s) Organizing libraries. (0.00s) (AndroidX SDK) Generating R file. (9.43s) Compiling generated Java code. Error javac 1.8.0_191 src\b4a\example\main.java:182: error: onStop() in main cannot override onStop() in ARActivity protected void onStop() { ^ attempting to assign weaker access privileges; was public Note: src\b4a\example\starter.java uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. 1 error So what I understand is the onStop function is defined as public in ARActivity. But the same onStop function is defined as protected in B4A Activity. Code: Copy protected void onStop() { '<- this auto generated line super.onStop(); processBA.runHook("onstop", this, null); } Does anyone have any idea how can I change the onStop method privilege from protected to public in B4AActivity? Last edited: Nov 11, 2019
Hi, I was trying to extend ARActivity from ARToolkit. But while compiling I got this error, Code: Copy B4A Version: 9.50 Java Version: 8 Parsing code. (0.00s) Building folders structure. (6.84s) Compiling code. (2.49s) Compiling layouts code. (0.00s) Organizing libraries. (0.00s) (AndroidX SDK) Generating R file. (9.43s) Compiling generated Java code. Error javac 1.8.0_191 src\b4a\example\main.java:182: error: onStop() in main cannot override onStop() in ARActivity protected void onStop() { ^ attempting to assign weaker access privileges; was public Note: src\b4a\example\starter.java uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. 1 error So what I understand is the onStop function is defined as public in ARActivity. But the same onStop function is defined as protected in B4A Activity. Code: Copy protected void onStop() { '<- this auto generated line super.onStop(); processBA.runHook("onstop", this, null); } Does anyone have any idea how can I change the onStop method privilege from protected to public in B4AActivity?
Erel B4X founder Staff member Licensed User Longtime User Nov 12, 2019 #2 onStop is a protected method in the native Activity class. You cannot make it public. Upvote 0