Skip to content
This repository has been archived by the owner on Sep 13, 2021. It is now read-only.

full upgrade to Ti SDK 7.0.1 #21

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

killroyboy
Copy link

No description provided.

@kerberosargos
Copy link

Hi how can I download android dist version?

@killroyboy
Copy link
Author

@kerberosargos
Copy link

Thank you very much @killroyboy

@Astrovic
Copy link

Astrovic commented Jan 18, 2018

@killroyboy do you know how integrate ti.playservices? Using your version the build fails if in the project there are other android modules that use ti.playserveces, like ti.map or facebook

[ERROR] Failed to run dexer:
[ERROR]   
[ERROR] Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/analytics/CampaignTrackingReceiver;
[ERROR] Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/analytics/CampaignTrackingService;
[ERROR] Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/analytics/ExceptionParser;
[ERROR] Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/analytics/ExceptionReporter;
[ERROR] Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/analytics/GoogleAnalytics;
[ERROR] Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/analytics/HitBuilders;
[ERROR] Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/analytics/HitBuilders$AppViewBuilder;
[ERROR] Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/analytics/HitBuilders$EventBuilder;
[ERROR] Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/analytics/HitBuilders$ExceptionBuilder;
[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

@kerberosargos
Copy link

I do not know :) I am using 4 modules in my project. I found only 3 modules which were updated SDK 7.0. Because of that I have not upgraded my project to SDK 7 yet. My problem about this module https://github.com/arleyandrada/PushClient I am waiting its developer for upgrading. Can you give any suggestion about upgrading PushClient module to SDK 7?

@killroyboy
Copy link
Author

@Astrovic You need to remove the dependency of ti.playservice (in timodules.xml) in the other modules and rebuild them. Ti SDK 7.x leverages Google Play Services differently and so all modules need to be rebuilt.

@kerbooo You can download the source (fork and clone the repo) for PushClient and then issue the command to rebuild it. Details: http://docs.appcelerator.com/platform/latest/#!/guide/Android_Module_Upgrade_Guide

@kerberosargos
Copy link

kerberosargos commented Jan 19, 2018

Hi @killroyboy docs suggestion did not work for SDK 7.0 Do you have any suggestion for push client android and ios both plaform?

@killroyboy
Copy link
Author

@kerbooo What do you mean that it didn't work? Did you get errors when you ran appc run p android --build-only? Please provide as many details as possible.

@killroyboy
Copy link
Author

@kerberosargos
Copy link

kerberosargos commented Jan 19, 2018

OK thank you very much @killroyboy. I will try it and write you result. I would like to ask something more, did you rebuild it or just change properties for SDK 7? If you can build modules I would like to change error time from java source from you. Because while waiting getting error codes app freeze when using this push module. Thank you in advance. I am newbie about compiling module.

@killroyboy
Copy link
Author

@kerbooo I don't do Java Dev. I only know how to rebuild the modules because I read that link I posted above.

@kerberosargos
Copy link

@killroyboy OK thank you very much for your helps.

@kerberosargos
Copy link

@killroyboy I have tried module which you modified. It is working. Thank you very much again.

@Astrovic
Copy link

@killroyboy thank you, I had already rebuild other modules. The only one that uses ti.playservices is ti.cloudpush, but I don't know how rebuild it. Where I should find ti.cloudpush project?

@killroyboy
Copy link
Author

@kerbooo Awesome!

@Astrovic I don't use ti.cloudpush, but from what I understand it is bundled with the SDK, so you just need to add it to your tiapp.xml and then require it in your code.

killroyboy referenced this pull request in killroyboy/PushClient Jan 20, 2018
@Astrovic
Copy link

Thanks to @caffeinalab I create a new module version that uses ti.playservices: https://github.com/Astrovic/Ti.GA

@antonioduran
Copy link

I have the same issues that Astrovic commented on Jan 18, 2018.

I am trying to run the app with 7.5.0.GA.

Does anyone could fix this issue:

[ERROR] :  Failed to run dexer:
[ERROR] :  
[ERROR] :  Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/analytics/CampaignTrackingReceiver;
[ERROR] :  Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/analytics/CampaignTrackingService;
[ERROR] :  Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/analytics/ExceptionParser;
[ERROR] :  Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/analytics/ExceptionReporter;
[ERROR] :  Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/analytics/GoogleAnalytics;
[ERROR] :  Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/analytics/HitBuilders;
[ERROR] :  Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/analytics/HitBuilders$AppViewBuilder;
[ERROR] :  Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/analytics/HitBuilders$EventBuilder;
[ERROR] :  Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/google/android/gms/analytics/HitBuilders$ExceptionBuilder;
[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

@Astrovic
Copy link

Astrovic commented Jan 14, 2019 via email

@antonioduran
Copy link

Hello @Astrovic. Yep. I removed the /lib folder, and it worked, but there is a crash.. When I open the app, and I close the app using the back button, and I try to open the app again; the app stuck in the splash screen or some times it crashes.

Basically, I just created the alloy default application, I added the module 4.0.1, using 7.5.0.GA.

var ga = require('ti.ga');
Ti.API.info("module is => " + ga);

ga.setOptOut(false);
ga.setDebug(true);

var tracker = ga.createTracker({
   trackingId:'UA-72793918-2',
   useSecure:true,
   debug:true 
});

Ti.API.info("tracker is => " + JSON.stringify(tracker));

tracker.startSession();
tracker.addScreenView('my-cool-view');
    
function doClick(e) {
    tracker.addScreenView('my-cool-view2');
    tracker.addEvent({
        category:"myCategory-Event",
        label:"myLabel",
        value:1
    });  
    tracker.addTiming({
        category:"myCategory-Timing",
        label:"myLabel",
        name:"myName",
        time:1
    });
}

$.index.addEventListener('close', function(){
    tracker.endSession();
    ga.dispatch();
});

$.index.open();
01-14 14:28:42.478 8355-8355/? E/AndroidRuntime: FATAL EXCEPTION: main
                                                 Process: com.t0ny.t0ny, PID: 8355
                                                 java.lang.RuntimeException: Unable to instantiate service com.google.android.gms.analytics.AnalyticsService: java.lang.ClassNotFoundException: Didn't find class "com.google.android.gms.analytics.AnalyticsService" on path: DexPathList[[zip file "/data/app/com.t0ny.t0ny-5mbdQ_6BCEDJob7mbtaLTw==/base.apk"],nativeLibraryDirectories=[/data/app/com.t0ny.t0ny-5mbdQ_6BCEDJob7mbtaLTw==/lib/arm64, /data/app/com.t0ny.t0ny-5mbdQ_6BCEDJob7mbtaLTw==/base.apk!/lib/arm64-v8a, /system/lib64, /vendor/lib64, /product/lib64]]
                                                     at android.app.ActivityThread.handleCreateService(ActivityThread.java:3839)
                                                     at android.app.ActivityThread.-wrap5(Unknown Source:0)
                                                     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1989)
                                                     at android.os.Handler.dispatchMessage(Handler.java:108)
                                                     at android.os.Looper.loop(Looper.java:166)
                                                     at android.app.ActivityThread.main(ActivityThread.java:7425)
                                                     at java.lang.reflect.Method.invoke(Native Method)
                                                     at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:245)
                                                     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:921)
                                                  Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.android.gms.analytics.AnalyticsService" on path: DexPathList[[zip file "/data/app/com.t0ny.t0ny-5mbdQ_6BCEDJob7mbtaLTw==/base.apk"],nativeLibraryDirectories=[/data/app/com.t0ny.t0ny-5mbdQ_6BCEDJob7mbtaLTw==/lib/arm64, /data/app/com.t0ny.t0ny-5mbdQ_6BCEDJob7mbtaLTw==/base.apk!/lib/arm64-v8a, /system/lib64, /vendor/lib64, /product/lib64]]
                                                     at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:93)
                                                     at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
                                                     at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
                                                     at android.app.ActivityThread.handleCreateService(ActivityThread.java:3836)
                                                     at android.app.ActivityThread.-wrap5(Unknown Source:0) 
                                                     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1989) 
                                                     at android.os.Handler.dispatchMessage(Handler.java:108) 
                                                     at android.os.Looper.loop(Looper.java:166) 
                                                     at android.app.ActivityThread.main(ActivityThread.java:7425) 
                                                     at java.lang.reflect.Method.invoke(Native Method) 
                                                     at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:245) 
                                                     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:921) 

@antonioduran
Copy link

Hello @Astrovic .

I was able to make it work, and remove the crash just leaving the manifest file as it showed below:
Also, I had to remove everything from the module : android/ti.ga/4.0.1/lib/

<manifest android:versionCode="1" xmlns:android="http://schemas.android.com/apk/res/android">
            <application>
                <!-- Get permission for reliable local dispatching on non-Google Play devices. -->
                <uses-permission android:name="android.permission.WAKE_LOCK"/>
         
                <service android:enabled="true" android:exported="false" android:name="com.google.android.gms.analytics.AnalyticsService"/>
          
            </application>
        </manifest>

@kerberosargos
Copy link

Hello I am getting error as below on Android 9 (Pie) This issue is about Ti.GA?

02-12 12:54:37.901 13804 13804 E AndroidRuntime: FATAL EXCEPTION: main

02-12 12:54:37.901 13804 13804 E AndroidRuntime: Process: com.sizebiz.just.live.basketball, PID: 13804

02-12 12:54:37.901 13804 13804 E AndroidRuntime: java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol "_ZN8titanium13TypeConverter18javaLongToJsNumberEPN2v87IsolateEx" referenced by "/data/app/com.sizebiz.just.live.basketball-RC7RJeH7thll-qM3q0WuKQ==/lib/arm64/libti.ga.so"...

02-12 12:54:37.901 13804 13804 E AndroidRuntime:     at java.lang.Runtime.loadLibrary0(Runtime.java:1016)

02-12 12:54:37.901 13804 13804 E AndroidRuntime:     at java.lang.System.loadLibrary(System.java:1669)

02-12 12:54:37.901 13804 13804 E AndroidRuntime:     at org.appcelerator.kroll.runtime.v8.V8Runtime.loadExternalModules(V8Runtime.java:139)

02-12 12:54:37.901 13804 13804 E AndroidRuntime:     at org.appcelerator.kroll.runtime.v8.V8Runtime.initRuntime(V8Runtime.java:113)

02-12 12:54:37.901 13804 13804 E AndroidRuntime:     at org.appcelerator.kroll.KrollRuntime.doInit(KrollRuntime.java:207)

02-12 12:54:37.901 13804 13804 E AndroidRuntime:     at org.appcelerator.kroll.KrollRuntime$KrollRuntimeThread.run(KrollRuntime.java:113)

02-12 12:54:37.901 13804 13804 E AndroidRuntime:     at org.appcelerator.kroll.KrollRuntime.init(KrollRuntime.java:135)

02-12 12:54:37.901 13804 13804 E AndroidRuntime:     at com.sizebiz.just.live.basketball.JustLiveBasketballApplication.onCreate(JustLiveBasketballApplication.java:159)

02-12 12:54:37.901 13804 13804 E AndroidRuntime:     at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1155)

02-12 12:54:37.901 13804 13804 E AndroidRuntime:     at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5885)

02-12 12:54:37.901 13804 13804 E AndroidRuntime:     at android.app.ActivityThread.access$1100(ActivityThread.java:200)

02-12 12:54:37.901 13804 13804 E AndroidRuntime:     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1651)

02-12 12:54:37.901 13804 13804 E AndroidRuntime:     at android.os.Handler.dispatchMessage(Handler.java:106)

02-12 12:54:37.901 13804 13804 E AndroidRuntime:     at android.os.Looper.loop(Looper.java:193)

02-12 12:54:37.901 13804 13804 E AndroidRuntime:     at android.app.ActivityThread.main(ActivityThread.java:6692)

02-12 12:54:37.901 13804 13804 E AndroidRuntime:     at java.lang.reflect.Method.invoke(Native Method)

02-12 12:54:37.901 13804 13804 E AndroidRuntime:     at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)

02-12 12:54:37.901 13804 13804 E AndroidRuntime:     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)

@Astrovic
Copy link

Astrovic commented Feb 13, 2019 via email

@kerberosargos
Copy link

@antonioduran Thank you but. I have removed libs folder before. I think this issue about different things

