When i try to run my application it gives me this error.. But why ?
[ERROR] Exception occurred while building Android project:
[ERROR] Traceback (most recent call last):
[ERROR] File "C:\Users\ThomasBolander\AppData\Roaming\Titanium\mobilesdk\win32\2.1.2.GA\android\builder.py", line 2243, in <module>
[ERROR] s.build_and_run(True, avd_id, device_args=device_args)
[ERROR] File "C:\Users\ThomasBolander\AppData\Roaming\Titanium\mobilesdk\win32\2.1.2.GA\android\builder.py", line 2068, in build_and_run
[ERROR] launched, launch_failed = self.package_and_deploy()
[ERROR] File "C:\Users\ThomasBolander\AppData\Roaming\Titanium\mobilesdk\win32\2.1.2.GA\android\builder.py", line 1585, in package_and_deploy
[ERROR] unsigned_apk = self.create_unsigned_apk(ap_)
[ERROR] File "C:\Users\ThomasBolander\AppData\Roaming\Titanium\mobilesdk\win32\2.1.2.GA\android\builder.py", line 1447, in create_unsigned_apk
[ERROR] resources_zip = zipfile.ZipFile(resources_zip_file)
[ERROR] File "C:\Users\ThomasBolander\AppData\Local\Titanium Studio\plugins\com.appcelerator.titanium.python.win32_1.0.0.1338515509\python\lib\zipfile.py", line 671, in __init__
[ERROR] self.fp = open(file, modeDict[mode])
[ERROR] IOError: [Errno 2] No such file or directory: 'C:\\Users\\ThomasBolander\\Dropbox\\Praktikanten\\Apps\\Fritidsjob.dk Android Standard\\build\\android\\bin\\app.ap_'
Try the following:
Make sure that if you are using localization files, there are no errors in those.
If you are using any kind of module, make sure that module is compatible with your SDK.
Clean your solution and then run the project again.
Related
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.
I am trying to work with Auth0 in my project and when I try to include it in the build.gradle file I get an error. I've tried adding the following:
compile 'com.auth0.android:auth0:1.10.0'
and
compile 'com.auth0.android:auth0:1.+'
I get the following error:
Error:Execution failed for task ':app:processDebugManifest'.
> Manifest merger failed with multiple errors, see logs
I ran gradlew build --stacktrace and got this:
14:31:51.285 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] * What went wrong:
14:31:51.285 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] Execution failed for task ':app:processDebugManifest'.
14:31:51.285 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] > Manifest merger failed with multiple errors, see logs
14:31:51.285 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]
14:31:51.285 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] * Try:
14:31:51.285 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] Run with --stacktrace option to get the stack trace.
14:31:51.285 [LIFECYCLE] [org.gradle.internal.buildevents.BuildResultLogger]
14:31:51.286 [LIFECYCLE] [org.gradle.internal.buildevents.BuildResultLogger] BUILD FAILED
14:31:51.286 [LIFECYCLE] [org.gradle.internal.buildevents.BuildResultLogger]
14:31:51.286 [LIFECYCLE] [org.gradle.internal.buildevents.BuildResultLogger] Total time: 3.378 secs
What am I doing wrong?
Update
Opened AndroidManifest.xml and found this message in the Merged Manifest
Merging Errors: Error: Attribute data#host at AndroidManifest.xml requires a placeholder substitution but no value for <auth0Domain> is provided. app main manifest (this file) Error: Attribute data#scheme at AndroidManifest.xml requires a placeholder substitution but no value for <auth0Scheme> is provided. app main manifest (this file)
Answering my own question here:
The merged manifest had the error
Attribute data#host at AndroidManifest.xml requires a placeholder substitution but no value for <auth0Domain> is provided. app main manifest (this file) Error: Attribute data#scheme at AndroidManifest.xml requires a placeholder substitution but no value for <auth0Scheme> is provided. app main manifest (this file)
Basically saying that auth0Domain and auth0Scheme needed values declared.
I needed to enter the line
manifestPlaceholders = [auth0Domain: "#string/com_auth0_domain", auth0Scheme: "demo"]
in the build.gradle file and then it compile just fine.
Basically follow through instructions before deciding that you're stuck, those instructions were here.
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
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
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.