Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conflict in file name : leveldb_Privacy.bundle/Info.plist #3644

Open
Shaunmax opened this issue Jan 15, 2025 · 28 comments
Open

Conflict in file name : leveldb_Privacy.bundle/Info.plist #3644

Shaunmax opened this issue Jan 15, 2025 · 28 comments
Labels

Comments

@Shaunmax
Copy link

Shaunmax commented Jan 15, 2025

I just updated AIR SDK to 51.1.3 and also updated my anes to the latest version. But while compiling the build I am getting errors for both iOS & Android builds.

for iOS :

I am getting this strange error : Conflict in file name : leveldb_Privacy.bundle/Info.plist
image

for Android :

unexpected failure: Unable to run java: com.adobe.air.ADTException: gradle tool failed: Warning: SDK processing. This version only understands SDK XML versions up to 3 but an SDK XML file of version 4 was encountered. This can happen if you use versions of Android Studio and the command-line tools that were released at different times. FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':app:checkDebugAarMetadata'. > A failure occurred while executing com.android.build.gradle.internal.tasks.CheckAarMetadataWorkAction > 8 issues were found when checking AAR metadata: 1. Dependency 'androidx.credentials:credentials:1.2.0-rc01' requires libraries and applications that depend on it to compile against version 34 or later of the Android APIs. :app is currently compiled against android-33. Also, the maximum recommended compile SDK version for Android Gradle plugin 7.4.0 is 33. Recommended action: Update this project's version of the Android Gradle plugin to one that supports 34, then update this project to use compileSdkVerion of at least 34. Note that updating a library or application's compileSdkVersion (which allows newer APIs to be used) can be done separately from updating targetSdkVersion (which opts the app in to new runtime behavior) and minSdkVersion (which determines which devices the app can be installed on). 2. Dependency 'androidx.credentials:credentials-play-services-auth:1.2.0-rc01' requires libraries and applications that depend on it to compile against version 34 or later of the Android APIs. :app is currently compiled against android-33. Also, the maximum recommended compile SDK version for Android Gradle plugin 7.4.0 is 33. Recommended action: Update this project's version of the Android Gradle plugin to one that supports 34, then update this project to use compileSdkVerion of at least 34. Note that updating a library or application's compileSdkVersion (which allows newer APIs to be used) can be done separately from updating targetSdkVersion (which opts the app in to new runtime behavior) and minSdkVersion (which determines which devices the app can be installed on). 3. Dependency 'androidx.datastore:datastore-android:1.1.1' requires libraries and applications that depend on it to compile against version 34 or later of the Android APIs. :app is currently compiled against android-33. Also, the maximum recommended compile SDK version for Android Gradle plugin 7.4.0 is 33. Recommended action: Update this project's version of the Android Gradle plugin to one that supports 34, then update this project to use compileSdkVerion of at least 34. Note that updating a library or application's compileSdkVersion (which allows newer APIs to be used) can be done separately from updating targetSdkVersion (which opts the app in to new runtime behavior) and minSdkVersion (which determines which devices the app can be installed on). 4. Dependency 'androidx.datastore:datastore-preferences-android:1.1.1' requires libraries and applications that depend on it to compile against version 34 or later of the Android APIs. :app is currently compiled against android-33. Also, the maximum recommended compile SDK version for Android Gradle plugin 7.4.0 is 33. Recommended action: Update this project's version of the Android Gradle plugin to one that supports 34, then update this project to use compileSdkVerion of at least 34. Note that updating a library or application's compileSdkVersion (which allows newer APIs to be used) can be done separately from updating targetSdkVersion (which opts the app in to new runtime behavior) and minSdkVersion (which determines which devices the app can be installed on). 5. Dependency 'androidx.core:core-ktx:1.13.1' requires libraries and applications that depend on it to compile against version 34 or later of the Android APIs. :app is currently compiled against android-33. Also, the maximum recommended compile SDK version for Android Gradle plugin 7.4.0 is 33. Recommended action: Update this project's version of the Android Gradle plugin to one that supports 34, then update this project to use compileSdkVerion of at least 34. Note that updating a library or application's compileSdkVersion (which allows newer APIs to be used) can be done separately from updating targetSdkVersion (which opts the app in to new runtime behavior) and minSdkVersion (which determines which devices the app can be installed on). 6. Dependency 'androidx.webkit:webkit:1.11.0-alpha02' requires libraries and applications that depend on it to compile against version 34 or later of the Android APIs. :app is currently compiled against android-33. Also, the maximum recommended compile SDK version for Android Gradle plugin 7.4.0 is 33. Recommended action: Update this project's version of the Android Gradle plugin to one that supports 34, then update this project to use compileSdkVerion of at least 34. Note that updating a library or application's compileSdkVersion (which allows newer APIs to be used) can be done separately from updating targetSdkVersion (which opts the app in to new runtime behavior) and minSdkVersion (which determines which devices the app can be installed on). 7. Dependency 'androidx.core:core:1.13.1' requires libraries and applications that depend on it to compile against version 34 or later of the Android APIs. :app is currently compiled against android-33. Also, the maximum recommended compile SDK version for Android Gradle plugin 7.4.0 is 33. Recommended action: Update this project's version of the Android Gradle plugin to one that supports 34, then update this project to use compileSdkVerion of at least 34. Note that updating a library or application's compileSdkVersion (which allows newer APIs to be used) can be done separately from updating targetSdkVersion (which opts the app in to new runtime behavior) and minSdkVersion (which determines which devices the app can be installed on). 8. Dependency 'androidx.annotation:annotation-experimental:1.4.0' requires libraries and applications that depend on it to compile against version 34 or later of the Android APIs. :app is currently compiled against android-33. Also, the maximum recommended compile SDK version for Android Gradle plugin 7.4.0 is 33. Recommended action: Update this project's version of the Android Gradle plugin to one that supports 34, then update this project to use compileSdkVerion of at least 34. Note that updating a library or application's compileSdkVersion (which allows newer APIs to be used) can be done separately from updating targetSdkVersion (which opts the app in to new runtime behavior) and minSdkVersion (which determines which devices the app can be installed on). * Try: > Run with --stacktrace option to get the stack trace. > Run with --info or --debug option to get more log output. > Run with --scan to get full insights. * Get more help at https://help.gradle.org BUILD FAILED in 14s java.io.IOException: Unable to run java: com.adobe.air.ADTException: gradle tool failed: Warning: SDK processing. This version only understands SDK XML versions up to 3 but an SDK XML file of version 4 was encountered. This can happen if you use versions of Android Studio and the command-line tools that were released at different times. FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':app:checkDebugAarMetadata'. > A failure occurred while executing com.android.build.gradle.internal.tasks.CheckAarMetadataWorkAction > 8 issues were found when checking AAR metadata: 1. Dependency 'androidx.credentials:credentials:1.2.0-rc01' requires libraries and applications that depend on it to compile against version 34 or later of the Android APIs. :app is currently compiled against android-33. Also, the maximum recommended compile SDK version for Android Gradle plugin 7.4.0 is 33. Recommended action: Update this project's version of the Android Gradle plugin to one that supports 34, then update this project to use compileSdkVerion of at least 34. Note that updating a library or application's compileSdkVersion (which allows newer APIs to be used) can be done separately from updating targetSdkVersion (which opts the app in to new runtime behavior) and minSdkVersion (which determines which devices the app can be installed on). 2. Dependency 'androidx.credentials:credentials-play-services-auth:1.2.0-rc01' requires libraries and applications that depend on it to compile against version 34 or later of the Android APIs. :app is currently compiled against android-33. Also, the maximum recommended compile SDK ve... ADT command line: /Applications/IntelliJ IDEA.app/Contents/jbr/Contents/Home/bin/java -Dapplication.home=/Users/macname/Projects/AIR_SDK/AIRSDK_51.1.3 -Dfile.encoding=UTF-8 -Djava.awt.headless=true -Duser.language=en -Duser.region=en -Xmx512m -jar /Users/macname/Projects/AIR_SDK/AIRSDK_51.1.3/lib/adt.jar -package -target apk-debug -listen 7936 -arch armv8 -storetype PKCS12 -keystore /Users/macname/Projects/Company/Company_android.p12 -storepass ***** /Users/macbookname/Projects/AppName/out/production/AppName/Main.apk /Users/macbookname/Projects/AppName/out/production/AppName/Main-app.xml -extdir /Users/macbookname/Projects/AppName/ane -C /Users/macbookname/Projects/AppName/out/production/AppName Main.swf -C /Users/macbookname/Projects/AppName ext_assets -C /Users/macbookname/Projects/AppName icons -C /Users/macbookname/Projects/AppName/src res

