Android Studio : Unable to locate apk - android

I am trying to create an unsigned apk that I can share internally for testing. On Android Studio, I did the following :
Click Build -> Clean Project
Build -> Make Project
The build was successful with the following message :
Configuration on demand is an incubating feature. :app:preBuild
UP-TO-DATE :app:preDebugBuild UP-TO-DATE :app:checkDebugManifest
:app:preReleaseBuild UP-TO-DATE :volley:compileLint
:volley:copyReleaseLint UP-TO-DATE :volley:mergeReleaseProguardFiles
UP-TO-DATE :volley:preBuild UP-TO-DATE :volley:preReleaseBuild
UP-TO-DATE :volley:checkReleaseManifest
:volley:prepareReleaseDependencies :volley:compileReleaseAidl
UP-TO-DATE :volley:compileReleaseRenderscript UP-TO-DATE
:volley:generateReleaseBuildConfig UP-TO-DATE
:volley:generateReleaseAssets UP-TO-DATE :volley:mergeReleaseAssets
UP-TO-DATE :volley:generateReleaseResValues UP-TO-DATE
:volley:generateReleaseResources UP-TO-DATE
:volley:packageReleaseResources UP-TO-DATE
:volley:processReleaseManifest UP-TO-DATE
:volley:processReleaseResources UP-TO-DATE
:volley:generateReleaseSources UP-TO-DATE
:volley:processReleaseJavaRes UP-TO-DATE
:volley:compileReleaseJavaWithJavac UP-TO-DATE
:volley:packageReleaseJar UP-TO-DATE :volley:compileReleaseNdk
UP-TO-DATE :volley:packageReleaseJniLibs UP-TO-DATE
:volley:packageReleaseLocalJar UP-TO-DATE
:volley:packageReleaseRenderscript UP-TO-DATE :volley:bundleRelease
UP-TO-DATE :app:prepareBluetoothGattVolleyUnspecifiedLibrary
UP-TO-DATE :app:prepareComAndroidSupportAppcompatV72301Library
UP-TO-DATE :app:prepareComAndroidSupportDesign2301Library UP-TO-DATE
:app:prepareComAndroidSupportSupportV42301Library UP-TO-DATE
:app:prepareDebugDependencies :app:compileDebugAidl UP-TO-DATE
:app:compileDebugRenderscript UP-TO-DATE :app:generateDebugBuildConfig
UP-TO-DATE :app:generateDebugAssets UP-TO-DATE :app:mergeDebugAssets
UP-TO-DATE :app:generateDebugResValues UP-TO-DATE
:app:generateDebugResources UP-TO-DATE :app:mergeDebugResources
UP-TO-DATE :app:processDebugManifest UP-TO-DATE
:app:processDebugResources UP-TO-DATE :app:generateDebugSources
UP-TO-DATE :app:preDebugAndroidTestBuild UP-TO-DATE
:app:prepareDebugAndroidTestDependencies
:app:compileDebugAndroidTestAidl UP-TO-DATE
:app:processDebugAndroidTestManifest UP-TO-DATE
:app:compileDebugAndroidTestRenderscript UP-TO-DATE
:app:generateDebugAndroidTestBuildConfig UP-TO-DATE
:app:generateDebugAndroidTestAssets UP-TO-DATE
:app:mergeDebugAndroidTestAssets UP-TO-DATE
:app:generateDebugAndroidTestResValues UP-TO-DATE
:app:generateDebugAndroidTestResources UP-TO-DATE
:app:mergeDebugAndroidTestResources UP-TO-DATE
:app:processDebugAndroidTestResources UP-TO-DATE
:app:generateDebugAndroidTestSources UP-TO-DATE
:app:processDebugJavaRes UP-TO-DATE :app:compileDebugJavaWithJavac
UP-TO-DATE :app:compileDebugNdk UP-TO-DATE :app:compileDebugSources
UP-TO-DATE :app:processDebugAndroidTestJavaRes UP-TO-DATE
:app:compileDebugAndroidTestJavaWithJavac UP-TO-DATE
:app:compileDebugAndroidTestNdk UP-TO-DATE
:app:compileDebugAndroidTestSources UP-TO-DATE :volley:preDebugBuild
UP-TO-DATE :volley:checkDebugManifest :volley:prepareDebugDependencies
:volley:compileDebugAidl UP-TO-DATE :volley:compileDebugRenderscript
UP-TO-DATE :volley:generateDebugBuildConfig UP-TO-DATE
:volley:generateDebugAssets UP-TO-DATE :volley:mergeDebugAssets
UP-TO-DATE :volley:generateDebugResValues UP-TO-DATE
:volley:generateDebugResources UP-TO-DATE
:volley:packageDebugResources UP-TO-DATE :volley:processDebugManifest
UP-TO-DATE :volley:processDebugResources UP-TO-DATE
:volley:generateDebugSources UP-TO-DATE
:volley:preDebugAndroidTestBuild UP-TO-DATE
:volley:prepareDebugAndroidTestDependencies
:volley:compileDebugAndroidTestAidl UP-TO-DATE :volley:copyDebugLint
UP-TO-DATE :volley:mergeDebugProguardFiles UP-TO-DATE
:volley:processDebugJavaRes UP-TO-DATE
:volley:compileDebugJavaWithJavac UP-TO-DATE :volley:packageDebugJar
UP-TO-DATE :volley:compileDebugNdk UP-TO-DATE
:volley:packageDebugJniLibs UP-TO-DATE :volley:packageDebugLocalJar
UP-TO-DATE :volley:packageDebugRenderscript UP-TO-DATE
:volley:bundleDebug UP-TO-DATE :volley:compileDebugSources UP-TO-DATE
:volley:assembleDebug UP-TO-DATE
:volley:processDebugAndroidTestManifest UP-TO-DATE
:volley:compileDebugAndroidTestRenderscript UP-TO-DATE
:volley:generateDebugAndroidTestBuildConfig UP-TO-DATE
:volley:generateDebugAndroidTestAssets UP-TO-DATE
:volley:mergeDebugAndroidTestAssets UP-TO-DATE
:volley:generateDebugAndroidTestResValues UP-TO-DATE
:volley:generateDebugAndroidTestResources UP-TO-DATE
:volley:mergeDebugAndroidTestResources UP-TO-DATE
:volley:processDebugAndroidTestResources UP-TO-DATE
:volley:generateDebugAndroidTestSources UP-TO-DATE
:volley:processDebugAndroidTestJavaRes UP-TO-DATE
:volley:compileDebugAndroidTestJavaWithJavac UP-TO-DATE
:volley:compileDebugAndroidTestNdk UP-TO-DATE
:volley:compileDebugAndroidTestSources UP-TO-DATE
BUILD SUCCESSFUL
Total time: 3.739 secs
However, I am unable to locate the apk. I tried looking in the app/outputs directory of my project, but that directory has just one folder called logs/ and no other folder. Any suggestions would help.

