我尝试在Android Studio上测试我的应用程序,但我遇到了困难
"waiting for AVD to come online..."
Run Code Online (Sandbox Code Playgroud)
我已经阅读了从Android设备监视器重置adb会做到这一点,并且它做了...
进行了1次测试,当我第二天重新启动我的PC时,我不仅得到了:
"waiting for AVD to come online..."
Run Code Online (Sandbox Code Playgroud)
但是也
"Could not automatically detect an ADB binary." error every time I try testing my app.
Run Code Online (Sandbox Code Playgroud)

也许值得一提的是,当我做那个1测试时,我也得到了
"Could not automatically detect an ADB binary."
Run Code Online (Sandbox Code Playgroud)
错误,但至少它有效.
我试图限制我们的 WooCommerce 产品标题的字符数,我发现了这个 PHP 代码:
add_filter( 'the_title', 'shorten_woo_product_title', 10, 2 );
function shorten_woo_product_title( $title, $id ) {
if ( ! is_singular( array( 'product' ) ) && get_post_type( $id ) === 'product' ) {
return substr( $title, 0, 30); // change last number to the number of characters you want
} else {
return $title;
}
}
Run Code Online (Sandbox Code Playgroud)
它有效,但我希望它在每个产品标题的末尾显示“...”。