Error compile apk in appcelerator - appcelerator

I try to compile apk using Appcelerator but i get this error and i using module ti.cloudpush. How to solve it.
Currently I'm using Titanium sdk: 5.2.0.GA
[ERROR] : Failed to run dexer:
[ERROR] :
[ERROR] : Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/dynamic/LifecycleDelegate;
[ERROR] : Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/auth/GoogleAuthUtil;
[ERROR] : Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/auth/UserRecoverableAuthException;
[ERROR] : Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/auth/GoogleAuthException;
[ERROR] : Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/auth/GooglePlayServicesAvailabilityException;
[ERROR] : Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/auth/UserRecoverableNotifiedException;
[ERROR] : Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/common/GooglePlayServicesUtil;
[ERROR] : Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/common/UserRecoverableException;
[ERROR] : Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/common/AccountPicker;
[ERROR] :
[ERROR] : UNEXPECTED TOP-LEVEL EXCEPTION:
[ERROR] : java.lang.RuntimeException: Translation has been interrupted
[ERROR] : at com.android.dx.command.dexer.Main.processAllFiles(Main.java:608)
[ERROR] : at com.android.dx.command.dexer.Main.runMonoDex(Main.java:311)
[ERROR] : at com.android.dx.command.dexer.Main.run(Main.java:277)
[ERROR] : at com.android.dx.command.dexer.Main.main(Main.java:245)
[ERROR] : at com.android.dx.command.Main.main(Main.java:106)
[ERROR] : Caused by: java.lang.InterruptedException: Too many errors
[ERROR] : at com.android.dx.command.dexer.Main.processAllFiles(Main.java:600)
[ERROR] : ... 4 more
Here all the module that I used i the project
<modules>
<module platform="commonjs">ti.cloud</module>
<module platform="android">dk.napp.drawer</module>
<module platform="android">ti.admob</module>
<module platform="android">ti.ga</module>
<module platform="android">ti.cloudpush</module>
</modules>
Thanks

Google play services is included in ti.cloudpush, ti.admob, and ti.ga. You have conflicting versions of the library.
My recommendation is to select one version of google-play-services.jar and forcibly replace the jar files in all the modules with this one version.
I actually copied the ti.cloudpush module into my project directory so that I can maintain it directly (and keep the proper version of google-play-services.jar checked into my source code repository).
I have not had any problem if I replace the jar file with a newer version. You can cross-reference your jar file versions against this document: http://www.smorgasbork.com/2015/01/05/google-play-services-sdk-version-history/
BTW -- there is another module available for google analytics. I have used https://github.com/Sitata/titanium-google-analytics with much success. I'm not sure what the difference is between that one and Ti.GA (although I think Ben Bahrenburg is a great Ti developer, so I might have to look into that one).

Probably the problem is with the embedded google play services into cloudpush and admob, try to remove one of this module and see if it compile.

Related

java.nio.file.InvalidPathException while resolving sbt project

