Error: Program type already present: com.appsflyer.AFExecutor - appsflyer

I'm struggling to implement AppsFlyer on Android using Java.
I have looked into a couple of posts already such as this, this.
Here is the entire error message: [org.gradle.api.Project] AGPBI: {"kind":"error","text":"Program type already present: com.appsflyer.AFExecutor","sources":[{}],"tool":"D8"}
The version
AppsFlyer SDK: 5.+
Android Studio: 3.5.2
Situation
I have done till 4.1 of this guide so far so good.
On AndroidManifest.xml, the main class name of AF has implemented with android.name attribute.
On AndroidManifest.xml, receiver tag commented out (because in this phase I don't believe I do not need a precise data tracking feature.)
What I have tried.
./gradlew app:dependencies | less To find out AFExecutor in other dependencies
To exclude the program
implementation ('com.appsflyer:af-android-sdk:5.+'){
exclude module: 'com.appsflyer'
}
implementation ('com.appsflyer:af-android-sdk:5.+'){
exclude module: 'AFExecutor'
}
If you have any insights, I'd love to hear that.

Try ./gradlew clean, clean project and invalidate caches and restart. If does not help than delete all build and .idea folders, .iml files.

After exploring a bunch of dependencies, I found the solution. The reason was there was a conflict between com.appsflyer:af-android-sdk:5.+ and AF-Android-SDK.jar which had installed manually. After removing the JAR file and built again, I could make it at last! Thank you so much for sharing your experiences, however, the solution was simple!

Related

Clojure/leiningen cannot find dependencies

I am new to Clojure and Leiningen. Just started working on an existing project. I pull the repo and did the command Lein run. It complained:
"Could not find artifact arctype:service.jose:jar:0.1.0-SNAPSHOT in clojars (https://repo.clojars.org/)
Could not transfer artifact arctype:service.jose:jar:0.1.0-SNAPSHOT from/to enonic (https://repo.enonic.com/public/): Failed to transfer file https://repo.enonic.com/public/arctype/service.jose/0.1.0-SNAPSHOT/service.jose-0.1.0-SNAPSHOT.jar with status code 409"
What I proceeded to do, under the assumption that the dependencies are bad, is that I went on repo.clojars.org. Manually looked into the dependencies and changed "[arctype/service.jose "0.1.0-SNAPSHOT" :exclusions [arctype/service]]" in project.clj to "[arctype/service "0.1.0-SNAPSHOT":exclusions [arctype/service]]", because that is what it has on the site. But turns out that "Jose" is not inside of arctype/service, and changing the dependencies like I did removed it, so I have to change it back.
What im really confused about, is that, according to the error message, I went on repo.clojars.org to look for the dependencies I want, "arctype.service.jose" is no where to be found. Not even something close.
I saw the second half error message that mentions repo.enonic.com/public , so I try to look for the dependecy there as well. Same result, nothing. In my project.clj file, the repository is repo.enonic.com/public. I am really confused, can somebody please enlighten me! Thanks in advance!
Im not sure if I provided enough, please let me know!
Most open source projects written in Java publish artifacts on Maven Central, and most Clojure projects publish artifacts on Maven Central or clojars.org. The fact that your error message mentions https://repo.enonic.com/public/ might be because the artifact mentioned in your project.clj file was published on that server, not on clojars.org.
If I go to clojars.org (not repo.clojars.org) there is a nice web interface with a search box, and if I enter "arctype" (without the double quotes) and do a search on that, it finds arctype/service, but not arctype/service.jose, probably because arctype/service.jose was not published on the clojars.org site. Or, if it was, someone decided to remove it. Removing published things is fairly uncommon, so my guess is that if arctype/service.jose ever existed, it might have only been published on the repo.enonic.com site.
Is your project open source? Published on Github.com or a similar site where others can get a copy and try it out? If yes, including that in your question would help others see if they get the same error you do.
If the project you are working with is not open source, then hopefully someone more familiar with the particular errors you are seeing than I am will answer.

Amazon Kinesis can't find main class in Flink job compiled with Maven

Trying to execute a Flink job, compiled with Maven, in Amazon Kinesis Data Analytics and I get the following error:
"org.apache.flink.client.program.ProgramInvocationException: Neither a 'Main-Class', nor a 'program-class' entry was found in the jar file."
I have tried several ways of defining the main class in the pom.xml-file.
Right now it looks like this:
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<manifestEntries>
<Main-Class>com.dataductus.maven.time_aggregator.TimeAggregator</Main-Class>
</manifestEntries>
</transformer>
Here is the pom.xml (the code gets weird when I format it in the comment):
https://textuploader.com/1cq7k
Here is the plugin:
https://textuploader.com/1cq7j
I use "mvn package" to package.
Any ideas?
You don't show the entire plugin configuration, or the command that you use to build the JAR, or the contents of the manifest file (if any), so there are many possible causes.
However, my guess is that you're using an older version of the plugin, so that the documentation here (which you seem to be following) may not apply.
The easiest solution is to follow the documentation here, has an explicit mainClass entry. I can assure you that works; I've been using it for at least ten years.
Thank you I will look at that.
Here is the pom.xml (the code gets weird when I format it in the comment):
https://textuploader.com/1cq7k
Here is the plugin:
https://textuploader.com/1cq7j
I use "mvn package" to package.
Problem solved. No idea what was wrong. I created another identical KDA-app which used the exact same jar and now it works. Strange.

The Xcode4.2 with ASIHTTPRequest configuration

I installed ASIHTTPRequest follow the document on their official site . But still have errors here. Please help. The related info is as follows :
Xcode 4.2 build 4D58
Lion 10.7.2
I can not upload the images because I am rookie here.(now I upload to site and linked here)
http://roundmov.com/project.png
build settings and build phrase png is here :
http://www.roundmov.com/buildphases.png
I have added all the files including external dir. and added libraries ,all of them in docs mentioned.
Even added the header search paths as $[SDKROOT]/usr/include/libxml2
But still have 107 or 67 errors . This problem has boring me one more day.
Thanks a lot in advance!
How can I disable ARC for a single file in a project?
If you follow the instructions here for all of the ASIHTTPRequest files it will compile as you need to disable arc on those files.
ah right, yep, so ASIHTTPRequest isn't ARC compatible and it doesn't look like that will change. i've never actually "downgraded" a project from ARC to non-ARC, but if it's something you've just started on you could create a new project and uncheck the ARC checkbox when you do and re-add all your existing files. this will mean you need to handle the memory management of objects (retain/release/autorelease).
this thread has more info:
https://groups.google.com/group/asihttprequest/browse_thread/thread/3f26e442dc6868e8
as an alternative, you could look into AFNetworking:
https://github.com/AFNetworking/AFNetworking
you still need to take some extra steps to get it working with ARC, but it doesn't look too bad.

How to extend the klee (llvm) build system?

Context
I am working on a klee (http://klee.llvm.org) fork and want to clean up our repository to separate our stuff from the "canonical" klee code. Anyway, I'm having trouble understanding/extending the build system.
Problem
The directory structure in /lib/ looks like this
Basic/
Core/
Support/
Expr/
Solver/
Module/
Mine/
Mine was just added by me, so far we threw everything in Core and I am moving it to Mine. How do I tell the build system to do this properly?
My attempt
Being unable to figure this out on my own, I edited /lib/Makefile:
LEVEL=..
PARALLEL_DIRS=Basic Support Expr Solver Module Core Mine
include $(LEVEL)/Makefile.common
and copied the /lib/Core/Makefile to /lib/Mine/Makefile while changing LIBRARYNAME=kleeCore to LIBRARYNAME=kleeMine.
Caveat
I have a feeling that this is not the proper way to do it, and I should rather modify some configure script or something. Also it does not link (it compiles, though).
A colleague just told me how to get it to link, which is by modifying /tools/klee/Makefile
USEDLIBS = kleeCore.a kleeModule.a kleaverSolver.a kleaverExpr.a kleeSupport.a kleeBasic.a kleeMine.a

Can I create a cross-project source reference in redmine?

If you have two separate projects that is somehow connected. How can one make a reference to the source of the other project?
For referencing the source of your own project you use:
source:some/file
But since I want to refer to code in another project my thought was that I could write something like:
other_project:source:some/file
Anyone that knows if this is possible in some way? I have read http://www.redmine.org/wiki/redmine/RedmineTextFormatting#Redmine-links but found no clues there.
Apparently this was implemented in Redmine 1.2.0 (released 2011-05-30). The syntax is exactly the one you suggested in the question, other_project:source:some/file, other_project being the project identifier.
It is possible in a couple of ways - although neither solution is particularly neat.
use an external html link to the other_project source code, where other-proj is the identifier for the other project.
"other project source":http://myserver:3000/projects/other-proj/repository/entry/file.txt
define the source path via the parent directories, so from the source directory of your current project go up 3 directory levels before navigating back down to the repository of your other project. Note the source link needs to be inside double quotes to work. This method at least keeps the source tag at the front of the link.
source:"../../../other-proj/repository/entry/file.txt"
The Redmine Text Formatting page says the format is:
source:repo_identifier|some/file
Even so, the selected answer works for my version of Redmine (1.4.2), but it may have been changed in later versions. This link format was added to that wiki page on 2012-08-27, after OP asked their question.