Titanium - Can't use MapView - javascript

I'm using ti.app in my Titanium project. Trying to create a MapView and add it in app main view. It doesn't work on a tablet nor with Genymotion emulator (I have a Virtual device with Google Apps installed). The error is the following:
[ERROR] GooglePlayServicesUtil: The Google Play services resources were not found. Check your project configuration to ensure that the resources are included.
..
[ERROR] TiApplication: (main) [124,124] Sending event: exception on thread: main msg:java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/android/gms/R$string;; Titanium 6.1.1,2017/06/26 16:09,undefined
[ERROR] TiApplication: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/android/gms/R$string;
No errors at compile time. I followed the official documentation.

I solved using Nox App Player emulator.

Related

I am facing some errors in android studio after building the app, What can I do?

After building the app
When I run it on my virtual device it doesn't even open it keeps stopping
I checked the logcat
I found the error but i cannot fix it :(
(((This is the error)))
at android.app.ActivityThread.installProvider(ActivityThread.java:6247)
at android.app.ActivityThread.installContentProviders(ActivityThread.java:5810)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5727)
at android.app.ActivityThread.-wrap1(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1657)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6499)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:442)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
Caused by: java.lang.IllegalStateException:
at com.google.android.gms.internal.ads.zzze.attachInfo(Unknown Source:17)
at com.google.android.gms.ads.MobileAdsInitProvider.attachInfo(Unknown Source:3)
at android.app.ActivityThread.installProvider(ActivityThread.java:6244)
... 10 more
Double check your gradle file for correct import of ad services and upgrade all dependencies to the latest versions. Check out Set Up Google Play Services for more details. I say this because your error code states:
Caused by: java.lang.IllegalStateException:
at com.google.android.gms.internal.ads.zzze.attachInfo(Unknown Source:17)
at com.google.android.gms.ads.MobileAdsInitProvider.attachInfo(Unknown Source:3)
This seems to suggest that gms.ads is attempting to attach and the source is unknown. Please post your gradle files or more of the error code if updating the dependencies doesn't work.
Add your AppId in your manifest file like this
<manifest>
<application>
<!-- TODO: Replace with your real AdMob app ID -->
<meta-data
android:name="com.google.android.gms.ads.APPLICATION_ID"
android:value="ca-app-pub-################~##########"/>
</application>
https://ads-developers.googleblog.com/2018/10/announcing-v1700-of-android-google.html

Updating appcelerator caused android app to crash

I am having issues with appcelerator, anybody with pervious experience had any issues with it? if it wasn't for a 3 year project on appcelerator I would have switched. Anyway i believe to have fixed the error just need clarifying why i need to change this now when it worked perfectly before. This is the error that appears when I try and load a new window.
[ERROR] : TiExceptionHandler: (main) [6174,104116] ----- Titanium Javascript Runtime Error -----
[ERROR] : TiExceptionHandler: (main) [1,104117] - In ti:/view.js:19,10
[ERROR] : TiExceptionHandler: (main) [0,104117] - Message: Uncaught Error: Cannot add window/tabGroup to a view.
[ERROR] : TiExceptionHandler: (main) [1,104118] - Source: throw new Error("Cannot add window/tabGroup to a view.");
to fix the issue I have to switch all of my tags from <Window> to <View>. I believe the issue is to do with the fact you can't have two windows loaded at the same time, I just need clarification why it now suddenly has stopped working!!!
UPDATE
When I change the xml to <View> the android app will run fine, however this causes the iOS app to now no run, any ideas?
So the error is pretty straightforward, you cannot add a <Window> to a View. So... the root needs to be either a <Window> or <NavigationWindow>.
On Android the navigationWindow doesn't exist. So you need to have Android specific UI, or iOS specific UI. You can also use the commonJS module xp.ui for Titanium to get NavigationWindow to work on Android: https://github.com/FokkeZB/UTiL/blob/master/docs/xp.ui.md (just follow instructions how to install).
An app needs a Window or NavigationWindow as a root to work properly. So... having neither of these will make the app not work.
So I recommend the module, and then use NavigationWindow > Window construction.

App Crashes on Android 6 because module has text relocations

This is the error I got using adb logcat:
W V8Object: (KrollRuntimeThread) [33,34] Runtime disposed, cannot set property 'userAgent'
E linker : /data/app/com.app.id/lib/arm/module.id: has text relocations
I'm having this error when try to run my Titanium app on Android 6 device. As far as I know, this is something related to the NDK and my modules.
My problem is that I'm using around 5 or 6 modules on my app and I'm not able to recompile all of them. So, what can I do?
I also check this ticket:
https://jira.appcelerator.org/browse/TIMOB-19369
and also these issues on some modules repositories:
https://github.com/manumaticx/TiCrouton/issues/8
https://github.com/appcelerator-modules/ti.inappbilling/issues/14
My environment:
Ti SDK 5.1.2.GA
Android 6.0.1 on Nexus
My Android SDK:
important: it doesn't happen on any simulator
Thanks!

Fresh titanium hello world won't run on any emulator

Im completely new to titanium appcelerator and I did google this but only found outdated problems. I build a titanium alloy project I've installed xcode and connected the android sdk.
when I try to run on the the android emulator I get this error:
[ERROR] : Emulator process exited with code 1
[ERROR] : Build process exited with code 1
[ERROR] : Project failed to build after 1s 663ms
[ERROR] Application Installer abnormal process termination. Process exit value was 1`
when i try to run on the iPhone emulator I get this error
[ERROR] : An error occurred running the iOS Simulator
[ERROR] : [DEBUG] using retina iphone retina ios 7
[ERROR] :
[ERROR] : Project failed to build after 1m 25s 11ms
I really don't have an idea where this comes from, and I would appreciate any help.
Reset the Iphone simulator and you would be good to go
iOS Simulator->Reset Content and Settings...
Thanks

visual studio 11 javascript metro app deployment error

i am using the windows developer preview with the visual studio 11, when i create a blank javascript project and try to debug it , i got the following deployment error:
Error 1 Error DEP0700 : Registration of the application from layout "C:\Users\dassio\AppxLayouts\164051d0-bdaf-4ccc-b155-6fee67bc3a53VS.Debug.AnyCPU.dassio" failed for the following reason (please check the event viewer for possible additional details): Camera
Error 2 [VisualElements] The notifications helper failed with error : 0x80070490 [ErrorCode] Camera
what is happening here?
Change the Package Identity (open the manifest, go to the package tab and modify the identity).
http://social.msdn.microsoft.com/Forums/en-ZA/winappswithcsharp/thread/e5cd8997-d175-49f0-830e-78788ddd2a6b
Hope that helps.

Categories

Resources