conference-app-2020: Failed to build iOS App
Hello, I would like you to tell me why I failed to build iOS App. The details are as follows. I know that you are busy, so I am sorry for your inconvenience.
Overview (Required)
- Failed to build iOS App like the issue (#514)
Steps To Reproduce
- Clone this repository
- Move to the directory named
ios-baseand run the commandmake init && open DroidKaigi\ 2020.xcworkspace - Build the project
- See error
Showing All Messages
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring project ':android-base'.
> kotlin.KotlinNullPointerException (no error message)
* 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
Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.1/userguide/command_line_interface.html#sec:command_line_warnings
BUILD FAILED in 755ms
mkdir: /Users/k_muta/Documents/conference-app-2020/ios-base/build: File exists
cp: /Users/k_muta/Documents/conference-app-2020/ios-base/../ios-combined/build/bin/iosX64/debugFramework/ios_combined.framework: No such file or directory
Env:
- OS: Mac OS Mojave
- Tool: Xcode 11.3
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 21 (19 by maintainers)
@takahirom (CC: @ry-itto @roana0229 ) I just build successfully!! I reinstall java8 and set the path by running this command
export JAVA_HOME=/Applications/Android\ Studio.app/Contents/jre/jdk/Contents/Homeagain. As a result, I did itðŸ˜ðŸ˜Sorry for bothering you…
If I have time and a chance to contribute your app, I will try it!
Thanks a lotðŸ˜ðŸ˜
Kaoru Muta
In case someone else encounters the same problem (for any Android project)…
For me the cause was that
ANDROID_HOMEenvironment variable was not set, nor did thelocal.propertiesfile contain value for keysdk.dir.Setting either of these variables to point to the where the Android SDK is installed - fixes the issue.
This issue appears when the project has data binding enabled and even for Gradle tasks that don’t use the Android SDK for anything.
So, for example, if you want to execute such a Gradle task on an environment that doesn’t have any Android SDK installed - you can set
ANDROID_HOMEto any path (eg:ANDROID_HOME=/tmp) and it will work (provided that the task you’ll be running doesn’t require Android SDK)Thanks for swift reply! I just checked
local.properties, and it seems that the scriptsdk.dir=/Users/k_muta/Library/Android/sdkhad already been written…(k_muta is my user name)
👀 https://android.googlesource.com/platform/tools/base/+/studio-master-dev/build-system/gradle-core/src/main/java/com/android/build/gradle/internal/tasks/databinding/DataBindingCompilerArguments.kt#170
Can you add this to local.properties?