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...
Related
I was following this tutorial https://facebook.github.io/react-native/docs/getting-started.html, but when i build the project using this command: react-native run-android, i got this message
Starting JS server... Running
/home/nakama/Android/Sdk/platform-tools/adb -s 915fdc90 reverse
tcp:8081 tcp:8081 adb server version (32) doesn't match this client
(36); killing...
* daemon started successfully * Building and installing the app on the device (cd android && ./gradlew installDebug... :app:preBuild
UP-TO-DATE :app:preDebugBuild UP-TO-DATE :app:checkDebugManifest
:app:preReleaseBuild UP-TO-DATE
:app:prepareComAndroidSupportAppcompatV72301Library UP-TO-DATE
:app:prepareComAndroidSupportRecyclerviewV72301Library UP-TO-DATE
:app:prepareComAndroidSupportSupportV42321Library UP-TO-DATE
:app:prepareComFacebookFrescoDrawee0110Library UP-TO-DATE
:app:prepareComFacebookFrescoFbcore0110Library UP-TO-DATE
:app:prepareComFacebookFrescoFresco0110Library UP-TO-DATE
:app:prepareComFacebookFrescoImagepipeline0110Library UP-TO-DATE
:app:prepareComFacebookFrescoImagepipelineBase0110Library UP-TO-DATE
:app:prepareComFacebookFrescoImagepipelineOkhttp30110Library
UP-TO-DATE :app:prepareComFacebookReactReactNative0350Library
UP-TO-DATE :app:prepareComFacebookSoloaderSoloader010Library
UP-TO-DATE :app:prepareOrgWebkitAndroidJscR174650Library 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:bundleDebugJsAndAssets SKIPPED
:app:processDebugManifest UP-TO-DATE :app:processDebugResources
UP-TO-DATE :app:generateDebugSources UP-TO-DATE
:app:processDebugJavaRes UP-TO-DATE :app:compileDebugJavaWithJavac
UP-TO-DATE :app:compileDebugNdk UP-TO-DATE :app:compileDebugSources
UP-TO-DATE :app:preDexDebug UP-TO-DATE :app:dexDebug UP-TO-DATE
:app:validateDebugSigning :app:packageDebug UP-TO-DATE
:app:zipalignDebug UP-TO-DATE :app:assembleDebug UP-TO-DATE
:app:installDebug Installing APK 'app-debug.apk' on 'Mi 4i - 5.0.2'
Installed on 1 device.
BUILD SUCCESSFUL
Total time: 20.971 secs
This build could be faster, please consider using the Gradle Daemon:
http://gradle.org/docs/2.4/userguide/gradle_daemon.html Starting the
app (/home/nakama/Android/Sdk/platform-tools/adb shell am start -n
com.awesomeproject/.MainActivity... adb server version (32) doesn't
match this client (36); killing...
* daemon started successfully * Starting: Intent { cmp=com.awesomeproject/.MainActivity }
and the result is my apps always shows blank screen. I did not change any single javascript code on those project, what is the root caused which makes my apps always give me a blank screen ?
Please set your ip address in developer menu of react native. Follow this link
Running on android device. to run on android device.
When you using this command: 'react-native run-android'. You should use press 'R' twice times or Ctrl + M (open option menu and choose reload) to reload screen and see result. I recommend use Genymotion for android emulator.
Cheer! =))
My team and I develop Android apps and have decided on coding guidelines that all should follow. I therefore started implementing custom lint rules as per the following links:
Post written by Matt Compton
Git Repo
The problem that I'm having is actually implementing these lint rules on a project basis. When I run ./gradlew clean build test install , as specified the rules apply and all is well. However when I build the aar library with ./gradlew aarWrapper:assemble and add it to my libs folder the linting does not work.
I added the following to my build.gradle file to add the library
repositories {
flatDir {
dirs 'libs'
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile(name: 'aarWrapper-debug', ext: 'aar')
}
I'm not sure what I'm missing but when I run ./gradlew lint it runs the linter but not with my custom rules... Any help, tips or advice is greatly appreciated.
EDIT 1
Here is the terminal output when running gradle.
:app:preBuild UP-TO-DATE
:app:preDebugBuild UP-TO-DATE
:app:checkDebugManifest
:app:preReleaseBuild UP-TO-DATE
:app:prepareAarWrapperDebugLibrary UP-TO-DATE
:app:prepareComAndroidSupportAnimatedVectorDrawable2421Library UP-TO-DATE
:app:prepareComAndroidSupportAppcompatV72421Library UP-TO-DATE
:app:prepareComAndroidSupportDesign2421Library UP-TO-DATE
:app:prepareComAndroidSupportRecyclerviewV72421Library UP-TO-DATE
:app:prepareComAndroidSupportSupportCompat2421Library UP-TO-DATE
:app:prepareComAndroidSupportSupportCoreUi2421Library UP-TO-DATE
:app:prepareComAndroidSupportSupportCoreUtils2421Library UP-TO-DATE
:app:prepareComAndroidSupportSupportFragment2421Library UP-TO-DATE
:app:prepareComAndroidSupportSupportMediaCompat2421Library UP-TO-DATE
:app:prepareComAndroidSupportSupportV42421Library UP-TO-DATE
:app:prepareComAndroidSupportSupportVectorDrawable2421Library UP-TO-DATE
:app:prepareComAndroidVolleyVolley100Library UP-TO-DATE
:app:prepareComCrashlyticsSdkAndroidAnswers138Library UP-TO-DATE
:app:prepareComCrashlyticsSdkAndroidBeta121Library UP-TO-DATE
:app:prepareComCrashlyticsSdkAndroidCrashlytics261Library UP-TO-DATE
:app:prepareComCrashlyticsSdkAndroidCrashlyticsCore2310Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesBase961Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesBasement961Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesLocation961Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesMaps961Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesTasks961Library UP-TO-DATE
:app:prepareIoFabricSdkAndroidFabric1312Library UP-TO-DATE
:app:prepareDebugDependencies
:app:compileDebugAidl UP-TO-DATE
:app:compileDebugRenderscript UP-TO-DATE
:app:generateDebugBuildConfig 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:incrementalDebugJavaCompilationSafeguard UP-TO-DATE
:app:compileDebugJavaWithJavac UP-TO-DATE
:app:compileDebugNdk UP-TO-DATE
:app:compileDebugSources UP-TO-DATE
:app:mergeDebugShaders UP-TO-DATE
:app:compileDebugShaders UP-TO-DATE
:app:generateDebugAssets UP-TO-DATE
:app:mergeDebugAssets UP-TO-DATE
:app:transformClassesWithDexForDebug UP-TO-DATE
:app:mergeDebugJniLibFolders UP-TO-DATE
:app:transformNative_libsWithMergeJniLibsForDebug UP-TO-DATE
:app:processDebugJavaRes UP-TO-DATE
:app:transformResourcesWithMergeJavaResForDebug UP-TO-DATE
:app:validateSigningDebug
:app:packageDebug
:app:assembleDebug
BUILD SUCCESSFUL
Total time: 7.881 secs
EDIT 2
Forked project: https://github.com/apertomove/linette
build.gradle: https://github.com/apertomove/linette/blob/apertomove-linette/build.gradle
EDIT 3
In addition to the links above I found this post written by Jason Atwood. We too have a CI server running jenkins in which we can run our checks and inform developers of errors based off of our lint rules. This works great, however, it is one step to far. It would be much more valuable and time save to run lint checks from the library when running our projects out of Android Studio, instead of committing our code only to find out that our project breaks rules.
I have written a post on how to add and integrate custom lint rules to your android app, you can have a look. It also has links to github repos showing how its done in an android project.
Link to post
The easiest way for me was to set ANDROID_LINT_JARS path in the gradlew file and point it to the custom lint jar which is checked in to VCS system, so that you can run it locally as well before pushing the code.
Hope it helps.
#hopeman copy the jar file to the /.android/lint folder. Android will pick your custom lint rules.
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.
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)
I have an issue and despite of a lot of googling, i couldn't find any informations about it.
So I have Windows 7 and had Android Studio 1.1 RC Beta and after modifying my code regarding work with a database i got failure install_failed_dexopt
I tried to clean and then to rebuild my project and since that moment Gradle Executing Tasks never finishes if i run my project. I saw into the Gradle logs and here it is
Executing tasks:
[:app:assembleDebug]
Configuration on demand is an incubating feature.
:app:preBuild
:app:compileDebugNdk UP-TO-DATE
:app:preDebugBuild
:app:checkDebugManifest
:app:preReleaseBuild
:app:prepareComAndroidSupportAppcompatV72102Library UP-TO-DATE
:app:prepareComAndroidSupportSupportV42102Library 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
I waited ~30 minutes and nothing after that.
If i try to stop it, it also never stops, i see only
Stopping - Gradle: Executing Tasks[:app:assembleDebug]
and nothing else
I tried to unistall Android Studio, installed also 1.0.1, I tried to run "hello world" application - is always the same. It would be great if someone have any idea about it, thank you!
So it seemed to be a problem with sdk. At first I didn't notice, that even if I install Android Studio and sdk into another folder path to sdk was always the same and it was something wrong with that sdk directorie.