문제

Can anybody tell me how to create a sub folder in asset folder at run time and copy the files from res folder to my assets sub folder?

도움이 되었습니까?

해결책

It is not possible to do this in runtime.

다른 팁

As far as I know this is not possible because of security restrictions. Your asset folder is merged with all your other files into one .apk package. That's your app ready for deployment.

When installing the package the user is asked if he's granting a set of privileges to the app such as accessing private data (text message, contacts) as well as technical stuff like writing on the external storage (SD card).

At this moment you can't modify your asset folder any more because it became a part of the app and application's code and resources may not be change after installation.

See also Android's page about security and permissions.

PS: I'm quite new to Android and I just explain it the way I understood it. In case I'm just talking bullshit feel free to edit me :)

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top