Android工作室:在c:中找不到明显的文件位置

时间:2016-10-20 23:57:57

标签: json android-studio

每次运行此代码时,都会收到消息" File not found"但是,在我的例外情况下,我不明白为什么当我真正拥有该文件时,我正在寻找坐在我的根部的文件:?

global.my_module = require ('./my_module');
//..
fs.watchFile(require.resolve('./my_module'), function () {
    console.log("Module changed, reloading...");
    delete require.cache[require.resolve('./my_module')]
    global.my_module = require('./my_module');
});

}

1 个答案:

答案 0 :(得分:0)

我认为您无法与模拟器外部的对象进行交互。要解决它,请参考这些 Load a simple text file in android studio
How can I read a text file in android
Reading a simple text file