Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android Studio for Windows: Building drishti error #718

Open
ygyin-ivy opened this issue Aug 16, 2018 · 13 comments
Open

Android Studio for Windows: Building drishti error #718

ygyin-ivy opened this issue Aug 16, 2018 · 13 comments

Comments

@ygyin-ivy
Copy link

ygyin-ivy commented Aug 16, 2018

when i build armeabi-v7a with minSdkVersion 19, there is a Building drishti error.
some cache file not found
https://raw.githubusercontent.com/elucideye/hunter-cache/master/1dac53e/drishti/684ad3fc824c77a5eb02c7a8f5ae6a5db011b678/684ad3f/c41b297/4830b34/da39a3e/basic-deps.DONE
arm64-v8a with minSdkVersion 24 passed.

hunter log
log.txt

cmake log
log.txt

@ruslo
Copy link
Collaborator

ruslo commented Aug 16, 2018

some cache file not found
https://raw.githubusercontent.com/elucideye/hunter-cache/master/1dac53e/drishti/684ad3fc824c77a5eb02c7a8f5ae6a5db011b678/684ad3f/c41b297/4830b34/da39a3e/basic-deps.DONE

It's not a error, if cache file not found then usually it means that we need to build package from sources.

when i build armeabi-v7a with minSdkVersion 19

Minimal SDK version is set to 24 currently:

Don't remember why, need to check. We do use Camera2 API hence minimal is at least 21 (Android 5.0), probably 24 is the version where Android ARM64 emulator is available.

I don't see what is the error exactly but I do remember that ARMv7 was not working with Android Studio on master branch, we do test Android NDK r17 ARMv7 but this test is for CMake based toolchain which is a little bit different and don't cover all the code.

@ygyin-ivy
Copy link
Author

ygyin-ivy commented Aug 16, 2018

thx, minSdkVersion 24 is too high for my mobile.
maybe i can download drishti-v0.12.4-Darwin-android-ndk-r17-api-19-armeabi-v7a-neon-clang-libcxx-MinSizeRel.tar.gz and try again

@headupinclouds
Copy link
Collaborator

Don't remember why, need to check.

We started with the C++ camera interface, which required API 24, but it didn't work with SurfaceTextures. Maybe that was it?

Maybe arm64 + API 21 will work?

https://developer.android.com/ndk/guides/stable_apis#a24

We can add the requirements to the README.

@headupinclouds
Copy link
Collaborator

headupinclouds commented Aug 16, 2018

maybe i can download drishti-v0.12.4-Darwin-android-ndk-r17-api-19-armeabi-v7a-neon-clang-libcxx-MinSizeRel.tar.gz

You can build the cross platform native libs with that release, and it should build fine, but there is no Android Studio demo application in that release.

I will try the API 21 + arm64 build for the Android Studio app.

@headupinclouds headupinclouds changed the title Andorid Studio of window: Building drishti error Android Studio for Windows: Building drishti error Aug 16, 2018
@ruslo
Copy link
Collaborator

ruslo commented Aug 16, 2018

Don't remember why, need to check

requestPermissions available since API 24:

I do remember that ARMv7 was not working with Android Studio

We just need NEON, fixed by #719

@headupinclouds
Copy link
Collaborator

requestPermissions available since API 24

https://developer.android.com/about/dashboards/

  • 42.9% >= API 21
  • 86.8% >= API 24

It is probably worth considering alternatives 43.1% more coverage (if we target API 21).

@headupinclouds
Copy link
Collaborator

thx, minSdkVersion 24 is too high for my mobile.

@ygyin-ivy : Can you run API 21?

@ygyin-ivy
Copy link
Author

i can't test architecture arm64-v8a

@headupinclouds
Copy link
Collaborator

This was fixed by @ruslo in #719.

You can enable the armv7 targets here:

                //include 'x86_64', 'armeabi-v7a', 'arm64-v8a'
                include 'arm64-v8a'

                universalApk false
            }
        }
    }

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_7
        targetCompatibility JavaVersion.VERSION_1_7
    }
    buildToolsVersion '27.0.3'
}

dependencies {
    implementation "com.android.support:support-v4:27.0.2"
    implementation "com.android.support:support-v13:27.0.2"
    implementation "com.android.support:cardview-v7:27.0.2"
    implementation "com.android.support:appcompat-v7:27.0.2"
}
 
//ext.abiCodes = ['x86_64':1, 'armeabi-v7a':3, 'arm64-v8a':4]
ext.abiCodes = ['arm64-v8a':4]

From @ruslo's comment above, you can probably reduce the sdk target to 21 if you find a workaround for the camera permission code block he highlighted above.

@ygyin-ivy
Copy link
Author

ygyin-ivy commented Aug 21, 2018

i know where to enable armeabi-v7a.
as i mentioned above, there is a error when build armeabi-v7a with api 19.
i will try to build armeabi-v7a with api 21.


after a whole day building, it's still stuck with gradle building.

@headupinclouds
Copy link
Collaborator

I will try a Windows build this weekend. Can you post the CMake build logs?

src/examples/facefilter/android-studio/app/.externalNativeBuild/cmake/debug/arm64-v8a/cmake_build_command.txt
src/examples/facefilter/android-studio/app/.externalNativeBuild/cmake/debug/arm64-v8a/cmake_build_output.txt
src/examples/facefilter/android-studio/app/.externalNativeBuild/cmake/debug/arm64-v8a/cmake_server_log.txt

@ruslo
Copy link
Collaborator

ruslo commented Aug 25, 2018

after a whole day building, it's still stuck with gradle building

Can you try to minimize the work with Gradle tool? Check this part:

@ygyin-ivy
Copy link
Author

ygyin-ivy commented Aug 27, 2018

The time of generating log is wrong,
it is still a log of the success build for arm64-v8a_api_24

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants