{"id":13,"date":"2025-11-06T16:32:58","date_gmt":"2025-11-06T08:32:58","guid":{"rendered":"http:\/\/12333456.xyz\/?p=13"},"modified":"2025-11-06T16:32:58","modified_gmt":"2025-11-06T08:32:58","slug":"%e5%ae%89%e5%8d%93%e6%a8%a1%e5%9d%97%e5%8f%98%e9%87%8f%e6%96%b9%e6%b3%95","status":"publish","type":"post","link":"http:\/\/12333456.xyz\/index.php\/2025\/11\/06\/%e5%ae%89%e5%8d%93%e6%a8%a1%e5%9d%97%e5%8f%98%e9%87%8f%e6%96%b9%e6%b3%95\/","title":{"rendered":"\u5b89\u5353\u6a21\u5757\u53d8\u91cf\u65b9\u6cd5"},"content":{"rendered":"\n<h3 class=\"wp-block-heading\">\u8fd9\u662f\u4e00\u4e2a\u5b8c\u5168\u5b8c\u5168\u65b0\u65b0\u65b0\u65b0\u624b\u7684\u4e00\u4e2a\u8bb0\u5f55\u7b14\u8bb0<\/h3>\n\n\n\n<h3 class=\"wp-block-heading\"><a><\/a><a><\/a>\u53ef\u4ee5\u8bf4\u8fd9\u662f\u4e00\u4e2a\u88ab\u5176\u4ed6\u7b80\u5316\u8fc7\u5e76\u4e14\u6539\u9762\u90e8\u5168\u975e\u7684\u6240\u8c13\u7684\u7f16\u7a0b\u8bed\u8a00\u7136\u540e\u8f6c\u6765\u7528java\u5f00\u59cb\u5b66\u4e60\u7684\u5c0f\u767d\u51c6\u5907\u7684\u4e00\u4e2a\u7b14\u8bb0\u3002<\/h3>\n\n\n\n<p><strong>\u3010\u6dfb\u52a0\u4e00\u4e2a\u5168\u5c40\u53d8\u91cf\u3011<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><em>\/\/ \u8bbe\u7f6e\u5168\u5c40\u53d8\u91cf<\/em>\n<em>\/\/class\u6dfb\u52a0\u4ee5\u4e0b\u4ee3\u7801<\/em>\npublic static code = \"\u8fd9\u662f\u4e00\u6bb5\u5168\u5c40\u53d8\u91cf\";\n<em>\/\/\u5f15\u7528\u65b9\u6cd5<\/em>\nMainActivity.code;\n<\/code><\/pre>\n\n\n\n<p><strong>\u3010\u5bfc\u5165\u5916\u90e8jar\u5305\u65b9\u6cd5\u3011<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><em>\/\/ \u9700\u8981\u5c06\u5305\u5bfc\u5165\u5230libs\u6587\u4ef6\u5939<\/em>\n<em>\/\/\u968f\u540e\u5728build.gradle\u6587\u4ef6\u4e0b\u7684dependencles\u5199\u5165\u8fd9\u4e00\u6bb5\u4ee3\u7801<\/em>\n\u5fd8\u4e86\n<\/code><\/pre>\n\n\n\n<p><strong>\u3010\u521b\u5efa\u81ea\u5df1\u7684\u6a21\u5757\u65b9\u6cd5\u3011<\/strong><br>\u521b\u5efaxxm.java\u6587\u4ef6<\/p>\n\n\n\n<pre id=\"pre-xv1broipn\" class=\"wp-block-preformatted\">package com.xxm.haha;<br>impor android.widget.Toast;<br><em>\/\/\u8bb0\u5f97\u5bfc\u5165\u5410\u53f8\u4f9d\u8d56<\/em><br>public class xmmjava{<br>\tprivate Avtivity activity;<br>\t<em>\/\/\u521d\u59cb\u5316activity<\/em><br>\t\tpublic xxmjava(Activity activity){<br>\t\t\tthis.activity = activity;<br>\t\t\t<em>\/\/\u4e00\u822c\u90fd\u4f1a\u7528\u5230\u8fd9\u4e2a\u65b9\u6cd5\uff0c\u65e0\u8111\u653e\u5c31\u884c<\/em><br>\t\t}<br>\t\t<em>\/\/\u586b\u5199\u5410\u53f8\u65b9\u6cd5\u8c03\u7528\u4ee3\u7801<\/em><br>\t\tpublic void ts(String a){<br>\t\t\tToast.makeText(MainActivity.this,a,Toast.LENGTH_SHORT).show();<br>\t\t}<br>}<code><br><\/code>AI\u5199\u4ee3\u7801java\u8fd0\u884c<img decoding=\"async\" src=\"https:\/\/csdnimg.cn\/release\/blogv2\/dist\/pc\/img\/runCode\/icon-arrowwhite.png\" alt=\"\">123456789101112131415<\/pre>\n\n\n\n<p>MainActivity.java\u8fd9\u6837\u5199<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><em>\/\/\u521b\u5efa\u81ea\u5df1\u7684\u6a21\u5757\u65b9\u6cd5<\/em>\n<em>\/\/\u4f8b\u5982\u6211\u521b\u5efa\u7684\u6587\u4ef6\u53eb\u505axxm.java<\/em>\nxxmjava xxm new xxmjava(main.this);\n<em>\/\/\u8c03\u7528\u65b9\u6cd5<\/em>\nxxm.ts(\"\u8fd9\u662f\u4e00\u6761\u5410\u53f8\");\n<\/code><\/pre>\n\n\n\n<p>\u3010\u6309\u94ae\u88ab\u70b9\u51fb\u3011<br>\u9996\u5148\u5728avtivity.main.xml\u5199\u597d\u81ea\u5df1\u7684\u5e03\u5c40\u4f8b\u5982<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;Botton\n\tandroid:id=\"@+id\/botton1\"\n\tandroid:text=\"\u8fd9\u4e2a\u662f\u6309\u94ae\" &gt;\n&lt;\/Botton&gt;\n<\/code><\/pre>\n\n\n\n<p>\u3010\u6309\u94ae\u88ab\u70b9\u51fb\u4e8b\u4ef6\u3011<\/p>\n\n\n\n<pre id=\"pre-puct4vgm1\" class=\"wp-block-code\"><code><em>\/\/\u4e0b\u9762\u662f\u5728\u4e00\u4e2a\u65b9\u6cd5\u4e2d\u521b\u5efa\u4e00\u4e2a\u6309\u94ae\u70b9\u51fb\u65f6\u95f4\uff0c\u6539\u65b9\u6cd5\u540d\u53ef\u76f4\u63a5\u5f15\u7528\u3002<\/em>\nprivate void ff(){\n\tbutton = findViewById(R.id.button1);\n\tbutton.setOnclickListener(new View.Onclickstener(){\n\t\t@override\n\t\tpublic void onClick(View view){\n\t\t\t<em>\/\/\u8fd9\u91cc\u53ef\u4ee5\u586b\u5199\u6309\u94ae\u88ab\u70b9\u51fb\u540e\u7684\u4e8b\u4ef6<\/em>\n\t\t}\n\t})\n}\n\n\n\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u8fd9\u662f\u4e00\u4e2a\u5b8c\u5168\u5b8c\u5168\u65b0\u65b0\u65b0\u65b0\u624b\u7684\u4e00\u4e2a\u8bb0\u5f55\u7b14\u8bb0 \u53ef\u4ee5\u8bf4\u8fd9\u662f\u4e00\u4e2a\u88ab\u5176\u4ed6\u7b80\u5316\u8fc7\u5e76\u4e14\u6539\u9762\u90e8\u5168\u975e\u7684\u6240\u8c13\u7684\u7f16\u7a0b\u8bed\u8a00\u7136\u540e\u8f6c\u6765\u7528j<\/p>\n<div class=\"more-link\">\n\t\t\t\t <a href=\"http:\/\/12333456.xyz\/index.php\/2025\/11\/06\/%e5%ae%89%e5%8d%93%e6%a8%a1%e5%9d%97%e5%8f%98%e9%87%8f%e6%96%b9%e6%b3%95\/\" class=\"link-btn theme-btn\"><span>Read More <\/span> <i class=\"fa fa-caret-right\"><\/i><\/a>\n\t\t\t<\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-13","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"http:\/\/12333456.xyz\/index.php\/wp-json\/wp\/v2\/posts\/13","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/12333456.xyz\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/12333456.xyz\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/12333456.xyz\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/12333456.xyz\/index.php\/wp-json\/wp\/v2\/comments?post=13"}],"version-history":[{"count":1,"href":"http:\/\/12333456.xyz\/index.php\/wp-json\/wp\/v2\/posts\/13\/revisions"}],"predecessor-version":[{"id":14,"href":"http:\/\/12333456.xyz\/index.php\/wp-json\/wp\/v2\/posts\/13\/revisions\/14"}],"wp:attachment":[{"href":"http:\/\/12333456.xyz\/index.php\/wp-json\/wp\/v2\/media?parent=13"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/12333456.xyz\/index.php\/wp-json\/wp\/v2\/categories?post=13"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/12333456.xyz\/index.php\/wp-json\/wp\/v2\/tags?post=13"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}