@Shaunmax Shaunmax added the Bug label Jan 15, 2025
@marchbold
Copy link
Collaborator

The android error looks like you might need to update your build tools? Can you check that you have v34 of the build tools installed (via the sdk manager in android studio)?

@Shaunmax
Copy link
Author

Shaunmax commented Jan 16, 2025

The android error looks like you might need to update your build tools? Can you check that you have v34 of the build tools installed (via the sdk manager in android studio)?

this is what I have on my mac:
image

this what I got in android studio :
image

@fix89
Copy link

fix89 commented Jan 16, 2025

same error on iOS after updating all extensions

@fix89
Copy link

fix89 commented Jan 16, 2025

these my extensions:

androidx.appcompat
androidx.browser
androidx.cardview
androidx.constraintlayout
androidx.core
androidx.exifinterface
androidx.room
androidx.vectordrawable
androidx.work
com.bumptech.glide
com.distriqt.Adverts
com.distriqt.Application
com.distriqt.ApplicationRater
com.distriqt.Core
com.distriqt.Firebase
com.distriqt.firebase.Auth
com.distriqt.firebase.Database
com.distriqt.IDFA
com.distriqt.playservices.Ads
com.distriqt.playservices.AdsIdentifier
com.distriqt.playservices.AppSet
com.distriqt.playservices.Auth
com.distriqt.playservices.Base
com.distriqt.playservices.CloudMessaging
com.distriqt.PushNotifications
com.distriqt.Share
com.distriqt.square.okhttp
com.distriqt.square.okhttp3
com.google.android.datatransport
com.google.android.play
com.google.android.recaptcha
com.google.code.gson
com.google.dagger
com.google.firebase.core
com.google.firebase.messaging
com.google.guava
com.google.protobuflite
com.jetbrains.kotlin
io.grpc
io.reactivex
androidx.emoji2
com.android.installreferrer
com.distriqt.Bolts
com.distriqt.InAppBilling
com.distriqt.facebook.Share
com.distriqt.firebase.Firestore
com.distriqt.NativeWebView
com.distriqt.Notifications
com.distriqt.facebook.Core
com.distriqt.OCR
com.distriqt.CameraRollExtended
com.distriqt.square.picasso
com.distriqt.admob.FacebookAudience
com.distriqt.admob.IronSource
com.distriqt.admob.UnityAds
com.distriqt.admob.AppLovin
com.distriqt.firebase.Crashlytics
androidx.datastore
com.distriqt.NetworkInfo

