小编via*_*ana的帖子

错误:任务执行失败':app:shrinkReleaseMultiDexComponents'

我正在尝试生成一个APK以便在Google商店中发布,但是我收到以下错误:

Error:Execution failed for task
':app:shrinkReleaseMultiDexComponents'. java.io.IOException: The output jar
[/home/nome/Projects/app-android/app/_app/build/intermediates/multi-dex/release/componentClasses.jar]
must be specified after an input jar, or it will be empty.
Run Code Online (Sandbox Code Playgroud)

我该如何解决?

java android android-gradle-plugin android-multidex

6
推荐指数
1
解决办法
2475
查看次数

Ionic 2中onResume()的等效方法是什么?

而在Android Native中,onResume()这是活动生命周期的一部分.看看这个:

public void onResume() {
    super.onResume();  // Always call the superclass method first    
}
Run Code Online (Sandbox Code Playgroud)

onResume()Ionic 2中的等效方法是什么?

android ionic2 angular

5
推荐指数
1
解决办法
2100
查看次数

如何将设备的键盘更改为大写?

这是我的input:

<ion-item>
      <ion-label color="primary">Nickname</ion-label>
      <ion-input formControlName="nickname" [(ngModel)]="nickname"></ion-input>
</ion-item>
Run Code Online (Sandbox Code Playgroud)

如何使用Ionic 2将设备的键盘更改为大写?

ionic2 angular

4
推荐指数
2
解决办法
4653
查看次数

如何检索输入值并打印到控制台?

我想在console.log中打印引用输入用户名和输入密码的值.看我的表格:

<form>
    <ion-list>

        <ion-item>
            <ion-label fixed>Username</ion-label>
            <ion-input type="text"></ion-input>
        </ion-item>

        <ion-item>
            <ion-label fixed>Password</ion-label>
            <ion-input type="password"></ion-input>
        </ion-item>    

        <button ion-button color="secondary" clear full style="font-style: bold; text-align: center;">Forgot Password?</button>

        <button ion-button color="secondary" type="submit" full>Login</button>

    </ion-list>
</form>
Run Code Online (Sandbox Code Playgroud)

如何在单击登录按钮后在控制台中检索输入和打印值?

ionic2 angular

1
推荐指数
1
解决办法
1万
查看次数

如果变量{{image}}为空,则定义默认图像

我的<img>:

<img width="90" height="90"  src="{{image}}" />
Run Code Online (Sandbox Code Playgroud)

默认图像文件夹: assets/img/pic_user.png

如何定义未在变量中定义的默认图像:{{image}}

typescript ionic2 angular2-template angular

1
推荐指数
2
解决办法
4019
查看次数

如何在通知 Android 中创建计时器?

我有以下方法:

public NotificationCompat.Builder createNotification(Context context) {
    Intent intent = new Intent(this, MapsActivity.class);
    PendingIntent pIntent = PendingIntent.getActivity(this, (int) System.currentTimeMillis(), intent, 0);

    NotificationManager notificationManager = (NotificationManager) getSystemService(NOTIFICATION_SERVICE);
    boolean running = true;
    builder = new NotificationCompat.Builder(context)
            .setContentText("conteúdo")
            .setContentTitle("titulo")
            .setSmallIcon(R.drawable.ic_today_black_24dp)
            .setAutoCancel(false)
            .setOnlyAlertOnce(true)
            .setOngoing(running)
            .setContentIntent(
                    PendingIntent.getActivity(context, 10,
                            new Intent(context, MapsActivity.class)
                                    .addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP),
                            0)
            )
            .addAction(running ? R.drawable.ic_stop_black_24dp
                            : R.drawable.ic_play_arrow_black_24dp,
                    running ? "Pause"
                            : "play",
                    pIntent)
            .addAction(R.drawable.ic_stop_black_24dp, "Stop",
                    pIntent);

    notificationManager.notify(0, builder.build());

    return builder;
}
Run Code Online (Sandbox Code Playgroud)

其中在状态栏中启动了一个通知,如下图的第一个通知:

在此处输入图片说明

要链接通知,我这样做:

NotificationCompat.Builder notification = createNotification(this);
NotificationManager mNotificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
mNotificationManager.notify(0, notification.build()); …
Run Code Online (Sandbox Code Playgroud)

java android

0
推荐指数
1
解决办法
3195
查看次数