angel_ Well-Known Member Licensed User Longtime User Feb 21, 2020 #1 I try to do this [B4X] Cross platform example This is a simple example that demonstrates a recommended method of sharing code and files between B4A, B4i and B4J. It is based on these tips: https://www.b4x.com/android/forum/threads/xui2d-cross-platform-tips.96815/#content The main idea is to implement everything that is possible in one or... www.b4x.com I have this line in activity and add it to the public class B4X: #Extends: android.support.v7.app.AppCompatActivity And appears this error B4X: javac 1.8.0_201 src\com\dd\aa\m00_bb.java:9: error: package android.support.v7.app does not exist public class m00_bb extends android.support.v7.app.AppCompatActivity implements BA.SubDelegator{ ^
I try to do this [B4X] Cross platform example This is a simple example that demonstrates a recommended method of sharing code and files between B4A, B4i and B4J. It is based on these tips: https://www.b4x.com/android/forum/threads/xui2d-cross-platform-tips.96815/#content The main idea is to implement everything that is possible in one or... www.b4x.com I have this line in activity and add it to the public class B4X: #Extends: android.support.v7.app.AppCompatActivity And appears this error B4X: javac 1.8.0_201 src\com\dd\aa\m00_bb.java:9: error: package android.support.v7.app does not exist public class m00_bb extends android.support.v7.app.AppCompatActivity implements BA.SubDelegator{ ^
DonManfred Expert Licensed User Longtime User Feb 21, 2020 #2 Not enough informations. Are you using AndroidX? If so then Redownload AppCompat 4.0 Upvote 0
angel_ Well-Known Member Licensed User Longtime User Feb 21, 2020 #3 DonManfred said: Not enough informations. Are you using AndroidX? If so then Redownload AppCompat 4.0 Click to expand... This is the error B4X: B4A Version: 9.80 Java Version: 8 Parsing code. (0.62s) Building folders structure. (0.10s) Running custom action. (0.05s) Running custom action. (0.13s) Running custom action. (0.05s) Running custom action. (0.05s) Running custom action. (0.05s) Running custom action. (0.05s) Running custom action. (0.05s) Running custom action. (0.05s) Running custom action. (0.05s) Running custom action. (0.05s) Compiling code. (2.91s) Compiling layouts code. (0.27s) Organizing libraries. (0.07s) (AndroidX SDK) Generating R file. (3.59s) Compiling debugger engine code. (7.54s) Compiling generated Java code. Error javac 1.8.0_201 src\com\dd\aa\m00_bb.java:9: error: package android.support.v7.app does not exist public class m00_bb extends android.support.v7.app.AppCompatActivity implements BA.SubDelegator{ ^ Note: src\com\dd\aa\starter.java uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. Note: Some input files use unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. 1 error Manifest B4X: SetApplicationAttribute(android:theme, "@style/MyAppTheme") CreateResource(values, MyAppTheme.xml, <resources> <style name="MyAppTheme" parent="Theme.AppCompat.DayNight.NoActionBar"> </style> </resources> ) I'm using AppCompat 4.00 Upvote 0
DonManfred said: Not enough informations. Are you using AndroidX? If so then Redownload AppCompat 4.0 Click to expand... This is the error B4X: B4A Version: 9.80 Java Version: 8 Parsing code. (0.62s) Building folders structure. (0.10s) Running custom action. (0.05s) Running custom action. (0.13s) Running custom action. (0.05s) Running custom action. (0.05s) Running custom action. (0.05s) Running custom action. (0.05s) Running custom action. (0.05s) Running custom action. (0.05s) Running custom action. (0.05s) Running custom action. (0.05s) Compiling code. (2.91s) Compiling layouts code. (0.27s) Organizing libraries. (0.07s) (AndroidX SDK) Generating R file. (3.59s) Compiling debugger engine code. (7.54s) Compiling generated Java code. Error javac 1.8.0_201 src\com\dd\aa\m00_bb.java:9: error: package android.support.v7.app does not exist public class m00_bb extends android.support.v7.app.AppCompatActivity implements BA.SubDelegator{ ^ Note: src\com\dd\aa\starter.java uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. Note: Some input files use unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. 1 error Manifest B4X: SetApplicationAttribute(android:theme, "@style/MyAppTheme") CreateResource(values, MyAppTheme.xml, <resources> <style name="MyAppTheme" parent="Theme.AppCompat.DayNight.NoActionBar"> </style> </resources> ) I'm using AppCompat 4.00
DonManfred Expert Licensed User Longtime User Feb 21, 2020 #4 angel_ said: I'm using AppCompat 4.00 Click to expand... DonManfred said: Are you using AndroidX? If so then Redownload AppCompat 4.0 Click to expand... DID you redownloaded v4.0 of AppCompat??? Upvote 0
angel_ said: I'm using AppCompat 4.00 Click to expand... DonManfred said: Are you using AndroidX? If so then Redownload AppCompat 4.0 Click to expand... DID you redownloaded v4.0 of AppCompat???
angel_ Well-Known Member Licensed User Longtime User Feb 21, 2020 #5 DonManfred said: DID you redownloaded v4.0 of AppCompat??? Click to expand... If you refer to uncheck and check the AppCompat, yes I did it with the same result Upvote 0
DonManfred said: DID you redownloaded v4.0 of AppCompat??? Click to expand... If you refer to uncheck and check the AppCompat, yes I did it with the same result
DonManfred Expert Licensed User Longtime User Feb 21, 2020 #6 No. When i want you to uncheck and recheck the library in the librarytab then i would have said it like this. When i say ReDownload then i mean. Do the download of v4.0 again. The new download also contains a correct androidX artifact. Use the files from the newdownload. Make sure to place all files from the download in your additional library folder. REFRESH the librarylist after updated the files. Clean your project and try again. Last edited: Feb 21, 2020 Upvote 0
No. When i want you to uncheck and recheck the library in the librarytab then i would have said it like this. When i say ReDownload then i mean. Do the download of v4.0 again. The new download also contains a correct androidX artifact. Use the files from the newdownload. Make sure to place all files from the download in your additional library folder. REFRESH the librarylist after updated the files. Clean your project and try again.
angel_ Well-Known Member Licensed User Longtime User Feb 21, 2020 #7 I did all steps but I have the same error. If I delete #Extends: android.support.v7.app.AppCompatActivity in the public class I don't have any problem, despite having #Extends:... in the Main. Upvote 0
I did all steps but I have the same error. If I delete #Extends: android.support.v7.app.AppCompatActivity in the public class I don't have any problem, despite having #Extends:... in the Main.
Erel B4X founder Staff member Licensed User Longtime User Feb 23, 2020 #8 Two options: 1. You are using an old Android SDK. Run B4A Sdk Manager and make sure to install all recommended items. 2. You haven't followed DonManfred suggestion. Upvote 0
Two options: 1. You are using an old Android SDK. Run B4A Sdk Manager and make sure to install all recommended items. 2. You haven't followed DonManfred suggestion.
angel_ Well-Known Member Licensed User Longtime User Feb 23, 2020 #9 I have install all recommended items, maybe I have not explained myself well, the error only appears when I add that line to a public class Upvote 0
I have install all recommended items, maybe I have not explained myself well, the error only appears when I add that line to a public class
Erel B4X founder Staff member Licensed User Longtime User Feb 23, 2020 #10 angel_ said: I have install all recommended items, maybe I have not explained myself well, the error only appears when I add that line to a public class Click to expand... We all did it. The problem is that you are still using an unjetified version of AppCompat. My guess is that you have an old copy in the internal libraries folder. Delete it. Download the library again and copy it to the additional libraries folder. Upvote 0
angel_ said: I have install all recommended items, maybe I have not explained myself well, the error only appears when I add that line to a public class Click to expand... We all did it. The problem is that you are still using an unjetified version of AppCompat. My guess is that you have an old copy in the internal libraries folder. Delete it. Download the library again and copy it to the additional libraries folder.
angel_ Well-Known Member Licensed User Longtime User Feb 23, 2020 #11 I don't know what I'm doing wrong, I have the same problem. I have deleted the android-support-v7-appcompat file from the internal libraries, reinstalled B4A and downloaded Appcompat again and applied jetified. Attachments Captura.JPG 33.4 KB · Views: 798 Upvote 0
I don't know what I'm doing wrong, I have the same problem. I have deleted the android-support-v7-appcompat file from the internal libraries, reinstalled B4A and downloaded Appcompat again and applied jetified.
Erel B4X founder Staff member Licensed User Longtime User Feb 23, 2020 #12 Have you checked the internal libraries folder? Upvote 0
angel_ Well-Known Member Licensed User Longtime User Feb 23, 2020 #13 Erel said: Have you checked the internal libraries folder? Click to expand... I don't see any problem, I have AppCompat in the adicional libraries, android-support-v7 file is not in the internal library (I deleted it), I've probe in other app with #Extends: android.support.v7.app.AppCompatActivity in the activities and it works well, but in this case with #Extends: android.support.v7... in the Class doesn't work Upvote 0
Erel said: Have you checked the internal libraries folder? Click to expand... I don't see any problem, I have AppCompat in the adicional libraries, android-support-v7 file is not in the internal library (I deleted it), I've probe in other app with #Extends: android.support.v7.app.AppCompatActivity in the activities and it works well, but in this case with #Extends: android.support.v7... in the Class doesn't work
Erel B4X founder Staff member Licensed User Longtime User Feb 23, 2020 #14 angel_ said: android-support-v7 file Click to expand... Nobody mentioned this file. You should delete AppCompat.xml and AppCompat.jar from the internal libraries folder. I cannot further help here. Sorry. Upvote 0
angel_ said: android-support-v7 file Click to expand... Nobody mentioned this file. You should delete AppCompat.xml and AppCompat.jar from the internal libraries folder. I cannot further help here. Sorry.
angel_ Well-Known Member Licensed User Longtime User Feb 23, 2020 #15 Erel said: Nobody mentioned this file. You should delete AppCompat.xml and AppCompat.jar from the internal libraries folder. I cannot further help here. Sorry. Click to expand... Thank you for your patience, I will continue testing Upvote 0
Erel said: Nobody mentioned this file. You should delete AppCompat.xml and AppCompat.jar from the internal libraries folder. I cannot further help here. Sorry. Click to expand... Thank you for your patience, I will continue testing
DonManfred Expert Licensed User Longtime User Feb 23, 2020 #16 Can you provide a Anydesc ID. I can help you checking your Setup. Hopefully your system is in English language ;-) Upvote 0
Can you provide a Anydesc ID. I can help you checking your Setup. Hopefully your system is in English language ;-)
angel_ Well-Known Member Licensed User Longtime User Feb 23, 2020 #17 Thank you very much, it is very generous of you, I will review in depth the threads of the forum about this topic Upvote 0
Thank you very much, it is very generous of you, I will review in depth the threads of the forum about this topic
f0raster0 Well-Known Member Licensed User Longtime User Feb 25, 2020 #18 angel_ said: I have this line in activity and add it to the public class B4X: #Extends: android.support.v7.app.AppCompatActivity Click to expand... maybe you can not use: #Extends: android.support.v7.app.AppCompatActivity in a public class and it should be only added in Main like you are doing Last edited: Feb 25, 2020 Upvote 0
angel_ said: I have this line in activity and add it to the public class B4X: #Extends: android.support.v7.app.AppCompatActivity Click to expand... maybe you can not use: #Extends: android.support.v7.app.AppCompatActivity in a public class and it should be only added in Main like you are doing
angel_ Well-Known Member Licensed User Longtime User Feb 26, 2020 #19 Attached an example where you can see the problem, I solved it by creating an activity template which includes #Extends: android.support.v7.app.AppCompatActivity and I removed #Extends from the class, then I load each class on this template, I would like your opinions about this option Attachments ejemplo.zip ejemplo.zip 15.9 KB · Views: 690 Upvote 0
Attached an example where you can see the problem, I solved it by creating an activity template which includes #Extends: android.support.v7.app.AppCompatActivity and I removed #Extends from the class, then I load each class on this template, I would like your opinions about this option
Erel B4X founder Staff member Licensed User Longtime User Feb 26, 2020 #20 The Extends line should only be added to the activities. You shouldn't add it to classes. Upvote 0