Android Question [SOLVED] Errors when trying to compile

Peter Lewis

Well-Known Member
Licensed User
Longtime User
Hi All

I loaded up a library which was billscan that worked in December perfectly but now i want to use it and B4A mentions i needed additional items added from the SDK Which I have the latested installed.. I went thru the sdk and added these new items and now I get this error on all programs within Android. The only way i could resolve this was to re-install the SDK.

Any ideas ?

Here is the error
B4A Version: 10.60
Parsing code. (0.00s)
Java Version: 8
Building folders structure. (0.05s)
Compiling code. (0.15s)
Compiling layouts code. (0.01s)
Organizing libraries. (0.00s)
(AndroidX SDK)
Generating R file. Error
c:\android\tools\..\extras\b4a_remote\androidx\constraintlayout\constraintlayout\2.0.4\unpacked-constraintlayout-2.0.4\res\values\values.xml:339: error: Attribute "android:alpha" has already been defined
c:\android\tools\..\extras\b4a_remote\androidx\constraintlayout\constraintlayout\2.0.4\unpacked-constraintlayout-2.0.4\res\values\values.xml:342: error: Attribute "android:translationX" has already been defined
c:\android\tools\..\extras\b4a_remote\androidx\constraintlayout\constraintlayout\2.0.4\unpacked-constraintlayout-2.0.4\res\values\values.xml:342: error: Attribute "android:translationY" has already been defined
c:\android\tools\..\extras\b4a_remote\androidx\constraintlayout\constraintlayout\2.0.4\unpacked-constraintlayout-2.0.4\res\values\values.xml:342: error: Attribute "android:translationZ" has already been defined
c:\android\tools\..\extras\b4a_remote\androidx\savedstate\savedstate\1.1.0\unpacked-savedstate-1.1.0\res\values\values.xml:3: error: Found tag id where item is expected
c:\android\tools\..\extras\b4a_remote\androidx\lifecycle\lifecycle-viewmodel\2.3.0\unpacked-lifecycle-viewmodel-2.3.0\res\values\values.xml:3: error: Found tag id where item is expected
c:\android\tools\..\extras\b4a_remote\androidx\lifecycle\lifecycle-runtime\2.3.0\unpacked-lifecycle-runtime-2.3.0\res\values\values.xml:3: error: Found tag id where item is expected

This is where it all started

Organizing libraries. Error
Maven artifact not found: androidx.annotation/annotation-experimental

and I have tried to run Jetifier but that did not help
 
Upvote 0
Simplest way is to delete the SDK and download a new one: https://www.b4x.com/b4a.html
It will fix it. Note that you don't need to update the resources. It can happen that a new incompatible resource is released and it is not so simple to roll it back.

If you are a bit adventurous you can rollback the 4 problematic resources: https://www.b4x.com/android/forum/t...4-has-already-been-defined.127396/post-799369

I DELETE the Android SDK , and installed the Latest version of the SDK again and I still get the same problem

[IDE message - 10:30:09]
An error occurred.
Maven artifact not found: androidx.annotation/annotation-experimental

Now if I download the update for this I will get the same error back in Message #1, I have done this at least 10 times and still no luck

Here is the project file if you want to see if it works on your system

Thank you
 

Attachments

Upvote 0
Hi , I managed to get it to work.

I had to run B4A in Administrator mode, then do a Jetifier on the Billscan jar. I also reinstalled Java and also Android SDK , SDK I have to install the Experimental Version of Annotation and it installed many other items as well. I had to also install androidx.viewpager2:viewpager2. I then went into The paths and setup Android 30
View attachment 108098

And that seemed to solve the problems
 
Upvote 0
On version 10.70 gives me this problem,
Does anyone have any idea to solve it?

1616799281339.png
 
Upvote 0
Upvote 0
Back
Top