@fix89
Copy link

fix89 commented Jan 16, 2025

No problem exporting on Android

@Shaunmax
Copy link
Author

No problem exporting on Android

what version of build tools are you using ?

@fix89
Copy link

fix89 commented Jan 16, 2025

Image Image

also set:

Did you find a solution on iOS?

@Shaunmax
Copy link
Author

Shaunmax commented Jan 16, 2025

I can confirm that, Installing Android 14 API Level 34, fixed the problem for android!

Did you find a solution on iOS?

Nope!

@ajwfrost
Copy link
Collaborator

ajwfrost commented Jan 16, 2025

I'd started writing this response earlier but then got pulled into a meeting... might be useful info though so will still post it:


@Shaunmax on the Android side, all the errors from that log were basically:

Dependency (xyz) requires libraries and applications that depend on it to compile against version 34 or later of the Android APIs.
:app is currently compiled against android-33.
Also, the maximum recommended compile SDK version for Android Gradle plugin 7.4.0 is 33.
Recommended action: Update this project's version of the Android Gradle plugin to one that supports 34, then update this project to use compileSdkVersion of at least 34.

So your app is being compiled with a target of 33, it needs to update to 34 (or later). Do you have any settings in your application descriptor file for the <android> build tools? It should normally pick up the latest compile version from your platform list but that would be overridden if you have <androidCompileSdkVersion> in your app descriptor...

If you can check the log file for the information before it calls Gradle, it would be good, there may be some info there (and we have been asked to add a more verbose option to help with some of these sorts of issues!)