@Astrovic
Copy link

Astrovic commented Feb 13, 2019 via email

@kerberosargos
Copy link

@antonioduran When I disable to module everything is OK. App runs on Android 9 Pie. But I need to use this module.

@Astrovic
Copy link

Astrovic commented Feb 13, 2019 via email

@kerberosargos
Copy link

This issue occurs only some Android 9 Pie device for example Xaoimi

@Astrovic
Copy link

I have tested this module on Android 9, but only on the emulator, and it works correctly. Which version are you using?

@kerberosargos
Copy link

kerberosargos commented Feb 13, 2019 via email

@Astrovic
Copy link

@kerberosargos
Copy link

kerberosargos commented Feb 13, 2019 via email

@kerberosargos
Copy link

@Astrovic Hello again but unfortunately 4.0.2 is not working too.

@kerberosargos
Copy link

02-14 15:58:05.212 30976 30976 E AndroidRuntime: FATAL EXCEPTION: main
02-14 15:58:05.212 30976 30976 E AndroidRuntime: Process: com.sizebiz.just.live.basketball, PID: 30976
02-14 15:58:05.212 30976 30976 E AndroidRuntime: java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol "_ZN8titanium13TypeConverter18javaLongToJsNumberEPN2v87IsolateEx" referenced by "/data/app/com.sizebiz.just.live.basketball-hM7GU3ITietnfQjIjr15hQ==/lib/arm64/libti.ga.so"...
02-14 15:58:05.212 30976 30976 E AndroidRuntime: 	at java.lang.Runtime.loadLibrary0(Runtime.java:1016)
02-14 15:58:05.212 30976 30976 E AndroidRuntime: 	at java.lang.System.loadLibrary(System.java:1669)
02-14 15:58:05.212 30976 30976 E AndroidRuntime: 	at org.appcelerator.kroll.runtime.v8.V8Runtime.loadExternalModules(V8Runtime.java:139)
02-14 15:58:05.212 30976 30976 E AndroidRuntime: 	at org.appcelerator.kroll.runtime.v8.V8Runtime.initRuntime(V8Runtime.java:113)
02-14 15:58:05.212 30976 30976 E AndroidRuntime: 	at org.appcelerator.kroll.KrollRuntime.doInit(KrollRuntime.java:207)
02-14 15:58:05.212 30976 30976 E AndroidRuntime: 	at org.appcelerator.kroll.KrollRuntime$KrollRuntimeThread.run(KrollRuntime.java:113)
02-14 15:58:05.212 30976 30976 E AndroidRuntime: 	at org.appcelerator.kroll.KrollRuntime.init(KrollRuntime.java:135)
02-14 15:58:05.212 30976 30976 E AndroidRuntime: 	at com.sizebiz.just.live.basketball.JustLiveBasketballApplication.onCreate(JustLiveBasketballApplication.java:159)
02-14 15:58:05.212 30976 30976 E AndroidRuntime: 	at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1155)
02-14 15:58:05.212 30976 30976 E AndroidRuntime: 	at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5885)
02-14 15:58:05.212 30976 30976 E AndroidRuntime: 	at android.app.ActivityThread.access$1100(ActivityThread.java:200)
02-14 15:58:05.212 30976 30976 E AndroidRuntime: 	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1651)
02-14 15:58:05.212 30976 30976 E AndroidRuntime: 	at android.os.Handler.dispatchMessage(Handler.java:106)
02-14 15:58:05.212 30976 30976 E AndroidRuntime: 	at android.os.Looper.loop(Looper.java:193)
02-14 15:58:05.212 30976 30976 E AndroidRuntime: 	at android.app.ActivityThread.main(ActivityThread.java:6692)
02-14 15:58:05.212 30976 30976 E AndroidRuntime: 	at java.lang.reflect.Method.invoke(Native Method)
02-14 15:58:05.212 30976 30976 E AndroidRuntime: 	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
02-14 15:58:05.212 30976 30976 E AndroidRuntime: 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)

@kerberosargos
Copy link

Hello I am really have issue and I need help about this issue https://jira.appcelerator.org/plugins/servlet/mobile#issue/AC-6141

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants