Errors when run app on android (appcelerator titanium) - android

OS : Mac El Capitan
SDK: 5.2.0.GA
Run from CLI
tn --android --emulator --device-id "Google Nexus 5 - 5.1.0 - API 22 - 1080x1920" --liveview
[ERROR] Failed to run dexer:
[ERROR]
[ERROR] Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/internal/zzrn;
[ERROR] Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/internal/zzrp;
[ERROR] Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/internal/zzro;
[ERROR] Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/internal/zzrl;
[ERROR] Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/internal/zzrm;
[ERROR] Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/common/zzc;
[ERROR] Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/common/ConnectionResult;
[ERROR] Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/common/zza;
[ERROR] Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/common/Scopes;
[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

The issue from com.pushwoosh.module v1.2.0 module , it conflected with ti.map v2.3.8 module .
https://github.com/Pushwoosh/pushwoosh-appcelerator-titanium/issues/15
Solution :-
I found a workaround. I delete google-play-services.jar from Pushwoosh
module and it works!!!
Ti.map has two libraries: google-play-services-base.jar and
google-play-services-map.jar

Related

appcelerator dexer fails with Uncaught translation error when using module

Using Appcelerator with Titanium SDK 6.2.2.GA (the same happens with any 6.x SDK).
I create a new project module, compile it (for 6.2.2) and install it in the SDK (6.2.2).
Then I create a new Mobile App project (Clasic, Single Window, No Cloud) and add the previously created module to it.
I compile to run and the result is :
[ERROR] : Failed to run dexer:
[ERROR] :
[ERROR] : Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroid/support/compat/R;
[ERROR] : Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroid/support/compat/R$anim;
[ERROR] : Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroid/support/compat/R$animator;
[ERROR] : Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroid/support/compat/R$attr;
[ERROR] : Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroid/support/compat/R$bool;
[ERROR] : Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroid/support/compat/R$color;
[ERROR] : Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroid/support/compat/R$dimen;
[ERROR] : Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroid/support/compat/R$drawable;
[ERROR] : Uncaught translation error: java.lang.IllegalArgumentException: already added: Landroid/support/compat/R$id;
[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.runMultiDex(Main.java:366)
[ERROR] : at com.android.dx.command.dexer.Main.run(Main.java:275)
[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
I have tried :
Other Java versions
Other android build tools versions
When doing the same with SDK 5.x.x.GA it works fine. The problem started when I installed Axway Appcelerator Studio, build: 4.10.0.201709271713 and attempted to compile my project with Titanium SDK 6.2.2.GA. (Before I was using 5.x.x).
Any ideas welcome.
Version 6.2.2.GA requires you to use Android SDK 26 and build tools 26. Before 6.2 you needed build tools 23.
You can force a version in the tiapp.xml file in the android manifest section
<uses-sdk android:minSdkVersion="19" android:targetSdkVersion="23"/>
As always, check the Compatibilty matrix of Titanium
After uninstalling Appcelerator Studio, reinstalling and setting the path for NDK to use android-ndk-r11c and also installing GNU gperf the problem is fixed.

Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/iid/MessengerCompat;

I am using titanium SDK 6.0.1.GA and compiling to Android.
I have this error.
[ERROR] Failed to run dexer:
[ERROR]
[ERROR] Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/iid/MessengerCompat;
[ERROR] Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/iid/MessengerCompat$1;
[ERROR] Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/iid/MessengerCompat$zza;
[ERROR] Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/iid/zzb;
[ERROR] Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/iid/zzb$zza;
[ERROR] Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/iid/zzb$zza$zza;
[ERROR] 6 errors; aborting
Maybe it is related to geolocation.jar I guess though, couldn't find any solution.
I am using the ti.map and ti.ga for this application.
This is the android.log
These are the depiction of log below.
[INFO] Running dexer: /Library/Java/JavaVirtualMachines/jdk1.8.0_92.jdk/Contents/Home/bin/java "-Xmx1024M" "-XX:-UseGCOverheadLimit" "-Djava.ext.dirs=/Users/whitebear/Library/Android/sdk/platform-tools" "-jar" "/Users/whitebear/Library/Android/sdk/build-tools/23.0.2/lib/dx.jar" "--dex" "--multi-dex" "--output=/Users/whitebear/CodingWorks/httproot/okayamaARNew/build/android/bin/dexfiles" "/Users/whitebear/CodingWorks/httproot/okayamaARNew/build/android/bin/classes" "/Users/whitebear/Library/Application Support/Titanium/mobilesdk/osx/6.0.1.GA/android/lib/titanium-verify.jar" "/Users/whitebear/Library/Application Support/Titanium/modules/android/com.wikitude.ti/6.0.0/wikitudeand.jar" "/Users/whitebear/Library/Application Support/Titanium/modules/android/com.wikitude.ti/6.0.0/lib/wikitudesdk_32bit.jar" "/Users/whitebear/Library/Application Support/Titanium/modules/android/ti.map/3.1.0/map.jar" "/Users/whitebear/Library/Application Support/Titanium/modules/android/ti.map/3.1.0/lib/google-play-services-base.jar" "/Users/whitebear/Library/Application Support/Titanium/modules/android/ti.map/3.1.0/lib/google-play-services-map.jar" "/Users/whitebear/CodingWorks/httproot/okayamaARNew/modules/android/ti.ga/3.0.7/tiga.jar" "/Users/whitebear/CodingWorks/httproot/okayamaARNew/modules/android/ti.ga/3.0.7/lib/google-play-services-analytics.jar" "/Users/whitebear/CodingWorks/httproot/okayamaARNew/modules/android/nl.vanvianen.android.gcm/1.7/gcm.jar" "/Users/whitebear/CodingWorks/httproot/okayamaARNew/modules/android/nl.vanvianen.android.gcm/1.7/lib/gcm-server.jar" "/Users/whitebear/CodingWorks/httproot/okayamaARNew/modules/android/nl.vanvianen.android.gcm/1.7/lib/google-play-services-gms.jar" "/Users/whitebear/CodingWorks/httproot/okayamaARNew/modules/android/nl.vanvianen.android.gcm/1.7/lib/gson-2.3.1.jar" "/Users/whitebear/Library/Application Support/Titanium/mobilesdk/osx/6.0.1.GA/android/kroll-v8.jar" "/Users/whitebear/Library/Application Support/Titanium/mobilesdk/osx/6.0.1.GA/android/modules/titanium-analytics.jar" "/Users/whitebear/Library/Application Support/Titanium/mobilesdk/osx/6.0.1.GA/android/aps-analytics.jar" "/Users/whitebear/Library/Application Support/Titanium/mobilesdk/osx/6.0.1.GA/android/modules/titanium-android.jar" "/Users/whitebear/Library/Application Support/Titanium/mobilesdk/osx/6.0.1.GA/android/jaxen-1.1.1.jar" "/Users/whitebear/Library/Application Support/Titanium/mobilesdk/osx/6.0.1.GA/android/ti-commons-codec-1.3.jar" "/Users/whitebear/Library/Application Support/Titanium/mobilesdk/osx/6.0.1.GA/android/kroll-common.jar" "/Users/whitebear/Library/Application Support/Titanium/mobilesdk/osx/6.0.1.GA/android/titanium.jar" "/Users/whitebear/Library/Application Support/Titanium/mobilesdk/osx/6.0.1.GA/android/android-support-multidex.jar" "/Users/whitebear/Library/Application Support/Titanium/mobilesdk/osx/6.0.1.GA/android/modules/titanium-filesystem.jar" "/Users/whitebear/Library/Application Support/Titanium/mobilesdk/osx/6.0.1.GA/android/modules/titanium-app.jar" "/Users/whitebear/Library/Application Support/Titanium/mobilesdk/osx/6.0.1.GA/android/modules/titanium-ui.jar" "/Users/whitebear/Library/Application Support/Titanium/mobilesdk/osx/6.0.1.GA/android/nineoldandroids-appc-2.4.0.jar" "/Users/whitebear/Library/Application Support/Titanium/mobilesdk/osx/6.0.1.GA/android/modules/titanium-media.jar" "/Users/whitebear/Library/Application Support/Titanium/mobilesdk/osx/6.0.1.GA/android/modules/titanium-appcompat.jar" "/Users/whitebear/Library/Application Support/Titanium/mobilesdk/osx/6.0.1.GA/android/android-support-v4.jar" "/Users/whitebear/Library/Application Support/Titanium/mobilesdk/osx/6.0.1.GA/android/android-support-v7-appcompat.jar" "/Users/whitebear/Library/Application Support/Titanium/mobilesdk/osx/6.0.1.GA/android/modules/titanium-cardview.jar" "/Users/whitebear/Library/Application Support/Titanium/mobilesdk/osx/6.0.1.GA/android/cardview-v7-23.0.1.jar" "/Users/whitebear/Library/Application Support/Titanium/mobilesdk/osx/6.0.1.GA/android/modules/titanium-locale.jar" "/Users/whitebear/Library/Application Support/Titanium/mobilesdk/osx/6.0.1.GA/android/modules/titanium-network.jar" "/Users/whitebear/Library/Application Support/Titanium/mobilesdk/osx/6.0.1.GA/android/modules/titanium-xml.jar" "/Users/whitebear/Library/Application Support/Titanium/mobilesdk/osx/6.0.1.GA/android/modules/titanium-platform.jar" "/Users/whitebear/Library/Application Support/Titanium/mobilesdk/osx/6.0.1.GA/android/modules/titanium-gesture.jar" "/Users/whitebear/Library/Application Support/Titanium/mobilesdk/osx/6.0.1.GA/android/modules/titanium-geolocation.jar"
[ERROR] Failed to run dexer:
[ERROR]
[ERROR] Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/iid/MessengerCompat;
[ERROR] Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/iid/MessengerCompat$1;
[ERROR] Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/iid/MessengerCompat$zza;
[ERROR] Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/iid/zzb;
[ERROR] Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/iid/zzb$zza;
[ERROR] Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/iid/zzb$zza$zza;
[ERROR] 6 errors; aborting
Get the google-play-services-base.jar from ~/Library/Application Support/Titanium/modules/android and replace it in all your modules, so you can be sure that there won't be a conflict between them.
Now you have to get rid of the classes inside the others jar (like google-play-services-analytics.jar for instance) which are already inside the google-play-services-base.jar, so unzip the guilty library, remove the duplicated classes, and re-create the jar with the command:
jar cf google-play-services-analytics.jar ./com
For doing these things you can also use proguard, but the procedure above could be enough. I wrote about this problem on my blog http://mpic.it/snellire-la-libreria-google-play-services-jar-con-proguard/ but it's in Italian.

readlink('/proc/self/fd/21') failed: Permission denied [fd=21] error in Android 6 after adding Admob module to Appcelerator app

im creating app in appcelerator studio. It worked without errors on my Android 6 Lenovo a7000, until I added admob module to it. Now Im getting these errors:
[ERROR] : linker: readlink('/proc/self/fd/21') failed: Permission denied [fd=21]
[ERROR] : linker: warning: unable to get realpath for the library "/data/app/com.techintegrity.ekko-1/lib/arm/libti.admob.so". Will use given name.
[ERROR] : TiApplication: (KrollRuntimeThread) [77,153] Sending event: exception on thread: KrollRuntimeThread msg:java.lang.UnsatisfiedLinkError: dlopen failed: /data/app/com.techintegrity.ekko-1/lib/arm/libti.admob.so: has text relocations; Titanium 5.2.0,2016/02/20 08:05,384775e
[ERROR] : TiApplication: java.lang.UnsatisfiedLinkError: dlopen failed: /data/app/com.techintegrity.ekko-1/lib/arm/libti.admob.so: has text relocations
[ERROR] : TiApplication: at java.lang.Runtime.loadLibrary(Runtime.java:372)
[ERROR] : TiApplication: at java.lang.System.loadLibrary(System.java:1076)
[ERROR] : TiApplication: at org.appcelerator.kroll.runtime.v8.V8Runtime.loadExternalModules(V8Runtime.java:132)
[ERROR] : TiApplication: at org.appcelerator.kroll.runtime.v8.V8Runtime.initRuntime(V8Runtime.java:99)
[ERROR] : TiApplication: at org.appcelerator.kroll.KrollRuntime.doInit(KrollRuntime.java:205)
[ERROR] : TiApplication: at org.appcelerator.kroll.KrollRuntime$KrollRuntimeThread.run(KrollRuntime.java:114)
I have updated everything: appcelerator studio, titanium sdk, node.js, but the problem is still the same. found few people with similar error, but nothing that worked for them seems working for me. Thanks for any help
Add following code to your config.xml.
<property name="run-on-main-thread" type="bool">true</property>
This will solve the problem

Getting error during dex with a project using javafx and apache POI

I'm trying to use Apache POI on Android in order to do that i created a gradle project on eclipse but when i execute the gradle task androidInstall i get an error during the dex step. (run task is working)
Here the error:
Uncaught translation error: java.lang.IllegalArgumentException: already added: Ljavax/xml/stream/EventFilter;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Ljavax/xml/stream/FactoryConfigurationError;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Ljavax/xml/stream/FactoryFinder;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Ljavax/xml/stream/FactoryFinder$1;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Ljavax/xml/stream/FactoryFinder$ClassLoaderFinder;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Ljavax/xml/stream/FactoryFinder$ClassLoaderFinderConcrete;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Ljavax/xml/stream/Location;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Ljavax/xml/stream/StreamFilter;
Uncaught translation error: java.lang.IllegalArgumentException: already added: Ljavax/xml/stream/XMLEventFactory;
UNEXPECTED TOP-LEVEL EXCEPTION:
java.lang.RuntimeException: Translation has been interrupted
at com.android.dx.command.dexer.Main.processAllFiles(Main.java:613)
at com.android.dx.command.dexer.Main.runMultiDex(Main.java:366)
at com.android.dx.command.dexer.Main.run(Main.java:275)
at com.android.dx.command.dexer.Main.main(Main.java:245)
at com.android.dx.command.Main.main(Main.java:106)
Caused by: java.lang.InterruptedException: Too many errors
at com.android.dx.command.dexer.Main.processAllFiles(Main.java:605)
... 4 more
16:41:25.082 [ERROR] [org.gradle.api.internal.project.ant.AntLoggingAdapter] [ant:java] Java Result: 2
16:41:25.083 [DEBUG] [org.gradle.api.internal.project.ant.AntLoggingAdapter] Setting project property: dexResult -> 2
16:41:25.084 [DEBUG] [org.gradle.api.Project] Dex result value = 2
16:41:25.093 [DEBUG] [org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter] Finished executing task ':dex'
16:41:25.094 [LIFECYCLE] [class org.gradle.TaskExecutionLogger] :dex FAILED
16:41:25.095 [INFO] [org.gradle.execution.taskgraph.AbstractTaskPlanExecutor] :dex (Thread[Daemon worker Thread 2,5,main]) completed. Took 2 mins 19.455 secs.
16:41:25.095 [DEBUG] [org.gradle.execution.taskgraph.AbstractTaskPlanExecutor] Task worker [Thread[Daemon worker Thread 2,5,main]] finished, busy: 21 mins 29.722 secs, idle: 0.053 secs
16:41:25.103 [ERROR] [org.gradle.BuildExceptionReporter]
16:41:25.108 [ERROR] [org.gradle.BuildExceptionReporter] FAILURE: Build failed with an exception.
16:41:25.109 [ERROR] [org.gradle.BuildExceptionReporter]
16:41:25.109 [ERROR] [org.gradle.BuildExceptionReporter] * What went wrong:
16:41:25.109 [ERROR] [org.gradle.BuildExceptionReporter] Execution failed for task ':dex'.
16:41:25.110 [ERROR] [org.gradle.BuildExceptionReporter] > warning: Ignoring InnerClasses attribute for an anonymous inner class
16:41:25.110 [ERROR] [org.gradle.BuildExceptionReporter] (org.apache.xmlbeans.XmlBeans$1) that doesn't come with an
16:41:25.111 [ERROR] [org.gradle.BuildExceptionReporter] associated EnclosingMethod attribute. This class was probably produced by a
16:41:25.111 [ERROR] [org.gradle.BuildExceptionReporter] compiler that did not target the modern .class file format. The recommended
16:41:25.112 [ERROR] [org.gradle.BuildExceptionReporter] solution is to recompile the class from source, using an up-to-date compiler
16:41:25.112 [ERROR] [org.gradle.BuildExceptionReporter] and without specifying any "-target" type options. The consequence of ignoring
16:41:25.112 [ERROR] [org.gradle.BuildExceptionReporter] this warning is that reflective operations on this class will incorrectly
16:41:25.115 [ERROR] [org.gradle.BuildExceptionReporter] indicate that it is *not* an inner class.
16:41:25.115 [ERROR] [org.gradle.BuildExceptionReporter] warning: Ignoring InnerClasses attribute for an anonymous inner class
16:41:25.116 [ERROR] [org.gradle.BuildExceptionReporter] (org.apache.xmlbeans.XmlSimpleList$1) that doesn't come with an
16:41:25.140 [ERROR] [org.gradle.BuildExceptionReporter] associated EnclosingMethod attribute. This class was probably produced by a
16:41:25.140 [ERROR] [org.gradle.BuildExceptionReporter] compiler that did not target the modern .class file format. The recommended
16:41:25.140 [ERROR] [org.gradle.BuildExceptionReporter] solution is to recompile the class from source, using an up-to-date compiler
16:41:25.141 [ERROR] [org.gradle.BuildExceptionReporter] and without specifying any "-target" type options. The consequence of ignoring
16:41:25.141 [ERROR] [org.gradle.BuildExceptionReporter] this warning is that reflective operations on this class will incorrectly
16:41:25.141 [ERROR] [org.gradle.BuildExceptionReporter] indicate that it is *not* an inner class.
16:41:25.141 [ERROR] [org.gradle.BuildExceptionReporter] warning: Ignoring InnerClasses attribute for an anonymous inner class
16:41:25.142 [ERROR] [org.gradle.BuildExceptionReporter] (org.apache.xmlbeans.XmlSimpleList$2) that doesn't come with an
16:41:25.142 [ERROR] [org.gradle.BuildExceptionReporter] associated EnclosingMethod attribute. This class was probably produced by a
16:41:25.142 [ERROR] [org.gradle.BuildExceptionReporter] compiler that did not target the modern .class file format. The recommended
16:41:25.142 [ERROR] [org.gradle.BuildExceptionReporter] solution is to recompile the class from source, using an up-to-date compiler
16:41:25.143 [ERROR] [org.gradle.BuildExceptionReporter] and without specifying any "-target" type options. The consequence of ignoring
16:41:25.143 [ERROR] [org.gradle.BuildExceptionReporter] this warning is that reflective operations on this class will incorrectly
16:41:25.143 [ERROR] [org.gradle.BuildExceptionReporter] indicate that it is *not* an inner class.
...
I read that i needed to add this to ignore warning but i get another error on compileSdkVersion
lintOptions {
abortOnError false
}
and here is my build.gradle file:
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'org.javafxports:jfxmobile-plugin:1.0.0-b8'
}
}
apply plugin: 'org.javafxports.jfxmobile'
mainClassName = "JavaFXStage"
version = '1.0'
repositories {
jcenter()
}
jfxmobile {
ios {
forceLinkClasses = ['ensemble.**.*']
}
android {
javafxportsVersion = '8u40-b5'
compileSdkVersion = 23
applicationPackage = 'any.package.name'
}
}
dependencies{
def poiVersion = "3.10.1"
compile "org.apache.poi:poi:${poiVersion}"
compile "org.apache.poi:poi-ooxml:${poiVersion}"
compile "org.apache.poi:ooxml-schemas:1.1"
compile "org.apache.xmlbeans:xmlbeans:2.6.0"
}
If you need more information about the project don't hesitate to ask.
If you have any tips to solve my problem thanks.
Thomas
Using Apache POI on Android does not work out of the box due to a number of limitations. Among one of them is the fact that the xmlbeans jar contains some classes multiple times, which confuses the Android compiler. There are also issues about code from pacakge javax and the size of the code.
There are currently two projects which try to solve this:
https://github.com/centic9/poi-on-android/ (maintained by me)
https://github.com/andruhon/android5xlsx
Both try to solve this by re-packaging the classes into a more compact jar file which can then be added to an Android application. Android5xlsx is based on POI 3.12 currently, poi-on-android on 3.15-beta1 and can be re-built against recent versions of POI fairly easily.
I solved the error in the Dex step by excluding xmlbeans in the gradle.build:
compile 'org.apache.poi:poi:3.16'
compile ('org.apache.poi:poi-ooxml:3.16') {
exclude group: 'org.apache.xmlbeans', module: 'xmlbeans'
}
In my java code I didn't use xmlbeans but other parsers. Here's my import list:
import org.apache.poi.hssf.usermodel.HSSFCell;
import org.apache.poi.hssf.usermodel.HSSFRow;
import org.apache.poi.hssf.usermodel.HSSFSheet;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import org.apache.poi.xssf.usermodel.XSSFCell;
import org.apache.poi.xssf.usermodel.XSSFRow;
import org.apache.poi.xssf.usermodel.XSSFSheet;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
import javax.xml.parsers.DocumentBuilder;
import org.w3c.dom.Document;
import org.w3c.dom.NodeList;
import org.xml.sax.SAXException;
import org.w3c.dom.Node;
import org.w3c.dom.Element;
import java.util.zip.ZipEntry;
import java.util.zip.ZipInputStream;

Appcelerator - androdi.support.v4

When I compile the project this error appears:
[ERROR] : Failed to compile Java source files:
[ERROR] :
[ERROR] : /Users/acavero/Documents/Titanium_Studio_Workspace/Manager/build/android/gen/es/renr/manager/ManagerActivity.java:5: error: cannot access TaskStackBuilder
[ERROR] : public final class ManagerActivity extends TiRootActivity
[ERROR] : ^
[ERROR] : class file for android.support.v4.app.TaskStackBuilder not found
[ERROR] : /Users/acavero/Documents/Titanium_Studio_Workspace/Manager/build/android/gen/es/renr/manager/ManagerApplication.java:149: error: cannot access FragmentActivity
[ERROR] : org.appcelerator.titanium.TiVerify verify = new org.appcelerator.titanium.TiVerify(rootActivity, this);
[ERROR] : ^
[ERROR] : class file for android.support.v4.app.FragmentActivity not found
[ERROR] : Note: /Users/acavero/Documents/Titanium_Studio_Workspace/Manager/build/android/gen/es/renr/manager/AssetCryptImpl.java uses unchecked or unsafe operations.
[ERROR] : Note: Recompile with -Xlint:unchecked for details.
[ERROR] : 2 errors
TRACE | titanium exited with exit code 1
ERROR | Error: ti run exited with error code 1
at ChildProcess.<anonymous> (/Users/acavero/.appcelerator/install/4.0.2/package/node_modules/appc-cli-titanium/plugins/run.js:84:66)
at ChildProcess.emit (events.js:98:17)
at Process.ChildProcess._handle.onexit (child_process.js:810:12)
[ERROR] Application Installer abnormal process termination. Process exit value was 1
I haven't got any idea to what is happening...
It's an appcelerator project (alloy) so I can't add de library (.jar) to the project I think..
Please help me
Thank you.
*** SOLUTION ****
The only solution I found is include a module with this library. But it's a pity have to create a module only for this library...
You might want to bring this up in the official Q&A at http://community.appcelerator.com and include information about the Titanium SDK and Android min/target versions set in your tiapp.xml.

Categories

Resources