Android Question [RESOLVED] AppCompatToolbar1 - Error when compiling

Jmu5667

Well-Known Member
Licensed User
Hi

I get the following error when compiling:

B4X:
B4A Version: 8.80
Parsing code.    (0.00s)
Building folders structure.    (0.06s)
Compiling code.    (0.03s)
  
ObfuscatorMap.txt file created in Objects folder.
Compiling layouts code.    (0.03s)
Organizing libraries.    (3.37s)
Generating R file.    (0.92s)
Compiling generated Java code.    Error
javac 1.8.0_181
src\de\amberhome\appcompat\toolbarexample1\main.java:332: error: cannot find symbol
public de.amberhome.objects.appcompat.AppCompatBase _v6 = null;
                                     ^
  symbol:   class AppCompatBase
  location: package de.amberhome.objects.appcompat
1 error

AppCompay Lib v4.0
Core v 8.80
XmlLayoutBuilder V1.0

Any ideas.

J.
 

DonManfred

Expert
Licensed User
What is the version of AppCompat Library?

It should be V3.52
 
Upvote 0

Jmu5667

Well-Known Member
Licensed User
Just down graded tp v.352 get the same:

B4X:
B4A Version: 8.80
Parsing code.    (0.00s)
Building folders structure.    (0.06s)
Compiling code.    (0.04s)
   
ObfuscatorMap.txt file created in Objects folder.
Compiling layouts code.    (0.01s)
Organizing libraries.    (0.00s)
Generating R file.    (0.95s)
Compiling generated Java code.    Error
javac 1.8.0_181
src\de\amberhome\appcompat\toolbarexample1\main.java:332: error: cannot find symbol
public de.amberhome.objects.appcompat.AppCompatBase _v6 = null;
                                     ^
  symbol:   class AppCompatBase
  location: package de.amberhome.objects.appcompat
1 error
 
Upvote 0

DonManfred

Expert
Licensed User
Latest Version 4.0

V4.00
  • Change: Compiled against 28.0.0 Support library
  • New: Styles for most Views

Ohh... should be 4.0 then


Ok. Let´s start again fresh:

- You are using the B4A SDK Manager?
- All Items are UpToDate?
- You are using Android.jar from platform 28? Tools->Configure paths
 
Last edited:
Upvote 0

DonManfred

Expert
Licensed User
I just tried an app from me. first i updated AppCompat from 3.52 to 4.0

I then did a compile
B4A Version: 8.80
Parsing code. (0.06s)
Building folders structure. (0.11s)
Compiling code. (0.10s)
Compiling layouts code. (0.01s)
Organizing libraries. (2.98s)
Running custom action. (0.20s)
Generating R file. (1.98s)
Compiling generated Java code. (5.60s)
Convert byte code - optimized dex. (47.84s)
Packaging files. (3.52s)
Copying libraries resources (0.07s)
Found 26 resource files.
Signing package file (private key). (1.89s)
ZipAlign file. (0.08s)
Installing file to device. (1.76s)
Installing with B4A-Bridge.
Completed successfully.
 
Upvote 0

Jmu5667

Well-Known Member
Licensed User
Ohh... should be 4.0 then


Ok. Let´s start again fresh:

- You are using the B4A SDK Manager?
- All Items are UpToDate?
- You are using Android.jar from platform 28? Tools->Configure paths

B4A SDK Manager - Yes
All Items are UpToDate? - Yes, this moring
You are using Android.jar from platform 28? Tools->Configure paths - Yes

I will put back lib 4.0, the error I am getting, what is it referring too, the appcompat lib, or my configuration ? It would be useful to know this.
 
Upvote 0

DonManfred

Expert
Licensed User
You are using Android.jar from platform 28? Tools->Configure paths - Yes

I will put back lib 4.0, the error I am getting, what is it referring too, the appcompat lib, or my configuration ? It would be useful to know this.
Honestly i´m not sure actually. I would guess your configuration.

