Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-26135] Android:Using 7.2.0.SDK the cloud push module provides error

GitHub Issuen/a
TypeBug
PriorityNone
StatusClosed
ResolutionDuplicate
Resolution Date2018-06-18T22:46:22.000+0000
Affected Version/sRelease 7.2.0
Fix Version/sn/a
ComponentsAndroid
Labelsn/a
ReporterMostafizur Rahman
AssigneeUnknown
Created2018-06-18T11:27:39.000+0000
Updated2018-06-18T22:46:22.000+0000

Description

Using 7.2.0.SDK the cloud push module provides error on android device. *Test environment:* Operating System Name = Mac OS X Version = 10.13.1 Architecture = 64bit CPUs = 4 Memory = 8589934592 Node.js Node.js Version = 8.9.1 npm Version = 5.5.1 Titanium CLI CLI Version = 5.1.1 Titanium SDK SDK Version = 7.2.0.GA , Device: Huawei GR3 2017 Android *Test steps:* 1.Create a classic project with Appcelerator cloud services enabled 2.Add cloudpoush module on it 3.Require cloudpoush module on app.js 4.Run with android device and the app is failed to build with a error message [ERROR] : Failed to run dexer: *Sample Code:*

/**
 * Create a new Ti.UI.TabGroup.
 */
var tabGroup = Ti.UI.createTabGroup();

/**
 * Add the two created tabs to the tabGroup object.
 */
tabGroup.addTab(createTab("Tab 1", "I am Window 1", "assets/images/tab1.png"));
tabGroup.addTab(createTab("Tab 2", "I am Window 2", "assets/images/tab2.png"));

/**
 * Open the tabGroup
 */
tabGroup.open();

/**
 * Creates a new Tab and configures it.
 *
 * @param  {String} title The title used in the Ti.UI.Tab and it's included Ti.UI.Window
 * @param  {String} message The title displayed in the Ti.UI.Label
 * @return {String} icon The icon used in the Ti.UI.Tab
 */
function createTab(title, message, icon) {
    var win = Ti.UI.createWindow({
        title: title,
        backgroundColor: '#fff'
    });

    var label = Ti.UI.createLabel({
        text: message,
        color: "#333",
        font: {
            fontSize: 20
        }
    });

    win.add(label);

    var tab = Ti.UI.createTab({
        title: title,
        icon: icon,
        window: win
    });

    return tab;
}


// added during app creation. this will automatically login to
// ACS for your application and then fire an event (see below)
// when connected or errored. if you do not use ACS in your
// application as a client, you should remove this block
(function(){
var cloudpush = require('ti.cloudpush');
var ACS = require('ti.cloud'),
    env = Ti.App.deployType.toLowerCase() === 'production' ? 'production' : 'development',
    username = Ti.App.Properties.getString('acs-username-'+env),
    password = Ti.App.Properties.getString('acs-password-'+env);

// if not configured, just return
if (!env || !username || !password) { return; }
/**
 * Appcelerator Cloud (ACS) Admin User Login Logic
 *
 * fires login.success with the user as argument on success
 * fires login.failed with the result as argument on error
 */
ACS.Users.login({
	login:username,
	password:password,
}, function(result){
	if (env==='development') {
		Ti.API.info('ACS Login Results for environment '+env+':');
		Ti.API.info(result);
	}
	if (result && result.success && result.users && result.users.length){
		Ti.App.fireEvent('login.success',result.users[0],env);
	} else {
		Ti.App.fireEvent('login.failed',result,env);
	}
});

})();

*Console logs:*
[ERROR] :  Failed to run dexer:
[ERROR] :  
[ERROR] :  Uncaught translation error: java.lang.IllegalArgumentException: already added: Lcom/appcelerator/aps/BuildConfig;
[ERROR] :  1 error; aborting
[ERROR] Application Installer abnormal process termination. Process exit value was 1

Attachments

FileDateSize
ti.cloudpush-android-5.1.2.zip2018-06-18T14:17:49.000+0000184914

Comments

  1. Yordan Banev 2018-06-18

  2. Aminul Islam 2018-06-18

    [~ybanev], Thanks for your reply. I have tested ti.cloudpush 5.1.2. and it's working as expected with 7.2.0.GA
  3. Gary Mathews 2018-06-18

    Closing as duplicate, see TIMOB-26134

JSON Source