Giter VIP home page Giter VIP logo

Comments (17)

tony-mak avatar tony-mak commented on August 19, 2024 1

I can reproduce the same issue in my side.
I guess it is related to O-preview SDK rather than the gradle plugin, and I think it is the measure to avoid developers releasing apps build against preview SDK.

from android-testdpc.

tony-mak avatar tony-mak commented on August 19, 2024

There are two build flavors in the latest source, one targeting N and one targeting O.
Please use the N one for testing NFC bump.

Thanks.

from android-testdpc.

petarov avatar petarov commented on August 19, 2024

I have a somewhat similar issue. I did several modifications and tried to produce a signed N build and upload the APK as an alpha version in PlayStore. In PlayStore I then get:

You cannot upload a test-only APK

I'm trying to update the build gradle files atm to use gradle-2.3.2, but I face a bunch of other issues. Could it be that 3.0.0-alpha1 prevents publishing APKs to Alpha?

from android-testdpc.

tony-mak avatar tony-mak commented on August 19, 2024

When you run ./gradlew assembleDebug, you should find two apks are built. Could you try again with the one targeting N please?
Thanks

from android-testdpc.

petarov avatar petarov commented on August 19, 2024

Thanks for the feedback, but sadly it's still the same. I ran assembleRelease from the command line and then tried to upload the APK - target25/myapp-target25-release.apk.

screen shot 2017-05-24 at 18 12 24

from android-testdpc.

dj-4war avatar dj-4war commented on August 19, 2024

@ming030890 I have generated signed target 25 build and tried still the same issue.

from android-testdpc.

tony-mak avatar tony-mak commented on August 19, 2024

@dj-4war

Are you intend to test NFC bump? Or do you just want to set testdpc as device owner?
If it is the latter case, you can use command set-device-owner to workaround this.

from android-testdpc.

dj-4war avatar dj-4war commented on August 19, 2024

@ming030890 : Yes I want to test NFC bump because I need Device Owner, want to see the newer APIs and provision process. So I need NFC Bump.

from android-testdpc.

tony-mak avatar tony-mak commented on August 19, 2024

@dj-4war

You can run this command to set testdpc as device owner without NFC bump.
adb shell dpm set-device-owner com.afwsamples.testdpc/.DeviceAdminReceiver

And if you really wanna try out the real provisioning flow, please use this APK, it is built internally and it is NOT test only.
https://testdpc-latest-apk.appspot.com/

Thanks

from android-testdpc.

dj-4war avatar dj-4war commented on August 19, 2024

Thanks for the link, can I know what is the issue for this ?..

I don't see testOnly="false" anywhere in the app on is it in O libs ?

from android-testdpc.

tony-mak avatar tony-mak commented on August 19, 2024

From my understanding, it is the build system who adds the testOnly="true" when it sees you are compiling against the O preview SDK, in order to stop you from uploading this APK to play until the SDK is finalized.

In theory, you can use some hack to remove the testOnly = true by using hack like this.
https://stackoverflow.com/questions/35929484/android-n-cannot-run-on-lower-api-though-minsdk-set-to-14

from android-testdpc.

dj-4war avatar dj-4war commented on August 19, 2024

If that is the case they the build system would have allow for target 25 at least. BTW in the above context build system meaning gradle or Android core?.
Were you able to build target 25 flavor and install with the install trigger?

from android-testdpc.

petarov avatar petarov commented on August 19, 2024

Just wanted to add that, as expected, installing a release target25 build via adb didn't work for me either.

	pkg: /data/local/tmp/mayapp-target25-release.apk
Failure [INSTALL_FAILED_TEST_ONLY]

Atm, I use the 3.0.11 branch to build, test & upload. That works nicely.

Once SDK 26.0 is released, I'll try the master branch again.

from android-testdpc.

dj-4war avatar dj-4war commented on August 19, 2024

Thanks, seems it is updated very long Aug 12, 2016

from android-testdpc.

tony-mak avatar tony-mak commented on August 19, 2024

It should be working now, thanks

from android-testdpc.

liuwenping828 avatar liuwenping828 commented on August 19, 2024

$ adb shell pm install -t -r "/data/local/tmp/com.test.record"
pkg: /data/local/tmp/com.test.record
Failure [INSTALL_FAILED_TEST_ONLY]

$ adb shell pm uninstall com.test.record
DELETE_FAILED_INTERNAL_ERROR
Error while Installing APK

from android-testdpc.

anilsakr avatar anilsakr commented on August 19, 2024

It worked for me. Try to run this and build again. ./gradlew assembleRelease

Maybe You are uploading the wrong apk file which is generated previously not the signed apk. So select the apk file by locating the exact path of the generated signed apk file.

from android-testdpc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.