Calabash - 在Android Manifest中找不到可启动的活动

时间:2015-12-07 07:13:45

标签: android calabash calabash-android

当我运行C:\Users\mihirj\Desktop\MOTO\Testing>calabash-android console app-release.apk C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/calabash-android-0.5.15/lib/calabash-andr oid/helpers.rb:50:in `rescue in main_activity': No launchable activity found in AndroidManifest (RuntimeError) from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/calabash-android-0.5.15/lib/ calabash-android/helpers.rb:25:in `main_activity' from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/calabash-android-0.5.15/bin/ calabash-android-console.rb:20:in `calabash_console' from C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/calabash-android-0.5.15/bin/ calabash-android:96:in `<top (required)>' from C:/Ruby22-x64/bin/calabash-android:23:in `load' from C:/Ruby22-x64/bin/calabash-android:23:in `<main>' 时,我收到此错误消息。

var passport = require('passport');
var LocalStrategy = require('passport-local').Strategy;
var User = require('../models/user');

module.exports = function(passport) {


    passport.serializeUser(function(user, done) {
        done(null, user.id);
    });

    passport.deserializeUser(function(id, done) {
        User.findById(id, function(err, user) {
            done(err, user);
        });
    });

    passport.use('local-signup', new LocalStrategy({

        usernameField : 'username',
        passwordField : 'password',
        passReqToCallback : true
    },

    function(req, username, password, done) {

        process.nextTick(function() {

            User.findOne({ 'local.username' : username}, function(err, user) {
                if (err)
                    return done(err);

                if(user) {
                    return done(null, false, req.flash('signupMessage', 'That Username is already taken.'));
                }

                else {

                    var newUser = new User();

                    newUser.local.username = username;
                    newUser.local.password = newUser.generateHash(password);


                    newUser.save(function(err) {
                        if(err)
                            throw err;

                        return done(null, newUser);
                    });
                }
            });
        });
    }));



    passport.use('local-login', new LocalStrategy({

        usernameField : 'username',
        passwordField : 'password',
        passReqToCallback : true
    },
    function(req, username, password,done) {

        User.findOne({ 'local.username' : username}, function(err, user) {

            if(err)
                return done(err);

            if(!user)
                return done(null, false, req.flash('loginMessage', 'No user found.'));

            if(!user.validPassword(password))
                return done(null, false, req.flash('loginMessage', 'Oops! Wrong password.'));

            return done(null, user);
        });
    }));

};

0 个答案:

没有答案