make project does not make an unsigned apk. I have made the same mistake What you can do is build the unsigned apk using gradle. Just follow the following steps (you can do it faster than it took me to type the steps):
To the left of the run button you should see a drop down list saying "app" with an android logo to the left of it. click it.
click on "Edit Configurations"
Click the green plus button on top left and select "Gradle"
Where it says name, enter what ever you want but leave the rest blank. I set mine as "Assemble"
Below where it says "Before launch: Gradle task" click the green plus sign and select "Run Gradle Task"
Where it says "tasks" type in "assemble"
Press okay and okay to save it
Press the run button. the apk will appear in YourProjectFolderName>app>build>outputs>apk
to change the run button back to running your app via adb just click the drop down button from step 1 again and select "app"
Also note that you cannot install a unsigned APK on a physical device. whether you're emailing the apk, copying it to the phone storage over usb, or any other method it will NOT let you install it. You will either need to create a signed apk (its very simple) or connect each test device to your computer and install it through adb.

Related

Observed package id 'add-ons;addon-google_apis-google-19' in inconsistent location

Today I wanted to generate an APK from my app but i got the following error:
Observed package id 'add-ons;addon-google_apis-google-19' in inconsistent location
Full error report:
Information:Gradle tasks [:MyApp:assembleRelease]
Observed package id 'add-ons;addon-google_apis-google-19' in inconsistent location 'C:\Users\MyUser\AppData\Local\Android\sdk\add-ons\addon-google_apis-google-19-1' (Expected 'C:\Users\MyUser\AppData\Local\Android\sdk\add-ons\addon-google_apis-google-19')
:MyApp:preBuild UP-TO-DATE
:MyApp:preReleaseBuild UP-TO-DATE
:MyApp:checkReleaseManifest
:MyApp:preDebugBuild UP-TO-DATE
:MyAppEssentialsLib:preBuild UP-TO-DATE
:MyAppEssentialsLib:preReleaseBuild UP-TO-DATE
:MyAppEssentialsLib:compileReleaseNdk UP-TO-DATE
:MyAppEssentialsLib:compileLint
:MyAppEssentialsLib:copyReleaseLint UP-TO-DATE
:MyAppEssentialsLib:checkReleaseManifest
:MyAppEssentialsLib:preDebugAndroidTestBuild UP-TO-DATE
:MyAppEssentialsLib:preDebugBuild UP-TO-DATE
:MyAppEssentialsLib:preDebugUnitTestBuild UP-TO-DATE
:MyAppEssentialsLib:preReleaseUnitTestBuild UP-TO-DATE
:MyAppEssentialsLib:prepareComAndroidSupportAnimatedVectorDrawable2330Library UP-TO-DATE
:MyAppEssentialsLib:prepareComAndroidSupportAppcompatV72330Library UP-TO-DATE
:MyAppEssentialsLib:prepareComAndroidSupportDesign2330Library UP-TO-DATE
:MyAppEssentialsLib:prepareComAndroidSupportRecyclerviewV72330Library UP-TO-DATE
:MyAppEssentialsLib:prepareComAndroidSupportSupportV132330Library UP-TO-DATE
:MyAppEssentialsLib:prepareComAndroidSupportSupportV42330Library UP-TO-DATE
:MyAppEssentialsLib:prepareComAndroidSupportSupportVectorDrawable2330Library UP-TO-DATE
:MyAppEssentialsLib:prepareComFacebookAndroidFacebookAndroidSdk460Library UP-TO-DATE
:MyAppEssentialsLib:prepareComGithubAfollestadMaterialDialogsCore0856Library UP-TO-DATE
:MyAppEssentialsLib:prepareComGithubJkwiecienEasyImage109Library UP-TO-DATE
:MyAppEssentialsLib:prepareComGoogleAndroidGmsPlayServicesBase840Library UP-TO-DATE
:MyAppEssentialsLib:prepareComGoogleAndroidGmsPlayServicesBasement840Library UP-TO-DATE
:MyAppEssentialsLib:prepareComGoogleAndroidGmsPlayServicesGcm840Library UP-TO-DATE
:MyAppEssentialsLib:prepareComGoogleAndroidGmsPlayServicesLocation840Library UP-TO-DATE
:MyAppEssentialsLib:prepareComGoogleAndroidGmsPlayServicesMaps840Library UP-TO-DATE
:MyAppEssentialsLib:prepareComGoogleAndroidGmsPlayServicesMeasurement840Library UP-TO-DATE
:MyAppEssentialsLib:prepareDeHdodenhofCircleimageview200Library UP-TO-DATE
:MyAppEssentialsLib:prepareMeZhanghaiAndroidMaterialprogressbarLibrary114Library UP-TO-DATE
:MyAppEssentialsLib:prepareReleaseDependencies
:MyAppEssentialsLib:compileReleaseAidl UP-TO-DATE
:MyAppEssentialsLib:compileReleaseRenderscript UP-TO-DATE
:MyAppEssentialsLib:generateReleaseBuildConfig UP-TO-DATE
:MyAppEssentialsLib:generateReleaseAssets UP-TO-DATE
:MyAppEssentialsLib:mergeReleaseAssets UP-TO-DATE
:MyAppEssentialsLib:generateReleaseResValues UP-TO-DATE
:MyAppEssentialsLib:generateReleaseResources UP-TO-DATE
:MyAppEssentialsLib:mergeReleaseResources UP-TO-DATE
:MyAppEssentialsLib:processReleaseManifest UP-TO-DATE
:MyAppEssentialsLib:processReleaseResources UP-TO-DATE
:MyAppEssentialsLib:generateReleaseSources UP-TO-DATE
:MyAppEssentialsLib:compileReleaseJavaWithJavac UP-TO-DATE
:MyAppEssentialsLib:extractReleaseAnnotations UP-TO-DATE
:MyAppEssentialsLib:mergeReleaseProguardFiles UP-TO-DATE
:MyAppEssentialsLib:packageReleaseRenderscript UP-TO-DATE
:MyAppEssentialsLib:packageReleaseResources UP-TO-DATE
:MyAppEssentialsLib:processReleaseJavaRes UP-TO-DATE
:MyAppEssentialsLib:transformResourcesWithMergeJavaResForRelease UP-TO-DATE
:MyAppEssentialsLib:transformClassesAndResourcesWithSyncLibJarsForRelease UP-TO-DATE
:MyAppEssentialsLib:mergeReleaseJniLibFolders UP-TO-DATE
:MyAppEssentialsLib:transformNative_libsWithMergeJniLibsForRelease UP-TO-DATE
:MyAppEssentialsLib:transformNative_libsWithSyncJniLibsForRelease UP-TO-DATE
:MyAppEssentialsLib:bundleRelease UP-TO-DATE
:MyApp:prepareComAndroidSupportAnimatedVectorDrawable2330Library UP-TO-DATE
:MyApp:prepareComAndroidSupportAppcompatV72330Library UP-TO-DATE
:MyApp:prepareComAndroidSupportDesign2330Library UP-TO-DATE
:MyApp:prepareComAndroidSupportRecyclerviewV72330Library UP-TO-DATE
:MyApp:prepareComAndroidSupportSupportV132330Library UP-TO-DATE
:MyApp:prepareComAndroidSupportSupportV42330Library UP-TO-DATE
:MyApp:prepareComAndroidSupportSupportVectorDrawable2330Library UP-TO-DATE
:MyApp:prepareComFacebookAndroidFacebookAndroidSdk460Library UP-TO-DATE
:MyApp:prepareComGithubAfollestadMaterialDialogsCore0856Library UP-TO-DATE
:MyApp:prepareComGithubJkwiecienEasyImage109Library UP-TO-DATE
:MyApp:prepareComGoogleAndroidGmsPlayServicesBase840Library UP-TO-DATE
:MyApp:prepareComGoogleAndroidGmsPlayServicesBasement840Library UP-TO-DATE
:MyApp:prepareComGoogleAndroidGmsPlayServicesGcm840Library UP-TO-DATE
:MyApp:prepareComGoogleAndroidGmsPlayServicesLocation840Library UP-TO-DATE
:MyApp:prepareComGoogleAndroidGmsPlayServicesMaps840Library UP-TO-DATE
:MyApp:prepareComGoogleAndroidGmsPlayServicesMeasurement840Library UP-TO-DATE
:MyApp:prepareDeHdodenhofCircleimageview200Library UP-TO-DATE
:MyApp:prepareMeZhanghaiAndroidMaterialprogressbarLibrary114Library UP-TO-DATE
:MyApp:prepareReleaseDependencies
:MyApp:compileReleaseAidl UP-TO-DATE
:MyApp:compileReleaseRenderscript UP-TO-DATE
:MyApp:generateReleaseBuildConfig UP-TO-DATE
:MyApp:generateReleaseAssets UP-TO-DATE
:MyApp:mergeReleaseAssets UP-TO-DATE
:MyApp:generateReleaseResValues UP-TO-DATE
:MyApp:processReleaseGoogleServices
:MyApp:generateReleaseResources
:MyApp:mergeReleaseResources UP-TO-DATE
:MyApp:processReleaseManifest UP-TO-DATE
:MyApp:processReleaseResources UP-TO-DATE
:MyApp:generateReleaseSources UP-TO-DATE
:MyApp:compileReleaseJavaWithJavac UP-TO-DATE
:MyApp:compileReleaseNdk UP-TO-DATE
:MyApp:compileReleaseSources UP-TO-DATE
:MyApp:lintVitalRelease
:MyApp:prePackageMarkerForRelease
:MyApp:transformClassesWithDexForRelease UP-TO-DATE
:MyApp:mergeReleaseJniLibFolders UP-TO-DATE
:MyApp:transformNative_libsWithMergeJniLibsForRelease UP-TO-DATE
:MyApp:processReleaseJavaRes UP-TO-DATE
:MyApp:transformResourcesWithMergeJavaResForRelease UP-TO-DATE
:MyApp:validateExternalOverrideSigning
:MyApp:packageRelease UP-TO-DATE
:MyApp:zipalignRelease
Unable to open 'C:\Users\MyApp-release.apk' as zip archive
Error:Execution failed for task ':MyApp:zipalignRelease'.
> Process 'command 'C:\Users\MyUser\AppData\Local\Android\sdk\build-tools\23.0.2\zipalign.exe'' finished with non-zero exit value 1
I only get this error if i want to build an APK, I can run my app in debug mode.
I have searched the interwebz bout didnt found any solution, only some google forums but not anything that I could use for solution.
Maybe the the apk generation is not failing because of this, but the message don't really contians any other issues, as far as I see.
Please advice me if you can.
This is caused by upgrading SDK which has some changes in package names. Since this is just a warning, it could safely be ignored.
Anyway, to remove the warning,remove all Android SDK Build Tools 19.x. It should only show Android SDK Buld Tools 19.1 afterward. Install that version
back, and you should be good to go.
Source: https://code.google.com/p/android/issues/detail?id=199518