- Please post a Screenshot from your SDK Manager main window (to see the path to the bat file)
- Please post a screenshot from Tools Configure paths to see the path of the Android.jar

Or just post the full path of both: bat file in SDK Manager and android.jar in tools configure paths

This are my two
- D:\AndroidSDK\tools\bin\sdkmanager.bat
- D:\AndroidSDK\platforms\android-28\android.jar

Please note that the base path should be identic:
Base in this case: D:\AndroidSDK
 
Last edited:
Upvote 0

DonManfred

Expert
Licensed User
This is the example project I am using
The folder \resource is missing in the zip

But even if i comment the line it compiles fine

B4A Version: 8.80
Parsing code. (0.00s)
Building folders structure. (0.06s)
Compiling code. (0.01s)
Compiling layouts code. (0.00s)
Organizing libraries. (0.00s)
Generating R file. (0.64s)
Compiling generated Java code. (1.91s)
Convert byte code - optimized dex. (11.23s)
Packaging files. (1.35s)
Copying libraries resources (0.01s)
Signing package file (private key). (1.05s)
ZipAlign file. (0.05s)
Installing file to device. (2.10s)
Installing with B4A-Bridge.
Completed successfully.

But it then crashes about the missing resourcefolder. But it compiles fine...
 
Upvote 0

Jmu5667

Well-Known Member
Licensed User
Honestly i´m not sure actually. I would guess your configuration.

- Please post a Screenshot from your SDK Manager main window (to see the path to the bat file)
- Please post a screenshot from Tools Configure paths to see the path of the Android.jar

Or just post the full path of both: bat file in SDK Manager and android.jar in tools configure paths


upload_2019-1-18_10-45-9.png


upload_2019-1-18_10-43-36.png
 
Upvote 0

DonManfred

Expert
Licensed User
If it still does not work you can also try this tutorial: https://www.b4x.com/android/forum/threads/ready-to-run-sdk.99780/
I did not used it though.

I´m a bit lost if it still does not work

Last note: Make sure not to reuse an old sdk folder.
Start with a blank folder, download the zip and extract the tools folder to the empty folder...
 
Upvote 0

Jmu5667

Well-Known Member
Licensed User
After new install problem still persists, do you have a sample app you have done that I could try using the AppCompat Lib. Thanks

B4X:
B4A Version: 8.80
Parsing code.    (0.00s)
Building folders structure.    (0.14s)
Compiling code.    (0.03s)
   
ObfuscatorMap.txt file created in Objects folder.
Compiling layouts code.    (0.03s)
Organizing libraries.    (2.39s)
Generating R file.    (0.89s)
Compiling generated Java code.    Error
javac 1.8.0_181
src\de\amberhome\appcompat\toolbarexample1\main.java:332: error: cannot find symbol
public de.amberhome.objects.appcompat.AppCompatBase _v6 = null;
                                     ^
  symbol:   class AppCompatBase
  location: package de.amberhome.objects.appcompat
1 error
 
Upvote 0

Jmu5667

Well-Known Member
Licensed User
i did used your example app uploaded above. Works.

Here another one (working for me too)

Appcompat 4.0 is used
Thanks Don, this is doing my head in !

B4X:
B4A Version: 8.80
Parsing code.    (0.00s)
Building folders structure.    (0.03s)
Compiling code.    (0.07s)
   
ObfuscatorMap.txt file created in Objects folder.
Compiling layouts code.    (0.02s)
Organizing libraries.    (2.12s)
Generating R file.    (1.00s)
Compiling generated Java code.    Error
javac 1.8.0_181
src\b4a\example\main.java:332: error: cannot find symbol
public de.amberhome.objects.appcompat.ACToolbarLightWrapper _actoolbarlight1 = null;
                                     ^
  symbol:   class ACToolbarLightWrapper
  location: package de.amberhome.objects.appcompat
Note: src\b4a\example\starter.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
1 error

@corwin42 Markus any idea's what is causing this

Regards

John.
 
Upvote 0
Top