Not compile

Rodrik7 years ago

Hi,

I downloaded client app and tried to compile, have error below:

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:processGoogleDebugGoogleServices'.
> File google-services.json is missing. The Google Services Plugin cannot function without it. 
   Searched Location: 
  C:\traccar-client-android-master\app\src\google\debug\google-services.json
  C:\traccar-client-android-master\app\src\debug\google\google-services.json
  C:\traccar-client-android-master\app\src\google\google-services.json
  C:\traccar-client-android-master\app\src\debug\google-services.json
  C:\traccar-client-android-master\app\src\googleDebug\google-services.json
  C:\traccar-client-android-master\app\google-services.json

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 1s
Bhumit Gada7 years ago

Just change the Build Variant from google to regular.

Rodrik7 years ago

Thank you, I changed , still problem persist
FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:processRegularDebugGoogleServices'.
> File google-services.json is missing. The Google Services Plugin cannot function without it. 
   Searched Location: 
  C:\traccar-client-android-master\app\src\regular\debug\google-services.json
  C:\traccar-client-android-master\app\src\debug\regular\google-services.json
  C:\traccar-client-android-master\app\src\regular\google-services.json
  C:\traccar-client-android-master\app\src\debug\google-services.json
  C:\traccar-client-android-master\app\src\regularDebug\google-services.json
  C:\traccar-client-android-master\app\google-services.json

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 8s
Bhumit Gada7 years ago

Did you change the Build Variant to regularDebug ?
I just check it works fine for me.

Rodrik7 years ago

Yes, I did. Still have problems

Rodrik7 years ago

Looks like build.gradle files not proper, it was working before, The studio upgraded automatically, then started issues

Anton Tananaev7 years ago

Well, don't upgrade gradle version or gradle plugin version. Clone repo again and start from scratch.

Rodrik7 years ago

I did as you said , again facing the problem,

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:processRegularDebugGoogleServices'.
> File google-services.json is missing. The Google Services Plugin cannot function without it. 
   Searched Location: 
  C:\traccar-client-android-master\app\src\regular\debug\google-services.json
  C:\traccar-client-android-master\app\src\debug\regular\google-services.json
  C:\traccar-client-android-master\app\src\regular\google-services.json
  C:\traccar-client-android-master\app\src\debug\google-services.json
  C:\traccar-client-android-master\app\src\regularDebug\google-services.json
  C:\traccar-client-android-master\app\google-services.json

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 2s
Anton Tananaev7 years ago

You are still trying to compile wrong flavor. Please provide a screenshot of the flavor that you selected.

Rodrik7 years ago

Now compiled well , when click on RUN button emulator open then app stops

Anton Tananaev7 years ago

Do you mean it crashes? You would need to check logs.

Rodrik7 years ago

Solved, some directive in app file deprecated, I had to replace with compiler instructions, now works

chinzorig ivan6 years ago

Hi.
i have the same problem. please help me?

chinzorig ivan6 years ago
Rodrik6 years ago

I would be happy to help. It was a year ago. I am realy not remember what I did. I guess i chage in compiler setting instruction.