Impossible built on old apps, Can't find class file for Screen 'Screen1'

I don't know. I don't know the details of the project.

Niotron and AppInventor are two different builders. I don't know about the modifications made to Niotron.

Niotron is much more closely related to AI2 than Kodular. Niotron just added more components and features. Therefore, both platforms are compatible with each other (except for different components) (unlike Kodular, where it is practically impossible to import a project into AI2).

1 Like

What is the MinSdk for Niotron?

minSdkVersion = 21 (Android 5).

Niotron has many new features under the hood, which in the case of app inventor are just open PRs.

This is a big difference, e.g. newer androidx libraries. There may also be fixes included that will be available in Ai2 only in nb201

But I think in this case there is some small error in the projection. I would have to look into it.

for exemple Mp3Tags_v9, you can find here:

I posted it 13 january, it was then working, but now it does not built...

I think that these are rather modifications made to AppInventor because AI succeded to built it some weeks ago

Share the project.

Mp3Tags_v9.aia (110,8 Ko)
for exemple, because i have this issue on other project too

An interesting case.

Personally I find it much more annoying than interesting, because I can no longer build my apps ... :face_with_raised_eyebrow: :no_mouth:

Looking at the contents of your project, it looks like you have two different extensions that define a Mp3Tags class (com.appybuilder.jml.Mp3tags and jml.Mp3Tags). Do you know which one of these you're intending to actually use?

Here is a copy with the AppyBuilder version removed. It built but I did not test it.

Mp3Tags_v9.aia (90.7 KB)

2 Likes

And a class conflict arose because they have the same name?

Version 7 was built with AppyBuilder IDE, and the current one (version 9) was built with App Inventor. There was/is obviously a conflict with the package name, as both versions remain in the aia. However, why AI2 has a problem building the app and Niotron doesn't remains unclear.

Have you checked if the application works correctly after building the apk in Niotron?

In Java it is normal that you cannot import two classes with the same name, even if they have different packages. You must then use the whole package in your Java code. I think there is a similar problem here.

yes it works even if sound is very very low (i don't know why)

it was my first extension. it is possible that i started it with appybuilder...now i compile it directly with ant since few versions of my extension, but there is no reference to appybuilder in my code ! why are there any traces in it? and how can i delete them ?

When i bublish this versions this version AI2 succeded to built it why not possible any more ?

Yes i tested it and it works

It has to do with how Niotron handles the name collisions for dx/d8. In a previous test dealing with two extensions that included libraries, it was noted that Niotron could build the app but App Inventor couldn't due to the same class being added twice. By examining the output APK, it became clear they were just picking one copy of the class file and including it (how they determine which one is picked is not clear since AFAIK it is closed source... it may just be last version wins). I suspect that is the same issue here, or at least similar. Kawa was unable to resolve which class to actual use so it just throws up its hands for the developer to figure it out. Obviously throwing out one copy of the extension fixes the problem so long as the two versions aren't significantly different enough to cause problems in the user code (e.g., if a new block was added in version 9 from version 7 and version 9 was deleted instead).

Edit: I think it was actually that the two libraries used proguard to obfuscate, so the final extensions both ended up with a class a due to obfuscation and then that caused issues. App Inventor wouldn't compile it but in Niotron class a was included but only from one of the extensions, breaking the other extension since its class a wasn't there.

2 Likes

Wow, what a sophisticated and unexpected explanation. Thank you.

And so, what must i do to make my project to be built again ? because it's my main problem...

what is strange is that AI2 succeded not long ago to built them with the same version of my extension and now it can't again...