On the iOS side, that sounds like a very different thing! Conflict in file name means that there are two files with the same name/path being added into the IPA. So you may need to check where the file (leveldb_Privacy.bundle/Info.plist) is coming from - is this on your file list manually (or is there a setting in IDEA where it's been set up twice?)

thanks

@fix89
Copy link

fix89 commented Jan 16, 2025

I'd started writing this response earlier but then got pulled into a meeting... might be useful info though so will still post it:

@Shaunmax on the Android side, all the errors from that log were basically:

Dependency (xyz) requires libraries and applications that depend on it to compile against version 34 or later of the Android APIs.
:app is currently compiled against android-33.
Also, the maximum recommended compile SDK version for Android Gradle plugin 7.4.0 is 33.
Recommended action: Update this project's version of the Android Gradle plugin to one that supports 34, then update this project to use compileSdkVersion of at least 34.

So your app is being compiled with a target of 33, it needs to update to 34 (or later). Do you have any settings in your application descriptor file for the <android> build tools? It should normally pick up the latest compile version from your platform list but that would be overridden if you have <androidCompileSdkVersion> in your app descriptor...

If you can check the log file for the information before it calls Gradle, it would be good, there may be some info there (and we have been asked to add a more verbose option to help with some of these sorts of issues!)

On the iOS side, that sounds like a very different thing! Conflict in file name means that there are two files with the same name/path being added into the IPA. So you may need to check where the file (leveldb_Privacy.bundle/Info.plist) is coming from - is this on your file list manually (or is there a setting in IDEA where it's been set up twice?)

thanks

On iOS side I really don't know what this file is. I think is something about Firebase extension, cause before and update it works

@Shaunmax
Copy link
Author

So your app is being compiled with a target of 33, it needs to update to 34 (or later).

So I need to update targetSdkVersion to 34 ?

So you may need to check where the file (leveldb_Privacy.bundle/Info.plist) is coming from

I have no idea!

@Shaunmax
Copy link
Author

Shaunmax commented Jan 16, 2025

On iOS side I really don't know what this file is. I think is something about Firebase extension, cause before and update it works

@marchbold - Is this something related to distriqt's anes? I can see lots of Info.plist mentioned for OneSignal

@ajwfrost
Copy link
Collaborator

The target SDK version is 34 by default I think. But that's different from the compile SDK version which we get from the platforms list, and the build tools version which we get from the build-tools folder.... not really sure why it is so complicated! Build tool information isn't used from Android Gradle Plug-in version 8 and up, it seems, and you need that version for a compile SDK version of 34 (per their warning message). So as long as you have the "platform" files for version 34, it should then all work itself out okay.

For iOS, can you check the adt.log file to see what's in your build command, and whether leveldb_Privacy.bundle is mentioned in that command? Or there's a possibility it might be in one of the ANEs I guess... are you on a mac? If you've got all the ANEs in a folder you could use a terminal and do:

find /path/to/ane/folder -name "*.ane" -exec unzip -l {} \; > filelist.txt

and then open up filelist.txt and search for that leveldb_Privacy.bundle/Info.plist file.

If we did a super-verbose option for ADT, we could perhaps dump out all the files that are being added to a package, plus where they're being specified from.. so if you don't have any luck, we can try putting that together and sending you a trial version of ADT!

thanks

@fix89
Copy link

fix89 commented Jan 16, 2025

filelist.txt

@Shaunmax
Copy link
Author

and then open up filelist.txt and search for that leveldb_Privacy.bundle/Info.plist file.

I can see 5 places where its mentioned :

779  12-05-2024 18:48   META-INF/ANE/iPhone-ARM/leveldb.framework/leveldb_Privacy.bundle/Info.plist
779  12-05-2024 18:48   META-INF/ANE/iPhone-ARM/leveldb_Privacy.bundle/Info.plist
759  12-05-2024 18:48   META-INF/ANE/iPhone-x86/leveldb.framework/leveldb_Privacy.bundle/Info.plist
779  12-05-2024 18:48   META-INF/ANE/iPhone-ARM/leveldb.framework/leveldb_Privacy.bundle/Info.plist
779  12-05-2024 18:48   META-INF/ANE/iPhone-ARM/leveldb_Privacy.bundle/Info.plist

the anes are com.distriqt.firebase.Database.ane & com.distriqt.firebase.Firestore.ane

@ajwfrost
Copy link
Collaborator

Thanks @Shaunmax

So - @marchbold - are you able to clarify please, where there are different ANEs that have the same dependencies:

  • should we just ignore any duplicates (i.e. if this name conflict arises because of an ANE, we'll ignore the file)?
  • should we expect the duplicate filenames to actually reference identical files (i.e. we'll only raise an error if the two ANEs had different contents for this file path)?
  • or do we need to do something a bit more cunning for this?

@fix89
Copy link

fix89 commented Jan 16, 2025

If you can easily create an ADT where just ignore any duplicates I can test. If the app works it's ok.

Thanks @Shaunmax

So - @marchbold - are you able to clarify please, where there are different ANEs that have the same dependencies:

  • should we just ignore any duplicates (i.e. if this name conflict arises because of an ANE, we'll ignore the file)?
  • should we expect the duplicate filenames to actually reference identical files (i.e. we'll only raise an error if the two ANEs had different contents for this file path)?
  • or do we need to do something a bit more cunning for this?

@ajwfrost
Copy link
Collaborator

@fix89 @Shaunmax please try with the below.. it should write a warning into the log and then ignore the duplicate filename and continue..
adt.zip

@fix89
Copy link

fix89 commented Jan 16, 2025

It works! You are the best!

@marchbold
Copy link
Collaborator

Okay, not sure what's happened here.

We had discovered that bundle's inside Frameworks weren't being correctly copied into the ipa previously so had started providing them as part of the base extension assets as well. This resolved the issue and seemed to work.

However it appears that the reverse has happened now, AIR is picking up both and causing a conflict between the ones we have supplied outside the frameworks.

@ajwfrost Any idea what would have caused this change? Should I go back to relying on bundles inside frameworks being handled correctly?

@marchbold
Copy link
Collaborator

Actually it still seems to be happening, a bundle that contained inside a framework is not being packaged into the final ipa.

I might have to look into a way of more selectively providing these bundles, rather than just copying them all into the extensions resources.

@marchbold
Copy link
Collaborator

So - @marchbold - are you able to clarify please, where there are different ANEs that have the same dependencies:

* should we just ignore any duplicates (i.e. if this name conflict arises because of an ANE, we'll ignore the file)?

* should we expect the duplicate filenames to actually reference identical files (i.e. we'll only raise an error if the two ANEs had different contents for this file path)?

* or do we need to do something a bit more cunning for this?

Yes this is because some of the extensions have the same dependencies, the frameworks appear to be ignored but this change we have made to the bundles is causing the issue. The files should be identical and yes failing if only they are different would be a good idea.

@Shaunmax
Copy link
Author

Shaunmax commented Jan 17, 2025

Actually it still seems to be happening, a bundle that contained inside a framework is not being packaged into the final ipa.

so it seems like an issue? and using adt provided by @ajwfrost wont fix it temporarily ?

@marchbold
Copy link
Collaborator

Hi,

Yes if AIR implements the process Andrew suggested of ignoring identical duplicate bundles then that should work.

Otherwise I'm going to have to split out all of these frameworks containing bundles and either introduce new dependencies for them or drop them all into com.google.firebase.core.

@ajwfrost Let me know which approach you'd prefer. The later will take me a few days, as I'd probably need to create about 3-4 additional dependency extensions.

@fix89
Copy link

fix89 commented Jan 17, 2025

Hi,

Yes if AIR implements the process Andrew suggested of ignoring identical duplicate bundles then that should work.

Otherwise I'm going to have to split out all of these frameworks containing bundles and either introduce new dependencies for them or drop them all into com.google.firebase.core.

@ajwfrost Let me know which approach you'd prefer. The later will take me a few days, as I'd probably need to create about 3-4 additional dependency extensions.

Hi Michael, i tested the new adt and everything works good!

@Shaunmax
Copy link
Author

Yes if AIR implements the process Andrew suggested of ignoring identical duplicate bundles then that should work.

If I understood it correctly, I can use the adt provided by @ajwfrost earlier in my production build as well

@ajwfrost
Copy link
Collaborator

@Shaunmax / @fix89 feel free to use that version to package up the IPA files. But the change there was just done outside our official build, which means our next release (next week) is not going to have that change in.

--

Longer-term:

a bundle that contained inside a framework is not being packaged into the final ipa.

We may need to double-check what's actually needed here! I think we had found we needed to move all frameworks, at least for macOS applications, but for IPAs I don't think we do anything special around moving/restructuring the contents. We can discuss offline to see what's needed here..

The files should be identical and yes failing if only they are different would be a good idea.

So we can plan to add this capability; I kind of like the idea of still failing if the files aren't identical, because it may indicate some incompatible versions had been used together. But we can double-check whether this is possible, I don't know whether we can get back the data from the earlier addition when we try to add another one. We'll take a look!

thanks

@marchbold
Copy link
Collaborator

Yeah, I had intended to raise it with you but needed a fix for a client quickly and our approach seemed to work. However obviously this change has been rolled out across all our extensions and we didn't pick up this issue between a couple of the extensions.

However, after further investigation it's only a couple of small frameworks causing this issue and I've been able to migrate them into the firebase.core extension with only a minor increase in size. So should be able to get a solution from our side out tomorrow.

marchbold added a commit to distriqt/ANE-GooglePlayServices that referenced this issue Jan 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants