• Dear Cerberus X User!

    As we prepare to transition the forum ownership from Mike to Phil (TripleHead GmbH), we need your explicit consent to transfer your user data in accordance with our amended Terms and Rules in order to be compliant with data protection laws.

    Important: If you accept the amended Terms and Rules, you agree to the transfer of your user data to the future forum owner!

    Please read the new Terms and Rules below, check the box to agree, and click "Accept" to continue enjoying your Cerberus X Forum experience. The deadline for consent is April 5, 2024.

    Do not accept the amended Terms and Rules if you do not wish your personal data to be transferred to the future forum owner!

    Accepting ensures:

    - Continued access to your account with a short break for the actual transfer.

    - Retention of your data under the same terms.

    Without consent:

    - You don't have further access to your forum user account.

    - Your account and personal data will be deleted after April 5, 2024.

    - Public posts remain, but usernames indicating real identity will be anonymized. If you disagree with a fictitious name you have the option to contact us so we can find a name that is acceptable to you.

    We hope to keep you in our community and see you on the forum soon!

    All the best

    Your Cerberus X Team

Android Build

JWB

New member
Joined
Oct 22, 2021
Messages
19
Hi,
Trying to do an Android Build but getting error:-

------------------------------------------------------------------------------------------------------------
FAILURE: Build failed with an exception.



* What went wrong:

Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'.

> Failed to install the following Android SDK packages as some licences have not been accepted.

patcher;v4 SDK Patch Applier v4

platforms;android-30 Android SDK Platform 30

emulator Android Emulator

build-tools;30.0.3 Android SDK Build-Tools 30.0.3

platform-tools Android SDK Platform-Tools

tools Android SDK Tools

To build this project, accept the SDK license agreements and install the missing components using the Android Studio SDK Manager.

Alternatively, to transfer the license agreements from one workstation to another, see http://d.android.com/r/studio-ui/export-licenses.html



Using Android SDK: C:\Program Files\Android\Android Studio
------------------------------------------------------------------------

I've tried numerous internet suggestions, including accepting all Licenses with cmd sdkmanager --licenses
which accepted 100% all licenses, but still get this error.

My Config.winnt is attached (and I did try using 'JDK_PATH="C:\Program Files (x86)\Java\jdk1.8.0_172" but made no difference.

I'm totally out of ideas and would greatly appreciate any help.

Thanks
 

Attachments

  • config.winnt.txt
    3 KB · Views: 67
Did you try the suggestion of copying the licence files like described here?
 
Yes ! Thank you very much 'Phil7'.

But now I have a new error as follows:-

-------------------------------------------

Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'.

> Failed to install the following SDK components:

patcher;v4 SDK Patch Applier v4

platforms;android-30 Android SDK Platform 30

emulator Android Emulator

build-tools;30.0.3 Android SDK Build-Tools 30.0.3

platform-tools Android SDK Platform-Tools

tools Android SDK Tools

The SDK directory is not writable (C:\Program Files\Android\Android Studio)
------------------------------------------------------------------------------------------
This appears to be because the Android Studio directory is set to Read Only in Windows 10.
But when I uncheck the Read Only attribute (as per attachment), it just will not save and reverts back again to Read Only.
There are many proposed solutions on Google and I spent nearly all day trying them all.
But although I am Administrator, either they don't work, or what they are asking me to do, does not exist on my windows computer.
This is a common issue according to the internet - Windows 10 is so annoying sometimes.
 

Attachments

  • Read Only attribute not saved Windows 10.JPG
    Read Only attribute not saved Windows 10.JPG
    49.6 KB · Views: 64
The SDK directory is not writable (C:\Program Files\Android\Android Studio)
------------------------------------------------------------------------------------------
This appears to be because the Android Studio directory is set to Read Only in Windows 10.
But when I uncheck the Read Only attribute (as per attachment), it just will not save and reverts back again to Read Only.
There are many proposed solutions on Google and I spent nearly all day trying them all.
But although I am Administrator, either they don't work, or what they are asking me to do, does not exist on my windows computer.
This is a common issue according to the internet - Windows 10 is so annoying sometimes.
Something tells me that the actual Android SDK is installed in the same location as Android Studio files, or it would help if the ANDROID_PATH is pointing to the Android SDK location and not the Android Studio installation.

You should never ever store SDK's or files on the main hard drive where all folders with require elevated privileges.
The only way to gain access to any folder in those locations is to change the security settings and add your systems login user name with full access.

Usually during Android Studio's first run, you can change the location of where the Android SDK is to be installed. The default is normally in the users home directory located in %APPDATA%\Local\Android\Sdk. To change the location, use the Android SDK manager that you can access from the Android Studio Welcome dialog (more options), or through the Tools menu when a project is loaded into Android Studio. It is also from here that you should install any addition API and virtual devices.

Using Android Studio to do the setup for the Android SDK is a lot easier that having to do things manually, plus you can import the resulting Cerberus project into Android Studio for any fine tuning.
 
Thanks 'dawlane' for good thinking outside the square.
But the Android SDK is indeed in 'C:\Users\badow\AppData\Local\Android\Sdk' (as installed by Android Studio itself).
I've checked and re-checked all the System Variables that this is indeed what is being referenced.

In 'config.winnt' I have ANDROID_PATH="C:\Program Files\Android\Android Studio"
As far as I can see, this is the only reference to this file.
But if I change it to 'ANDROID_PATH="C:\Users\bado\AppData\Local\Android\Sdk"
then the Build says 'Invalid Target'.


I'll have to give up, at least for now.
 
Did you open the Cerberus Project from within AndroidStudio? I remember getting good information on the issue and AndroidStudio also solved it for that project localy.

Does a (non Cerberus) AndroidStudio project, like one of the templates work as expected?
 
@Phil7
I had to do a clean install on a Windows machine, so I reinstalled Android Studio then Cerberus. So I'll be adding a new guide on how to do it.
Oh and there's a lovely bug in LoadState that stops compilation.
 
I resolved my building for Android error, whereby it wanted to write to the Android Studio directory which is Write-Protected.

1. In "config.winnt" I made this entry :- ANDROID_PATH="C:\Users\Android Studio"
and commented-out all the other ANDROID_PATH entries.

2. created empty directory "C:\Users\Android Studio".

3. copied everything UNDER the Android Studio installation directory (C:\Program Files\Android\Android Studio\bin\studio64.exe)
to "C:\Users\Android Studio" .

4. copied from my "C:\Users\me\AppData\Local\Android\Sdk", the following two directories to C:\Users\Android Studio :-
4.1 "build-tools" containing "30.03", which the android build process was asking for.
4.2 "platform-tools" containing "adb.exe" which the build process was asking for.

That's it - works perfectly!
==================================================================================================
 
Hey, I'm glad you got it working! :)
 
Back
Top Bottom