Keep product flavors from effecting build times in Android Studio

My app currently has 5 different product flavors. The reasons aren't really that important are in my control, but essentially we need this many product flavors to target different testing servers that have different testing data.
prod {
applicationId "com.us.android"
}
stage {
applicationId "com.us.android.stage"
}
qa {
applicationId "com.us.android.qa"
}
dev {
applicationId "com.us.android.dev"
}
legacy {
applicationId "com.us.android.legacy"
}
The issue I'm running into is whenever I create a new build all of the product flavors are built. So for my project to build it takes about 50 seconds, if I were to comment out all, but the build I care about that time goes down to about 10 seconds. That said commenting them out is great if it were just me, but if I accidentally commit the commented out version, that's going to cause more problems when we try to build elsewhere.
My question is, is there is any clean way I can make it so that in the local development only the build I need is built, but I can still build the other branches as needed?
We are using Jenkins which, I figure seems like it could help us get these builds where we don't need to worry about them, but I'm not sure how.
Edit: Here are some logs, because that might help.
This is when we have all the product flavors but, the build variant set to stageDebug:
Executing tasks: [:us:assembleStageDebug]
Parallel execution with configuration on demand is an incubating feature.
:api:compileJava
:datePickerLibrary:compileLint
:us:preBuild UP-TO-DATE
:us:preStageDebugBuild UP-TO-DATE
:datePickerLibrary:copyReleaseLint UP-TO-DATE
:us:checkStageDebugManifest
:datePickerLibrary:preBuild UP-TO-DATE
:datePickerLibrary:preReleaseBuild UP-TO-DATE
:datePickerLibrary:checkReleaseManifest
:us:preDevDebugBuild UP-TO-DATE
:datePickerLibrary:preDebugAndroidTestBuild
:us:preDevReleaseBuild UP-TO-DATE
:datePickerLibrary:preDebugAndroidTestBuild UP-TO-DATE
:datePickerLibrary:preDebugBuild UP-TO-DATE
:us:preProdDebugBuild UP-TO-DATE
:datePickerLibrary:preDebugUnitTestBuild UP-TO-DATE
:us:preProdReleaseBuild UP-TO-DATE
:datePickerLibrary:preReleaseUnitTestBuild UP-TO-DATE
:us:preQaDebugBuild UP-TO-DATE
:datePickerLibrary:prepareComAndroidSupportSupportV132100Library
:us:preQaReleaseBuild UP-TO-DATE
:us:preStageReleaseBuild UP-TO-DATE
:us:prelegacyDebugBuild UP-TO-DATE
:us:prelegacyReleaseBuild UP-TO-DATE
:datePickerLibrary:prepareComAndroidSupportSupportV132100Library UP-TO-DATE
:datePickerLibrary:prepareComAndroidSupportSupportV42100Library
:us:generateStageDebugBuildConfig UP-TO-DATE
:datePickerLibrary:prepareReleaseDependencies UP-TO-DATE
:us:generateStageDebugResValues
:datePickerLibrary:compileReleaseAidl UP-TO-DATE
:api:processResources UP-TO-DATE
:datePickerLibrary:prepareComAndroidSupportSupportV42100Library UP-TO-DATE
:us:processStageDebugGoogleServices
File google-services.json is missing from module root folder. The Google Quickstart Plugin cannot function without it.
:api:classes
:us:generateStageDebugAssets UP-TO-DATE
:api:classes UP-TO-DATE
:api:compileJava UP-TO-DATE
:api:jar
:us:processStageDebugJavaRes UP-TO-DATE
:datePickerLibrary:compileReleaseRenderscript
:us:compileStageDebugNdk UP-TO-DATE
:us:newRelicInstrumentTask UP-TO-DATE
:datePickerLibrary:generateReleaseBuildConfig UP-TO-DATE
:datePickerLibrary:generateReleaseAssets UP-TO-DATE
:datePickerLibrary:mergeReleaseAssets UP-TO-DATE
:datePickerLibrary:compileReleaseRenderscript UP-TO-DATE
[newrelic.info] Detected cached instrumentation.
:datePickerLibrary:generateReleaseResValues UP-TO-DATE
:datePickerLibrary:generateReleaseResources UP-TO-DATE
:datePickerLibrary:mergeReleaseResources UP-TO-DATE
:datePickerLibrary:processReleaseManifest UP-TO-DATE
:datePickerLibrary:processReleaseResources UP-TO-DATE
:datePickerLibrary:generateReleaseSources UP-TO-DATE
:datePickerLibrary:processReleaseJavaRes UP-TO-DATE
:datePickerLibrary:compileReleaseJavaWithJavac UP-TO-DATE
:datePickerLibrary:extractReleaseAnnotations UP-TO-DATE
:datePickerLibrary:mergeReleaseProguardFiles UP-TO-DATE
:datePickerLibrary:packageReleaseJar UP-TO-DATE
:datePickerLibrary:compileReleaseNdk UP-TO-DATE
:datePickerLibrary:packageReleaseJniLibs UP-TO-DATE
:datePickerLibrary:packageReleaseLocalJar UP-TO-DATE
:datePickerLibrary:packageReleaseRenderscript UP-TO-DATE
:datePickerLibrary:packageReleaseResources
:api:jar UP-TO-DATE
:us:validateDebugSigning
:datePickerLibrary:bundleRelease
:us:validateDebugSigning UP-TO-DATE
:us:prepareAndroidClientDatePickerLibraryUnspecifiedLibrary UP-TO-DATE
:us:prepareComAndroidSupportAppcompatV72221Library UP-TO-DATE
:us:prepareComAndroidSupportCardviewV72221Library UP-TO-DATE
:us:prepareComAndroidSupportDesign2221Library UP-TO-DATE
:us:prepareComAndroidSupportMultidex101Library UP-TO-DATE
:us:prepareComAndroidSupportRecyclerviewV72221Library UP-TO-DATE
:us:prepareComAndroidSupportSupportV132221Library UP-TO-DATE
:us:prepareComAndroidSupportSupportV42301Library UP-TO-DATE
:us:prepareComFacebookAndroidFacebookAndroidSdk3230Library UP-TO-DATE
:us:prepareComGoogleAndroidGmsPlayServicesAnalytics750Library UP-TO-DATE
:us:prepareComGoogleAndroidGmsPlayServicesAppinvite750Library UP-TO-DATE
:us:prepareComGoogleAndroidGmsPlayServicesBase750Library UP-TO-DATE
:us:prepareComGoogleAndroidGmsPlayServicesGcm750Library UP-TO-DATE
:us:prepareComGoogleAndroidGmsPlayServicesLocation750Library UP-TO-DATE
:us:prepareComGoogleAndroidGmsPlayServicesMaps750Library UP-TO-DATE
:us:prepareComInstabugLibraryInstabugcore17Library UP-TO-DATE
:us:prepareComInstabugLibraryInstabugsupport17Library UP-TO-DATE
:us:prepareComMixpanelAndroidMixpanelAndroid462Library UP-TO-DATE
:us:prepareComRengwuxianMaterialedittextLibrary214Library UP-TO-DATE
:us:prepareComRoomoramaCaldroid220Library UP-TO-DATE
:us:prepareComZendeskSdk1322Library UP-TO-DATE
:us:prepareUkCoChrisjenxCalligraphy201Library UP-TO-DATE
:us:prepareStageDebugDependencies
:us:compileStageDebugAidl UP-TO-DATE
:us:compileStageDebugRenderscript UP-TO-DATE
:us:generateStageDebugResources
:us:mergeStageDebugResources UP-TO-DATE
:us:jrebelPinStageDebugResids UP-TO-DATE
:us:mergeStageDebugAssets UP-TO-DATE
:us:processStageDebugManifest UP-TO-DATE
:us:processStageDebugResources UP-TO-DATE
:us:generateStageDebugSources UP-TO-DATE
:us:compileStageDebugJavaWithJavac UP-TO-DATE
:us:compileStageDebugSources UP-TO-DATE
:us:generateStageDebugJrebelLayout
:us:preDexStageDebug UP-TO-DATE
:us:dexStageDebug UP-TO-DATE
:us:newRelicDeinstrumentTask
[newrelic.info] Deinstrumenting...
:us:jrebelPostProcessStageDebugResids UP-TO-DATE
:us:packageStageDebug UP-TO-DATE
:us:zipalignStageDebug UP-TO-DATE
:us:assembleStageDebug
BUILD SUCCESSFUL
Total time: 34.308 secs
This is when we only have the desired stage product flavor:
Executing tasks: [:urbansitter:assembleStageDebug]
Parallel execution with configuration on demand is an incubating feature.
:api:compileJava
:datePickerLibrary:compileLint
:us:preBuild UP-TO-DATE
:us:preStageDebugBuild UP-TO-DATE
:datePickerLibrary:copyReleaseLint
:us:checkStageDebugManifest UP-TO-DATE
:datePickerLibrary:preBuild UP-TO-DATE
:us:preStageReleaseBuild UP-TO-DATE
:datePickerLibrary:preReleaseBuild UP-TO-DATE
:us:generateStageDebugBuildConfig
:datePickerLibrary:checkReleaseManifest
:datePickerLibrary:preDebugAndroidTestBuild UP-TO-DATE
:datePickerLibrary:preDebugBuild UP-TO-DATE
:datePickerLibrary:preDebugUnitTestBuild UP-TO-DATE
:us:generateStageDebugResValues
:us:generateStageDebugBuildConfig UP-TO-DATE
:datePickerLibrary:preReleaseUnitTestBuild
:us:processStageDebugGoogleServices UP-TO-DATE
File google-services.json is missing from module root folder. The Google Quickstart Plugin cannot function without it.
:datePickerLibrary:prepareComAndroidSupportSupportV132100Library
:us:generateStageDebugAssets UP-TO-DATE
:us:processStageDebugJavaRes UP-TO-DATE
:datePickerLibrary:prepareComAndroidSupportSupportV132100Library UP-TO-DATE
:us:compileStageDebugNdk
:datePickerLibrary:prepareComAndroidSupportSupportV42100Library UP-TO-DATE
:us:newRelicInstrumentTask UP-TO-DATE
:us:compileStageDebugNdk UP-TO-DATE
:api:processResources UP-TO-DATE
[newrelic.info] Detected cached instrumentation.
:datePickerLibrary:prepareReleaseDependencies
:api:classes UP-TO-DATE
:api:jar
:datePickerLibrary:compileReleaseAidl UP-TO-DATE
:datePickerLibrary:compileReleaseRenderscript UP-TO-DATE
:datePickerLibrary:prepareReleaseDependencies UP-TO-DATE
:datePickerLibrary:generateReleaseBuildConfig UP-TO-DATE
:datePickerLibrary:generateReleaseAssets UP-TO-DATE
:datePickerLibrary:mergeReleaseAssets UP-TO-DATE
:datePickerLibrary:generateReleaseResValues UP-TO-DATE
:datePickerLibrary:generateReleaseResources UP-TO-DATE
:datePickerLibrary:mergeReleaseResources
:us:validateDebugSigning UP-TO-DATE
:datePickerLibrary:processReleaseManifest UP-TO-DATE
:datePickerLibrary:processReleaseResources UP-TO-DATE
:datePickerLibrary:generateReleaseSources UP-TO-DATE
:datePickerLibrary:processReleaseJavaRes UP-TO-DATE
:datePickerLibrary:compileReleaseJavaWithJavac UP-TO-DATE
:datePickerLibrary:extractReleaseAnnotations UP-TO-DATE
:datePickerLibrary:mergeReleaseProguardFiles UP-TO-DATE
:datePickerLibrary:packageReleaseJar UP-TO-DATE
:datePickerLibrary:compileReleaseNdk UP-TO-DATE
:datePickerLibrary:packageReleaseJniLibs UP-TO-DATE
:datePickerLibrary:packageReleaseLocalJar UP-TO-DATE
:datePickerLibrary:packageReleaseRenderscript UP-TO-DATE
:datePickerLibrary:packageReleaseResources UP-TO-DATE
:datePickerLibrary:bundleRelease UP-TO-DATE
:us:prepareAndroidClientDatePickerLibraryUnspecifiedLibrary UP-TO-DATE
:us:prepareComAndroidSupportAppcompatV72221Library UP-TO-DATE
:us:prepareComAndroidSupportCardviewV72221Library UP-TO-DATE
:us:prepareComAndroidSupportDesign2221Library UP-TO-DATE
:us:prepareComAndroidSupportMultidex101Library UP-TO-DATE
:us:prepareComAndroidSupportRecyclerviewV72221Library UP-TO-DATE
:us:prepareComAndroidSupportSupportV132221Library UP-TO-DATE
:us:prepareComAndroidSupportSupportV42301Library UP-TO-DATE
:us:prepareComFacebookAndroidFacebookAndroidSdk3230Library UP-TO-DATE
:us:prepareComGoogleAndroidGmsPlayServicesAnalytics750Library UP-TO-DATE
:us:prepareComGoogleAndroidGmsPlayServicesAppinvite750Library UP-TO-DATE
:us:prepareComGoogleAndroidGmsPlayServicesBase750Library UP-TO-DATE
:us:prepareComGoogleAndroidGmsPlayServicesGcm750Library UP-TO-DATE
:us:prepareComGoogleAndroidGmsPlayServicesLocation750Library UP-TO-DATE
:us:prepareComGoogleAndroidGmsPlayServicesMaps750Library UP-TO-DATE
:us:prepareComInstabugLibraryInstabugcore17Library UP-TO-DATE
:us:prepareComInstabugLibraryInstabugsupport17Library UP-TO-DATE
:us:prepareComMixpanelAndroidMixpanelAndroid462Library UP-TO-DATE
:us:prepareComRengwuxianMaterialedittextLibrary214Library UP-TO-DATE
:us:prepareComRoomoramaCaldroid220Library UP-TO-DATE
:us:prepareComZendeskSdk1322Library UP-TO-DATE
:us:prepareUkCoChrisjenxCalligraphy201Library UP-TO-DATE
:us:prepareStageDebugDependencies
:us:compileStageDebugAidl UP-TO-DATE
:us:compileStageDebugRenderscript UP-TO-DATE
:us:generateStageDebugResources
:us:mergeStageDebugResources UP-TO-DATE
:us:jrebelPinStageDebugResids UP-TO-DATE
:us:mergeStageDebugAssets UP-TO-DATE
:us:processStageDebugManifest UP-TO-DATE
:us:processStageDebugResources UP-TO-DATE
:us:generateStageDebugSources UP-TO-DATE
:us:compileStageDebugJavaWithJavac UP-TO-DATE
:us:compileStageDebugSources UP-TO-DATE
:us:generateStageDebugJrebelLayout
:us:preDexStageDebug UP-TO-DATE
:us:dexStageDebug UP-TO-DATE
:us:newRelicDeinstrumentTask
[newrelic.info] Deinstrumenting...
:us:jrebelPostProcessStageDebugResids UP-TO-DATE
:us:packageStageDebug UP-TO-DATE
:us:zipalignStageDebug UP-TO-DATE
:us:assembleStageDebug
BUILD SUCCESSFUL
Total time: 8.54 secs
I attached the build logs from both
By using assembleRelease it will build all flavor combinations. assemble will even build all 10 cominations, including all debug ones.
Now you don't specify how you build your project. In case of jenkins, assembleReleaseis probably the way to go, building all your combinations.
For your local builds, just use gradle assembleProdRelease or gradle assembleDevDebug to just build the needed flavor.
By specifying multiple targets you can just build a subset on jenkins, too. e.g.
gradle assembleDevRelease assembleProdRelease [...]
Also, Android Studio has a built-in support for selecting the flavor you want to build. By clicking on Build Variants you can select the variant you want to run with the default run configuration. To switch between flavors you would just select the one you need.

