我刚刚尝试在Android Studio中创建并运行我的第一个草稿文件,但它拒绝执行。一旦我“摆脱掉”了代码,并尝试执行它,它总是会给我以下消息:
"C:\Program Files\Android\Android Studio\jre\bin\java" "-javaagent:C:\Program Files\Android\Android Studio\lib\idea_rt.jar=55179:C:\Program Files\Android\Android Studio\bin" -Dfile.encoding=UTF-8 -classpath "C:\Users\Kathe\.AndroidStudio3.1\system\compile-server\cwfrecyclerview_28cee19d\scratches\out;C:\Program Files\Android\Android Studio\jre\jre\lib\charsets.jar;C:\Program Files\Android\Android Studio\jre\jre\lib\ext\access-bridge-64.jar;C:\Program Files\Android\Android Studio\jre\jre\lib\ext\cldrdata.jar;C:\Program Files\Android\Android Studio\jre\jre\lib\ext\dnsns.jar;C:\Program Files\Android\Android Studio\jre\jre\lib\ext\jaccess.jar;C:\Program Files\Android\Android Studio\jre\jre\lib\ext\localedata.jar;C:\Program Files\Android\Android Studio\jre\jre\lib\ext\nashorn.jar;C:\Program Files\Android\Android Studio\jre\jre\lib\ext\sunec.jar;C:\Program Files\Android\Android Studio\jre\jre\lib\ext\sunjce_provider.jar;C:\Program Files\Android\Android Studio\jre\jre\lib\ext\sunmscapi.jar;C:\Program Files\Android\Android Studio\jre\jre\lib\ext\sunpkcs11.jar;C:\Program Files\Android\Android Studio\jre\jre\lib\ext\zipfs.jar;C:\Program Files\Android\Android Studio\jre\jre\lib\jce.jar;C:\Program Files\Android\Android Studio\jre\jre\lib\jsse.jar;C:\Program Files\Android\Android Studio\jre\jre\lib\management-agent.jar;C:\Program Files\Android\Android Studio\jre\jre\lib\resources.jar;C:\Program Files\Android\Android Studio\jre\jre\lib\rt.jar;C:\Users\Kathe\Downloads\android-RuntimePermissions-master\CWFRecyclerview\common\build\intermediates\classes\debug;C:\Users\Kathe\Downloads\android-RuntimePermissions-master\CWFRecyclerview\common\build\generated\res\rs\debug;C:\Users\Kathe\Downloads\android-RuntimePermissions-master\CWFRecyclerview\common\build\generated\res\resValues\debug;C:\Users\Kathe\.gradle\caches\transforms-1\files-1.1\runner-1.0.2.aar\bebf8b46884ec7ad9744d30654e3a8fa\jars\classes.jar;C:\Users\Kathe\.gradle\caches\modules-2\files-2.1\android.arch.lifecycle\common\1.1.0\edf3f7bfb84a7521d0599efa3b0113a0ee90f85\common-1.1.0.jar;C:\Users\Kathe\.gradle\caches\modules-2\files-2.1\com.android.support\support-annotations\27.1.1\39ded76b5e1ce1c5b2688e1d25cdc20ecee32007\support-annotations-27.1.1.jar;C:\Users\Kathe\.gradle\caches\transforms-1\files-1.1\animated-vector-drawable-27.1.1.aar\3026d449b6dd3b8d579b953dbeaad620\jars\classes.jar;C:\Users\Kathe\.gradle\caches\transforms-1\files-1.1\support-compat-27.1.1.aar\ac14c6fd640673d444366972bd8578f3\jars\classes.jar;C:\Users\Kathe\.gradle\caches\transforms-1\files-1.1\support-compat-27.1.1.aar\ac14c6fd640673d444366972bd8578f3\res;C:\Users\Kathe\.gradle\caches\transforms-1\files-1.1\viewmodel-1.1.0.aar\703d03849fead14cd573339ccbf74521\jars\classes.jar;C:\Users\Kathe\.gradle\caches\modules-2\files-2.1\com.squareup\javawriter\2.1.1\67ff45d9ae02e583d0f9b3432a5ebbe05c30c966\javawriter-2.1.1.jar;C:\Users\Kathe\.gradle\caches\transforms-1\files-1.1\support-vector-drawable-27.1.1.aar\af4e9375156ee99d7b7ed9804dc82dd8\jars\classes.jar;C:\Users\Kathe\.gradle\caches\transforms-1\files-1.1\support-core-ui-27.1.1.aar\c7f11890d5f5b74e3e9d06afa5fbb997\jars\classes.jar;C:\Users\Kathe\.gradle\caches\transforms-1\files-1.1\support-core-ui-27.1.1.aar\c7f11890d5f5b74e3e9d06afa5fbb997\res;C:\Users\Kathe\.gradle\caches\transforms-1\files-1.1\support-core-utils-27.1.1.aar\dceb3eeaaf1050600bb0d2fe0a889a51\jars\classes.jar;C:\Users\Kathe\.gradle\caches\modules-2\files-2.1\com.google.code.findbugs\jsr305\2.0.1\516c03b21d50a644d538de0f0369c620989cd8f0\jsr305-2.0.1.jar;C:\Users\Kathe\.gradle\caches\transforms-1\files-1.1\espresso-core-3.0.2.aar\4a77e4a6c39a7f16d185757172f44dce\jars\classes.jar;C:\Users\Kathe\.gradle\caches\modules-2\files-2.1\javax.inject\javax.inject\1\6975da39a7040257bd51d21a231b76c915872d38\javax.inject-1.jar;C:\Users\Kathe\.gradle\caches\transforms-1\files-1.1\support-fragment-27.1.1.aar\8608e49b7499a17e38d008d8ae17778a\jars\classes.jar;C:\Users\Kathe\.gradle\caches\modules-2\files-2.1\junit\junit\4.12\2973d150c0dc1fefe998f834810d68f278ea58ec\junit-4.12.jar;C:\Users\Kathe\.gradle\caches\transforms-1\files-1.1\runtime-1.1.0.aar\701aa5d0a71a62d398f3390a72488495\jars\classes.jar;C:\Users\Kathe\.gradle\caches\modules-2\files-2.1\org.hamcrest\hamcrest-core\1.3\42a25dc3219429f0e5d060061f71acb49bf010a0\hamcrest-core-1.3.jar;C:\Users\Kathe\.gradle\caches\transforms-1\files-1.1\monitor-1.0.2.aar\89f15379b9d3c77bbc24a0702e0e89e9\jars\classes.jar;C:\Users\Kathe\.gradle\caches\transforms-1\files-1.1\appcompat-v7-27.1.1.aar\2e2a28cf1aa5a9404e2628890daf92f7\jars\classes.jar;C:\Users\Kathe\.gradle\caches\transforms-1\files-1.1\appcompat-v7-27.1.1.aar\2e2a28cf1aa5a9404e2628890daf92f7\res;C:\Users\Kathe\.gradle\caches\transforms-1\files-1.1\espresso-idling-resource-3.0.2.aar\69861e25d616b49fdee29aa342f3e29f\jars\classes.jar;C:\Users\Kathe\.gradle\caches\transforms-1\files-1.1\livedata-core-1.1.0.aar\27ba305e2a1bfa0d08b520e6303b8703\jars\classes.jar;C:\Users\Kathe\.gradle\caches\modules-2\files-2.1\org.hamcrest\hamcrest-library\1.3\4785a3c21320980282f9f33d0d1264a69040538f\hamcrest-library-1.3.jar;C:\Users\Kathe\.gradle\caches\modules-2\files-2.1\org.hamcrest\hamcrest-integration\1.3\5de0c73fef18917cd85d0ab70bb23818685e4dfd\hamcrest-integration-1.3.jar;C:\Users\Kathe\.gradle\caches\modules-2\files-2.1\android.arch.core\common\1.1.0\8007981f7d7540d89cd18471b8e5dcd2b4f99167\common-1.1.0.jar;C:\Users\Kathe\.gradle\caches\modules-2\files-2.1\net.sf.kxml\kxml2\2.3.0\ccbc77a5fd907ef863c29f3596c6f54ffa4e9442\kxml2-2.3.0.jar;C:\Users\Kathe\.gradle\caches\transforms-1\files-1.1\runtime-1.1.0.aar\386de9b4bfe3bc36c31dc07fc570f845\jars\classes.jar;C:\Users\Kathe\Downloads\android-RuntimePermissions-master\CWFRecyclerview\app\build\intermediates\classes\debug;C:\Users\Kathe\Downloads\android-RuntimePermissions-master\CWFRecyclerview\app\build\generated\res\rs\debug;C:\Users\Kathe\Downloads\android-RuntimePermissions-master\CWFRecyclerview\app\build\generated\res\resValues\debug;C:\Users\Kathe\.gradle\caches\transforms-1\files-1.1\transition-27.1.1.aar\56bbbf66081846793e8e6ad5d263f42d\res;C:\Users\Kathe\.gradle\caches\transforms-1\files-1.1\transition-27.1.1.aar\56bbbf66081846793e8e6ad5d263f42d\jars\classes.jar;C:\Users\Kathe\.gradle\caches\transforms-1\files-1.1\support-v4-27.1.1.aar\b0f15e6eb17547dfb6b002a658bf4690\jars\classes.jar;C:\Users\Kathe\.gradle\caches\transforms-1\files-1.1\cardview-v7-27.1.1.aar\e72be1cd03005dd53770e422ef3a9042\jars\classes.jar;C:\Users\Kathe\.gradle\caches\transforms-1\files-1.1\cardview-v7-27.1.1.aar\e72be1cd03005dd53770e422ef3a9042\res;C:\Users\Kathe\.gradle\caches\transforms-1\files-1.1\recyclerview-v7-27.1.1.aar\a0c73e0ca8f0a201d40c552d95d0cb2d\jars\classes.jar;C:\Users\Kathe\.gradle\caches\transforms-1\files-1.1\recyclerview-v7-27.1.1.aar\a0c73e0ca8f0a201d40c552d95d0cb2d\res;C:\Users\Kathe\.gradle\caches\transforms-1\files-1.1\support-media-compat-27.1.1.aar\821500d422cac696922838f43bdc0b51\jars\classes.jar;C:\Users\Kathe\.gradle\caches\transforms-1\files-1.1\support-media-compat-27.1.1.aar\821500d422cac696922838f43bdc0b51\res;C:\Users\Kathe\.gradle\caches\transforms-1\files-1.1\constraint-layout-1.1.2.aar\da50e0747597ae74c0ea8e969852a228\res;C:\Users\Kathe\.gradle\caches\transforms-1\files-1.1\constraint-layout-1.1.2.aar\da50e0747597ae74c0ea8e969852a228\jars\classes.jar;C:\Users\Kathe\.gradle\caches\modules-2\files-2.1\com.squareup.okhttp3\okhttp\3.7.0\6edbebdd8868708db718d15c09c4b28037fd487e\okhttp-3.7.0.jar;C:\Users\Kathe\.gradle\caches\transforms-1\files-1.1\design-27.1.1.aar\ae7e21079024390be2e44010a29eeb0b\res;C:\Users\Kathe\.gradle\caches\transforms-1\files-1.1\design-27.1.1.aar\ae7e21079024390be2e44010a29eeb0b\jars\classes.jar;C:\Users\Kathe\Downloads\android-RuntimePermissions-master\CWFRecyclerview\app\libs\RhinoCommon.jar;C:\Users\Kathe\.gradle\caches\modules-2\files-2.1\com.android.support.constraint\constraint-layout-solver\1.1.2\bfc967828daffc35ba01c9ee204d98b664930a0f\constraint-layout-solver-1.1.2.jar;C:\Users\Kathe\.gradle\caches\modules-2\files-2.1\com.squareup.okio\okio\1.12.0\3742beff8024d0a0073d284b7c5e4cbf73d99b25\okio-1.12.0.jar" scratch
Error: Could not find or load main class scratch
Process finished with exit code 1
这是代码(驻留在名为scratch.java的文件中):
public class scratch {
public static void main(String[] args) {
System.out.println("Hello World");
}
}
我在做什么错?我正在按照this video上的说明进行操作,该说明对他来说很好,但对我来说根本不起作用。我无法在Android Studio中安装或打开某些东西吗?
我正在Windows 10笔记本电脑上运行Android Studio 3.1.4。