当我尝试在Android Studio中运行我的项目时。它总是给我这个错误。我试图清理和重建,但它还没有工作......
Error:Execution failed for task ':app:transformClassesWithDexForDebug'.
com.android.build.api.transform.TransformException:java.lang.RuntimeException:java.lang.RuntimeException:com.android.ide.common.process.ProcessException:java.util.concurrent.ExecutionException:java.io .FileNotFoundException:Z:\ Android \ CalculatorAutumn7 \ app \ build \ intermediates \ transforms \ dex \ debug \ folders \ 1000 \ 5 \ slice_1 \ classes.dex(系统找不到指定的路径)
答案 0 :(得分:0)
从资产中读取文件
BufferedReader mRreader = null; try { mRreader = new BufferedReader( new InputStreamReader(getAssets().open("your_file_name.txt"); // do reading,usually loop until end of file reading String mLine; while ((mLine = mRreader.readLine()) != null) { //process line /// write code } } catch (IOException e) { //log the exception } finally { if (mRreader != null) { try { mRreader.close(); } catch (IOException e) { //log the exception } } } } }