Android Question Java Compile Error (2)

DavidTheGeek

Member
Licensed User
Longtime User
I attach my new project.

I follwed the instructions for a new installation on a new machine, and created a sample project with one button, which is the default new project. I just generated the members from the designer and ran it and got:

B4A Version: 12.80
Parsing code. (0.01s)
Java Version: 8
Building folders structure. (0.05s)
Running custom action. (0.05s)
Compiling code. (0.10s)
Compiling layouts code. (0.02s)
Organizing libraries. (0.01s)
(AndroidX SDK)
Compiling resources (0.09s)
Linking resources (0.26s)
Compiling debugger engine code. Error
B4A line: 11
Private Activity As Activity
shell\src\b4a\example\b4xmainpage_subs_0.java:58: error: cannot find symbol
b4xmainpage._activity = RemoteObject.createNew ("anywheresoftware.b4a.objects.ActivityWrapper");__ref.setField("_activity",b4xmainpage._activity);
^
symbol: variable _activity
location: class b4xmainpage
1 error
only showing the first 1 errors, of 2 total; use -Xmaxerrs if you would like to see more

What did I do wrong?
 

Attachments

  • Tester.zip
    155.7 KB · Views: 80

DavidTheGeek

Member
Licensed User
Longtime User
Thanks!

However, I did that and got:

B4A Version: 12.80
Parsing code. (0.02s)
Java Version: 8
Building folders structure. (0.01s)
Running custom action. (0.04s)
Compiling code. (0.07s)
Compiling layouts code. (0.00s)
Organizing libraries. (0.00s)
(AndroidX SDK)
Compiling resources (0.09s)
Linking resources (0.29s)
Compiling debugger engine code. (1.49s)
Compiling generated Java code. (1.36s)
Finding libraries that need to be dexed. (0.00s)
Dex code Error
Error in C:\Users\David\Documents\B4A\Projects\Tester\B4A\Objects\bin\classes\b4a\example\main$B4AMenuItemsClickListener.class:
java.lang.NullPointerException: Cannot invoke "String.length()" because "<parameter1>" is null
Compilation failed with an internal error.
Exception in thread "main" java.lang.RuntimeException: com.android.tools.r8.CompilationFailedException: Compilation failed to complete, origin: C:\Users\David\Documents\B4A\Projects\Tester\B4A\Objects\bin\classes\b4a\example\main$B4AMenuItemsClickListener.class
at com.android.tools.r8.internal.vj.a(R8_3.3.20-dev+aosp1_dd4c01853fd917497aef2d09abff533f0d25b062517ea74449d40e1778a34753:98)
at com.android.tools.r8.D8.main(R8_3.3.20-dev+aosp1_dd4c01853fd917497aef2d09abff533f0d25b062517ea74449d40e1778a34753:4)
Caused by: com.android.tools.r8.CompilationFailedException: Compilation failed to complete, origin: C:\Users\David\Documents\B4A\Projects\Tester\B4A\Objects\bin\classes\b4a\example\main$B4AMenuItemsClickListener.class

and more
 
Upvote 0
Top