Can't Build .apk in Android studio 1.3?

Currently i am trying to run a sample application "Hello Gimbal Android" using Android Studio 1.3 (updated 28 july 2015)
After follow step by step from tutorial :
Clone sample application from github.
Import project in Android Studio
Fill in the API key in MainActivity file.
Add the jars from the Gimbal SDK libs directory to the project libs directory
Last step is build the project (using Build -> Make Project)
It is successfully built as shown in grandle console but after that i search it cant find the .apk file.
Anyone has this experience before? Any clue?
Executing tasks: [:app:compileDebugSources, :app:compileDebugAndroidTestSources]
Configuration on demand is an incubating feature.
:app:preBuild UP-TO-DATE
:app:preDebugBuild UP-TO-DATE
:app:checkDebugManifest
:app:preReleaseBuild UP-TO-DATE
:app:prepareComAndroidSupportAppcompatV72200Library UP-TO-DATE
:app:prepareComAndroidSupportSupportV42200Library UP-TO-DATE
:app:prepareDebugDependencies
:app:compileDebugAidl UP-TO-DATE
:app:compileDebugRenderscript UP-TO-DATE
:app:generateDebugBuildConfig UP-TO-DATE
:app:generateDebugAssets UP-TO-DATE
:app:mergeDebugAssets UP-TO-DATE
:app:generateDebugResValues UP-TO-DATE
:app:generateDebugResources UP-TO-DATE
:app:mergeDebugResources UP-TO-DATE
:app:processDebugManifest UP-TO-DATE
:app:processDebugResources UP-TO-DATE
:app:generateDebugSources UP-TO-DATE
:app:compileDebugJava
:app:compileDebugNdk UP-TO-DATE
:app:compileDebugSources
:app:preDebugAndroidTestBuild UP-TO-DATE
:app:prepareDebugAndroidTestDependencies
:app:compileDebugAndroidTestAidl UP-TO-DATE
:app:processDebugAndroidTestManifest UP-TO-DATE
:app:compileDebugAndroidTestRenderscript UP-TO-DATE
:app:generateDebugAndroidTestBuildConfig UP-TO-DATE
:app:generateDebugAndroidTestAssets UP-TO-DATE
:app:mergeDebugAndroidTestAssets UP-TO-DATE
:app:generateDebugAndroidTestResValues UP-TO-DATE
:app:generateDebugAndroidTestResources UP-TO-DATE
:app:mergeDebugAndroidTestResources UP-TO-DATE
:app:processDebugAndroidTestResources UP-TO-DATE
:app:generateDebugAndroidTestSources UP-TO-DATE
:app:compileDebugAndroidTestJava
:app:compileDebugAndroidTestNdk UP-TO-DATE
:app:compileDebugAndroidTestSources
BUILD SUCCESSFUL
Total time: 5.7 secs
Note :
I use ubuntu 14.04, have downloaded the Android SDK and also have configured the PATH.
When you just build, you don't get an apk.
For an unsigned apk you need to either
- Run the app (Run > Run "YourProject")
- Execute assemble Task from Gradle panel (present in right hand side of the
Studio window) or from the embedded terminal window on bottom (in project Root)
Then the apk is in $YOUR_PROJECT/$YOUR_MODULE/build/outputs/apk
For a signed apk, use Build -> Generate Signed APK
If you look in the Gradle Console Rebuild Project will say something like...:
See here. Perhaps help you...

Ionic app says running in Android emulator, but is not

I have an Ionic app that I'm trying to get to work in a Genymotion Virtual Device. Here's what's in my command prompt after I input the command "ionic run android"
Updated the hooks directory to have execute permissions
Running command: "c:\Program Files (x86)\nodejs\node.exe" c:\Users\username\git\mobile\hooks\after_prepare\010_add_platform_class.js c:/Users/username/git/mobile
add to body class: platform-android
Running command: c:\Users\username\git\mobile\platforms\android\cordova\run.bat
ANDROID_HOME=c:\Program Files (x86)\Android\android-sdk
JAVA_HOME=C:\Program Files (x86)\java\jdk1.8.0_45
WARNING: No target specified, deploying to device '192.168.56.101:5555'.
Running: c:\Users\username\git\mobile\platforms\android\gradlew cdvBuildDebug -b c:\Users\username\git\mobile\platforms\android\build.gradle -PcdvBuildArch=x86 -Dorg.gradle.daemon=true
:preBuild
:compileDebugNdk UP-TO-DATE
:preDebugBuild
:checkDebugManifest
:CordovaLib:compileLint
:CordovaLib:copyDebugLint UP-TO-DATE
:CordovaLib:mergeDebugProguardFiles UP-TO-DATE
:CordovaLib:preBuild
:CordovaLib:preDebugBuild
:CordovaLib:checkDebugManifest
:CordovaLib:prepareDebugDependencies
:CordovaLib:compileDebugAidl UP-TO-DATE
:CordovaLib:compileDebugRenderscript UP-TO-DATE
:CordovaLib:generateDebugBuildConfig UP-TO-DATE
:CordovaLib:generateDebugAssets UP-TO-DATE
:CordovaLib:mergeDebugAssets UP-TO-DATE
:CordovaLib:generateDebugResValues UP-TO-DATE
:CordovaLib:generateDebugResources UP-TO-DATE
:CordovaLib:packageDebugResources UP-TO-DATE
:CordovaLib:processDebugManifest UP-TO-DATE
:CordovaLib:processDebugResources UP-TO-DATE
:CordovaLib:generateDebugSources UP-TO-DATE
:CordovaLib:compileDebugJava UP-TO-DATE
:CordovaLib:processDebugJavaRes UP-TO-DATE
:CordovaLib:packageDebugJar UP-TO-DATE
:CordovaLib:compileDebugNdk UP-TO-DATE
:CordovaLib:packageDebugJniLibs UP-TO-DATE
:CordovaLib:packageDebugLocalJar UP-TO-DATE
:CordovaLib:packageDebugRenderscript UP-TO-DATE
:CordovaLib:bundleDebug UP-TO-DATE
:prepareAndroidCordovaLibUnspecifiedDebugLibrary UP-TO-DATE
:prepareDebugDependencies
:compileDebugAidl UP-TO-DATE
:compileDebugRenderscript UP-TO-DATE
:generateDebugBuildConfig UP-TO-DATE
:generateDebugAssets UP-TO-DATE
:mergeDebugAssets UP-TO-DATE
:generateDebugResValues UP-TO-DATE
:generateDebugResources UP-TO-DATE
:mergeDebugResources UP-TO-DATE
:processDebugManifest UP-TO-DATE
:processDebugResources UP-TO-DATE
:generateDebugSources UP-TO-DATE
:compileDebugJava UP-TO-DATE
:preDexDebug UP-TO-DATE
:dexDebug UP-TO-DATE
:processDebugJavaRes UP-TO-DATE
:validateDebugSigning
:packageDebug UP-TO-DATE
:zipalignDebug UP-TO-DATE
:assembleDebug UP-TO-DATE
:cdvBuildDebug UP-TO-DATE
BUILD SUCCESSFUL
Total time: 27.114 secs
Built the following apk(s):
c:\Users\username\git\mobile\platforms\android\build\outputs\apk\android-debug.apk
Using apk: c:\Users\username\git\mobile\platforms\android\build\outputs\apk\android-debug.apk
Installing app on device...
Launching application...
LAUNCH SUCCESS
I should also mention that after the commands finish, there IS a small change on my device. A small menu pops up, with three options, "Wallpaper", "Manage apps", and "System settings". However, the app does not launch, nor does it appear in the list of installed apps.
Fixed it on my own: turns out, the type of virtual device was the problem. I had been using a Google Galaxy Nexus 4.1.1 API 16 device, switching to Google Nexus 4 5.1.0 API 22 fixed it!

