mirror of
https://git.alemi.dev/harvard-android.git
synced 2024-11-14 04:19:22 +01:00
docs: some info about some errors I saw
This commit is contained in:
parent
f2e34d889f
commit
e075a9d38f
1 changed files with 6 additions and 2 deletions
|
@ -3,10 +3,14 @@ This project is ready with gradle wrapper 7.3.3 and all strictly necessary files
|
|||
|
||||
## Installing Android SDK
|
||||
Note that you will need to download an android SDK: find them at the bottom of [Android Studio download page](https://developer.android.com/studio/) (under "Command line tools only").
|
||||
Once that is done, set your `ANDROID_HOME` environment variable to point to where you just extracted your files.
|
||||
If you'd rather choose where android caches its stuff, also set `ANDROID_SDK_HOME` and `ANDROID_USER_HOME` (note that, if equal to `ANDROID_HOME`, they seem to get ignored).
|
||||
Once that is done, set `sdk.dir` in `./local.properties` file, pointing to where you just extracted your files.
|
||||
If you'd rather choose where android caches its stuff, also set `ANDROID_SDK_HOME` and `ANDROID_USER_HOME` (note that, if equal to `ANDROID_HOME`, they seem to get ignored). I haven't tried this tho.
|
||||
|
||||
This is not enough: gradle will complain that no license was accepted. You need to navigate to your SDK folder, enter `./bin` directory and run `./sdkmanager --licenses`. (If you haven't set your sdk root, also pass `--sdk_root=..`)
|
||||
It's not super clear what `--licenses` will do, but it seems that it fetches the current licenses from Google servers and then asks you to accept them. Once that is done, a new folder `licenses` will be created in your SDK root, containing an unique identifier for each software which license you accepted.
|
||||
The only really necessary license is the android-sdk one (not preview or arm or mips). Everything else can be rejected.
|
||||
|
||||
Once you downloaded the SDK and accepted Google licenses, try to build the project once: Gradle will download missing components (such as Platform Tools, Patch Applier, Android Emulator, SDK Tools, Build Tools, SDK platform).
|
||||
|
||||
### Failed to find target with hash string '...'
|
||||
This error is weird and I have no idea why it happens. I think I solved it by manually redownloading the platform with sdkmanager: `$ANDROID_SDK_HOME/bin/sdkmanager "platforms;android-xx"`
|
||||
|
|
Loading…
Reference in a new issue