Great fan of Scala, but SBT keeps giving me tooth aches in places without teeth.
Usually I manage, but this one has me somewhat baffled.
Can anyone help me with the following:
TL/DR
While re-importing my sbt-project, I encountered the following error.
[error] (update) java.nio.file.InvalidPathException: Illegal char < > at index 90: C:\Users\\-username-\AppData\Local\Coursier\cache\v1\https\repo1.maven.org\maven2\io\cucumbe r\cucumber-junit\5.7.0\cucumber-junit-5.7.0.pom.lock
It seems that the import encountered some corrupt path including a tab character while resolving the cucumber dependency. The weird thing is, that this was a re-import; it imported fine before. Also, the actual path C:\Users\\-username-\AppData\Local\Coursier\cache\v1\https\repo1.maven.org\maven2\io\cucumbe r\cucumber-junit\5.7.0\ cannot be found, neither via the explorer or the shell.
The error first occurred while importing the project into Intellij, but using SBT via the shell yielded the same.
Details below.
Does anyone know how to:
- solve this?
- prevent it from happening again?
Project can be found here
Full SBT log:
[info] Loading global plugins from C:\Users\-username-\.sbt\1.0\plugins
[info] Loading settings for project sandbox-build from plugins.sbt ...
[info] Loading project definition from C:\coding\modules\scala\sandbox\project
[info] Loading settings for project sandbox from build.sbt ...
[info] Set current project to sandbox (in build file:/C:/coding/modules/scala/sandbox/)
[error] java.nio.file.InvalidPathException: Illegal char < > at index 90: C:\Users\-username-\AppData\Local\Coursier\cache\v1\https\repo1.maven.org\maven2\io\cucumbe r\cucumber-junit\6.0.0-RC2\cucumber-junit-6.0.0-RC2.pom.lock
[error] at java.base/sun.nio.fs.WindowsPathParser.normalize(WindowsPathParser.java:182)
[error] at java.base/sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:153)
[error] at java.base/sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:77)
[error] at java.base/sun.nio.fs.WindowsPath.parse(WindowsPath.java:92)
[error] at java.base/sun.nio.fs.WindowsFileSystem.getPath(WindowsFileSystem.java:229)
[error] at java.base/java.io.File.toPath(File.java:2311)
[error] at lmcoursier.internal.shaded.coursier.cache.CacheLocks$.withLockOr(CacheLocks.scala:35)
[error] at lmcoursier.internal.shaded.coursier.cache.FileCache.$anonfun$download$32(FileCache.scala:508)
[error] at scala.concurrent.Future$.$anonfun$apply$1(Future.scala:659)
[error] at scala.util.Success.$anonfun$map$1(Try.scala:255)
[error] at scala.util.Success.map(Try.scala:213)
[error] at scala.concurrent.Future.$anonfun$map$1(Future.scala:292)
[error] at scala.concurrent.impl.Promise.liftedTree1$1(Promise.scala:33)
[error] at scala.concurrent.impl.Promise.$anonfun$transform$1(Promise.scala:33)
[error] at scala.concurrent.impl.CallbackRunnable.run(Promise.scala:64)
[error] at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)
[error] at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630)
[error] at java.base/java.lang.Thread.run(Thread.java:832)
[error] (update) java.nio.file.InvalidPathException: Illegal char < > at index 90: C:\Users\-username-\AppData\Local\Coursier\cache\v1\https\repo1.maven.org\maven2\io\cucumbe r\cucumber-junit\6.0.0-RC2\cucumber-junit-6.0.0-RC2.pom.lock
[error] Total time: 1 s, completed 4 jun. 2020 13:57:57```
Already tried to
clear the Coursier cache by deleting the C:\Users\-username-\AppData\Local\Coursier\cache\ directory
clear the project by deleting the ./target and ./project/target directories
update the offending Cucumber dependencies to 6.0.0-RC2
It seems that the lock file still exists somewhere and SBT can't re-download itself?
As the exception reports there are 6 spaces or a tab to many. Exactly the ones in your build.sbt file on line 52: "io.cucumbe\t r". Happy programming!

Service is not registered class='interface org.eclipse.tycho.core.shared.ProxyServiceFacade'

Our Jenkins has a Maven/Tycho build using Java8 that worked perfectly in February, but stopped working now in April. (Since it was not run during this interval, I'm not sure when it stopped working exactly.)
The exception that gets thrown right after downloading the p2 repositories (or maybe right in the middle) is:
[WARNING] Error initializing: org.eclipse.tycho.p2.resolver.P2DependencyResolver#18bef28
java.lang.RuntimeException: java.lang.IllegalStateException: Service is not registered class='interface org.eclipse.tycho.core.shared.ProxyServiceFacade'
at org.eclipse.sisu.equinox.embedder.internal.DefaultEquinoxEmbedder.checkStarted (DefaultEquinoxEmbedder.java:312)
at org.eclipse.sisu.equinox.embedder.internal.DefaultEquinoxEmbedder.getService (DefaultEquinoxEmbedder.java:286)
at org.eclipse.sisu.equinox.embedder.internal.DefaultEquinoxEmbedder.getService (DefaultEquinoxEmbedder.java:281)
at org.eclipse.tycho.p2.resolver.P2DependencyResolver.initialize (P2DependencyResolver.java:429)
Caused by: java.lang.IllegalStateException: Service is not registered class='interface org.eclipse.tycho.core.shared.ProxyServiceFacade'
at org.eclipse.sisu.equinox.embedder.internal.DefaultEquinoxEmbedder.getService (DefaultEquinoxEmbedder.java:302)
at org.eclipse.sisu.equinox.embedder.internal.DefaultEquinoxEmbedder.getService (DefaultEquinoxEmbedder.java:281)
at org.eclipse.tycho.osgi.configuration.OSGiProxyConfigurator.afterFrameworkStarted (OSGiProxyConfigurator.java:41)
at org.eclipse.sisu.equinox.embedder.internal.DefaultEquinoxEmbedder.doStart (DefaultEquinoxEmbedder.java:185)
...and...
[WARNING] Error injecting: org.eclipse.tycho.p2.resolver.P2DependencyResolver
com.google.inject.ProvisionException: Unable to provision, see the following errors:
1) Error notifying InjectionListener org.eclipse.sisu.plexus.PlexusBeanBinder#1b6fe69 of org.eclipse.tycho.p2.resolver.P2DependencyResolver.
Reason: java.lang.RuntimeException: java.lang.IllegalStateException: Service is not registered class='interface org.eclipse.tycho.core.shared.ProxyServiceFacade'
while locating org.eclipse.tycho.p2.resolver.P2DependencyResolver
1 error
at com.google.inject.internal.InternalProvisionException.toProvisionException (InternalProvisionException.java:226)
at com.google.inject.internal.InjectorImpl$1.get (InjectorImpl.java:1053)
at com.google.inject.internal.InjectorImpl.getInstance (InjectorImpl.java:1086)
at org.eclipse.sisu.space.AbstractDeferredClass.get (AbstractDeferredClass.java:48)
...and of course...
[ERROR] Internal error: java.lang.RuntimeException: Could not instantiate required component: com.google.inject.ProvisionException: Unable to provision, see the following errors:
[ERROR]
[ERROR] 1) Error notifying InjectionListener org.eclipse.sisu.plexus.PlexusBeanBinder#1b6fe69 of org.eclipse.tycho.p2.resolver.P2DependencyResolver.
[ERROR] Reason: java.lang.RuntimeException: java.lang.IllegalStateException: Service is not registered class='interface org.eclipse.tycho.core.shared.ProxyServiceFacade'
[ERROR] while locating org.eclipse.tycho.p2.resolver.P2DependencyResolver
[ERROR] at ClassRealm[extension>org.eclipse.tycho:tycho-maven-plugin:1.3.0, parent: sun.misc.Launcher$AppClassLoader#647e05] (via modules: org.eclipse.sisu.wire.WireModule -> org.eclipse.sisu.plexus.PlexusBindingModule)
[ERROR] while locating org.eclipse.tycho.core.DependencyResolver annotated with #com.google.inject.name.Named(value=p2)
[ERROR]
[ERROR] 1 error
[ERROR] role: org.eclipse.tycho.core.DependencyResolver
[ERROR] roleHint: p2
[ERROR] -> [Help 1]
My first thought was that Maven takes new releases of it's plug-ins, but there are no versions missing in the pom.xml and Maven does not warn about it either.
I tried updating from Tycho 0.22 to 0.26 to 1.3, but neither version worked.
I tried running the build with Maven 3.0 and 3.6, but neither worked.
I tried Java 8 with 32bit and 64bit, and Java 11.
Now I have no idea where to even start to search for the source of the problem. Can anyone shed some light on this?
(If you need some more information, just ask. The files are pretty long, so I'd rather not copy all of them into this question before narrowing down where the problem might be.)
It helped for me to clean local maven repository.
Normally its located in <User-home>/.m2
HTH
I think I have similar setup as yours: An Eclipse RCP project which should be build on Jenkins in a Docker container by Maven/Tycho.
The following issue gave me a hint in the right direction: https://bugs.eclipse.org/bugs/show_bug.cgi?id=552877
When I ran Maven with -X I got the following debug-output:
[DEBUG] Using local repository at ?/.m2/repository
This led me to the following question: Why does maven use "?" as my home directory
But additionally to the -s argument I also needed to set the user.home parameter explicitly. (But that is probably only needed because I have not set the local repository location in the settings.xml)
This finally results in this Maven call: mvn -B clean verify --fail-at-end -s /some/folder/settings.xml -Duser.home=/another/folder

Maven compilation failure error

When i compile my bdd frame work in java getting the following compilation error.I am new to this.
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.
2:compile (default-compile) on project workflows.automation: Compilation
failure: Compilation failure:
[ERROR] /C:/OFFICIAL/BDDFramework/workflows.automation/src/main/java/bdd
/automation/pages/LoginPage.java:[23,1] package org.jbehave.core
.annotations does not exist
[ERROR] /C:/OFFICIAL/BDDFramework/workflows.automation/src/main/java/bdd
/automation/pages/LoginPage.java:[31,11] cannot find symbol
[ERROR] symbol: class BeforeStory
[ERROR] location: class bdd.automation.pages.LoginPage
[ERROR] -> [Help 1]
The error says that jbehave core is missing at compilation time. Add jbehave-core into your pom.xml as a new maven dependency.
See https://mvnrepository.com/artifact/org.jbehave/jbehave-core

Failed to run dexer: Appcelerator Android build_ Titanium SDK: 7.0.1

I am getting "Failed to run dexer:" while trying to build for Android using Appcelerator.
Appc Studio 5.0.0, Titanium SDK: 7.0.1
Error is as given below:
[ERROR] : Failed to run dexer:
[ERROR] :
[ERROR] : Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroid/support/annotation/AnimRes;
[ERROR] : Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroid/support/annotation/AnimatorRes;
[ERROR] : Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroid/support/annotation/AnyRes;
[ERROR] : Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroid/support/annotation/ArrayRes;
[ERROR] : Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroid/support/annotation/AttrRes;
[ERROR] : Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroid/support/annotation/BinderThread;
[ERROR] : Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroid/support/annotation/BoolRes;
[ERROR] : Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroid/support/annotation/CallSuper;
[ERROR] : Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroid/support/annotation/CheckResult;
[ERROR] :
[ERROR] : UNEXPECTED TOP-LEVEL EXCEPTION:
[ERROR] : java.lang.RuntimeException: Translation has been interrupted
[ERROR] : at com.android.dx.command.dexer.Main.processAllFiles(Main.java:615)
[ERROR] : at com.android.dx.command.dexer.Main.runMultiDex(Main.java:368)
[ERROR] : at com.android.dx.command.dexer.Main.runDx(Main.java:289)
[ERROR] : at com.android.dx.command.dexer.Main.main(Main.java:247)
[ERROR] : at com.android.dx.command.Main.main(Main.java:94)
[ERROR] : Caused by: java.lang.InterruptedException: Too many errors
[ERROR] : at com.android.dx.command.dexer.Main.processAllFiles(Main.java:607)
[ERROR] : ... 4 more
[ERROR] Application Installer abnormal process termination. Process exit value was 1
Not sure how we can enable Multi dex in appcelerator.
As of now, you can only cross-check which modules are using same set of libraries with different versions & then use a single version of library for all conflicting modules.
e.g. If you use ti.map & firebase.core, then you can use ti.playservices for both modules.
But in your case, the conflicting libraries are from Annotation lib, then you can either provide a list of all your modules here so we can check which one is causing this issue, or you can check yourself for conflicting modules & follow above process to resolve them.

Execute failed: java.io.IOException: Cannot run program "mkdir"

I am trying to build maven project.I am getting following error. The complete stack trace is below
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:1.7:run (rpmbuild) on project ers: An Ant BuildException has occured: The following error occurred while executing this line:
[ERROR] C:\Users\XYZ-PC\git\ers\target\rpm-spec-template\rpmbuild.xml:4: Execute failed: java.io.IOException: Cannot run program "mkdir": CreateProcess error=2, The system cannot find the file specified
[ERROR] around Ant part ...<ant antfile="C:\Users\XYZ-PC\git\ers\target/rpm-spec-template/rpmbuild.xml"/>... # 4:93 in C:\Users\XYZ-PC\git\ers\target\antrun\build-main.xml
[ERROR] -> [Help 1]
I have tried searching out this problem but all I found is that may be its JRE problem, I have checked and made sure that my source is using JDK not JRE.
I am stuck and any help would be appreciated.

Resources