Android studio does not start the application on the external device(application does not get installed)

I am trying android studio for the first time.
I have connected external android device via USB (debugging device settings are done in android device). I click on run button with selection as USB device.
The Run console shows this
Waiting for device.
Target device: iball-3g_q1035-0123456789ABCDEF
Whereas my gradle console shows this
Executing tasks: [:app:assembleDebug]
Configuration on demand is an incubating feature.
:app:preBuild UP-TO-DATE
:app:preDebugBuild UP-TO-DATE
:app:compileDebugNdk UP-TO-DATE
:app:checkDebugManifest
:app:preReleaseBuild UP-TO-DATE
:app:prepareComAndroidSupportAppcompatV72200Library UP-TO-DATE
:app:prepareComAndroidSupportSupportV42200Library UP-TO-DATE
:app:prepareDebugDependencies
:app:compileDebugAidl UP-TO-DATE
:app:compileDebugRenderscript UP-TO-DATE
:app:generateDebugBuildConfig UP-TO-DATE
:app:generateDebugAssets UP-TO-DATE
:app:mergeDebugAssets UP-TO-DATE
:app:generateDebugResValues UP-TO-DATE
:app:generateDebugResources UP-TO-DATE
:app:mergeDebugResources UP-TO-DATE
:app:processDebugManifest UP-TO-DATE
:app:processDebugResources UP-TO-DATE
:app:generateDebugSources UP-TO-DATE
:app:compileDebugJava UP-TO-DATE
:app:preDexDebug UP-TO-DATE
:app:dexDebug UP-TO-DATE
:app:processDebugJavaRes UP-TO-DATE
:app:validateDebugSigning
:app:packageDebug UP-TO-DATE
:app:zipalignDebug UP-TO-DATE
:app:assembleDebug UP-TO-DATE
BUILD SUCCESSFUL
Total time: 1.292 secs
But my application does not start on the device. Can somebody please let me know where i am doing mistake?(ps : application works perfectly on the eclipse)

Categories

Resources