Long package name build error in Android Studio

The package name of my app is very long:

app.running.com.voice.and.service.song.backup.audio.run.inthe.background

This is a B2B project and I can't reduce their package name now as it is already fixed.

Error:failed writing to 'D:\Google_Play\Android Studio\IndWork\Sound\Sound\app\build\generated\source\r\androidTest\debug\app\running\com\voice\and\service\song\backup\audio\run\inthe\background\test\R.java':

The system cannot find the file specified. (2).

I think there has to be a solution for this problem. Pls guide.

Upvotes: 1

Views: 1383

Answers (2)

Ismail Iqbal
Ismail Iqbal

Reputation: 2580

If you are using Windows 10 as the OS and have install the anniversary update (Use this link by tuneComp to verify if you have installed the anniversary update), then you could follow this instructions by howToGeek to enable long file path which should fix your issue.

Upvotes: 2

nima moradi
nima moradi

Reputation: 2628

package name don't have anything wrong with it as far as i know
as log say's error is at \build\generated my first suggestion is to clean project with command

$ gradlew clean 

at root of your project if it's unable to clean delete manually

  • android/build
  • android/app/build

don't worry the are generated files . then type in root of project

$ gradlew build

be sure your connected to internet to get needed lib from maven or etc.

Upvotes: 0

Related Questions