w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Android Studio: how to setup generated Cloud Endpoints sources?
This is how I did it, maybe it is not the best way but I couldn't find a better one: First generate your client library for gradle: google_appengine/endpointscfg.py get_client_lib java -bs gradle your_module.YourServiceClass Uncompress the generated zip file, this will create a folder call your_module In Android Studio load the Android app you want to work with your endpoints module Go to File -> Project Structure. Add a new module selecting "Import existing project". Point the source folder to your_module folder and then press finish. Android Studio will go back to the Project Structure window, select your Android app module and go to the dependencies tab. Add a new "Module dependency" and select your_module. Re-sync gradle and rebuild your project and that's all!

Categories : Android

Android Studio - Inspect Code - Exclude generated files
I've found answer Excluded folders won't be taken in account for Code Analysis Right-click on top-level element and go to Open Module Settings There you have listed single modules, select correct module In right column select folders to be excluded and either right click -> exclude or button exclude above the file tree In left column remove all leftover references to excluded directories from other groups than Excluded Folders

Categories : Android

Visual studio generated test XML and XSLT schema mapping throws an error : XML document must contain a root level element
Firstly, the error message "XML document must contain a root level element." refers to the output XML, because it is empty! So, why is it empty? The reason is that your XSL stylesheet templates are selecting non-existent nodes. For example, you have: <xsl:template match="/"> <xsl:apply-templates select="/s0:Root" /> </xsl:template> However, your example code root node is <root/>, so this select will not match it. Additionally, the namespaces in your input XML and XSL stylesheet do not match. In both the XSL and XML, you need xmlns:s0 to have the same value. For example, your XSL will produce some output if applied to the following input XML: <?xml version="1.0" encoding="utf-16" ?> <s0:Root xmlns:s0="http://schemas.microsoft.com/BizTalk/2003/aggs

Categories : Xml

Android generated R Class - syntax Error
At the time I was writing the question I founded a soution! So I answering my own question. In your string.xml please don't use a space char like <string name=" setting_notification"> ... instead of <string name="setting_notification"> ... The xml parser will prompt any error messages and your R will be generated with the sintax error! Im my case I didn't see soon the problem, becuse all my strings are automatically generated from a URL, where all my strings are.

Categories : Android

Android Studio Error: "You must install the Android Support Repository though the SDK Manager"
you must manualy run SDK Manager folder android-studio/sdk/tools search android or android-sdk new Support Repository must be already selected, and need only click "install" button

Categories : Android

Error Building Project in Android Studio "Error: No resource found that matches the given name (at ____ with value '@drawable/')
Alright, so after fussing with the rebuild for hours trying different methods (renaming particular files [i.e. those with the problems], rebuilding the app after renaming folders inside the build folder, etc) I finally decided that I would go to the source of the problem and see if it worked like other IDE's. Indeed it did, this is how I performed the fix: Find the location of the problem - For me, all four of the errors I had were inside the 'build' folder of the project. Close any open instances of the project While the project is closed, rename this folder from windows explorer (or other if youre using a different OS) (i.e. If the folders name is "build", rename it to "build.old") Open the project once more Go to Build > Rebuild Project You should not have any issues doing this, lik

Categories : Android

Import an Android Project from Eclipse to Android Studio and I have this error message "failed to find Build Tools revision 8.0.0"
Your build.gradle is trying to use Android SDK tools 8 which isn't installed on your machine. If you look at your build.gradle file you probably have this line buildToolsVersion "8". You want your build.gradle file to point to the Android SDK tools that you currently have installed (preferably the latest). Just open the Android SDK manager and see which tools you have installed and change the buildToolsVersion "8" to the right version.

Categories : Android

Android: Gradle Error in Android Studio
Okay, I fixed the issue. It was quite weird. A) I had some capital letters in my res/drawables folder. Not too weird -- I can see how that would remove the first error. B) Then, however, a lot of values in my main activity file became undefined. I had to manually import 'com.myapp.R'. Now that was weird. Fortunately, everything is now working. I hope that if anyone gets the same errors as me, that this response can help them.

Categories : Android

Android Studio Error on Mac
I can't tell you what causes this problem, but I managed to solve it for me. Hopefully you have the same issue as me: What happened was that I enabled the system firewall for OS X. By mistake I banned java. After this the problem appeared. Restarting the terminal and re-enabling java fixed the problem (System preferences --> Security & Privacy --> Firewall --> Firewall options).

Categories : Android

I get an error when I run the apk but not from the Android Studio
Your error states: Caused by: java.lang.ClassNotFoundException: Didn't find class "android.support.v4.view.ViewPager" Your gradle build config shows it as a dependency, but you may want to check where your module points to path-wise for the support library. It's quite possible that Android Studio is failing to detect that your support library is unavailable and thusly you're able to compile, but see the application fail.

Categories : Android

Android studio build error
I faced the same failure and the problem was with my jdk/jre because some time ago I added the Bouncy Castle Crypto APIs functionality by adding the jar to my jdk/jre path. I tried a gradle build with a "clean" jdk/jre and problem was solved

Categories : Gradle

assembleDebug error in Android Studio
The second error in your screenshot seems more important to me. You have to make sure, that the Android Studio is able to download and execute the gradle binary. If you are using a proxy you have to configure it in the Android Studio. To check the gradle tasks, go to your project folder on the command line and type "gradlew tasks" You can also configure a proxy for gradle. Just create a gradle.properties file in (your project folder) with these properties: systemProp.http.proxyHost=www.example.org systemProp.http.proxyPort=8080 systemProp.http.proxyUser=userid systemProp.http.proxyPassword=password systemProp.http.nonProxyHosts=*.nonproxy.com|localhost

Categories : Java

how to install the android studio ? iam getting error like this
You can encounter this error sometimes when updating from Android Studio 0.1.x to 0.2.x. If you've encountered the error in this way, they describe the problem and solution here: http://developer.android.com/sdk/installing/studio.html In short, I might try a fresh install.

Categories : Android

Gradle Error for Android Studio
It warns you that android plug-in task validateDebugSigning cannot access the debug key. Check your accessibility to the debug.keystore. On linux or OS X, the default location is ~/.android. On windows, it's in C:Documents and Settings.android or C:Users.android.

Categories : Android

Android-Studio 0.2.2 error update
This is unfortunately a long standing bug with IntelliJ (the basis for AndroidStudio). Have a look at their bugtracker for more informations. I just filed a new bug about this because thus far it is unresolved and the cause is still rather mysterious. If you want to add anything to it or vote for it or simply watch what is happening...

Categories : Android

Error with renderscript on android studio 0.2.2
After about three days of struggling with this, I found that the problem was with the project folder structure, when compiling with gradle. This project shows the correct structure: https://android.googlesource.com/platform/tools/build/+/11086782041b302109e8349e13b8f9d5e305341d/tests/renderscript/ In short, the .rs files should not be together with the java files, but in a separate folder called 'rs' alongside java and res, with the same inside structure, such as "...HelloRSProjectHelloRSsrcmain scomexamplehellorsmono.rs". Also, be sure to add renderscriptTargetApi to the build.gradle file, like so: android { compileSdkVersion 17 buildToolsVersion "18.0.1" defaultConfig { minSdkVersion 16 targetSdkVersion 16 renderscriptTargetApi = 16 } }

Categories : Java

Gradle error on Android Studio startup
In the error message, the path appears: 'P:ProjekteVertretungsplanProjectlibrariesactionbarsherlock:Vertretungsplanlibsandroid-support-v4.jar' It looks like you're on Windows. The semicolon before Vertretungsplan is not a legal filesystem character. This appears in your script as compile files(':Vertretungsplan/libs/android-support-v4.jar') Try changing this to compile files('Vertretungsplan/libs/android-support-v4.jar')

Categories : Gradle

Android Studio: Error parsing XML & URI is not registered
I was having a similar issue. However, the comments did not assist me in the solution to this issue. This answer from this question actually solved my problem. Summary: Go to "File > Project Structure > Modules", click "add" and then click "android" and "apply/ok". That should solve anyone having a similar problem but the comments for this question are not helping you.

Categories : Android

Whenever I create a new project in android studio, I get an error
"You should download the full zip package from http://services.gradle.org/distributions/gradle-1.6-bin.zip manually and copy this zip package to C:Documents and Settings(Your name).gradlewrapperdistsgradle-1.6-bin72srdo3a5eb3bic159kar72vok If it does works ,you had to re-install Android Studio and take this again. If you use win7 64bit,Try to edit android-studioinstudio.bat SET VM_OPTIONS_FILE=%IDE_BIN_DIR%studio%BITS%.exe.vmoptions to SET VM_OPTIONS_FILE=%IDE_BIN_DIR%studio%BITS%.exe SET JRE=%JDK% IF EXIST "%JRE%jre" SET JRE=%JDK%jre SET BITS= IF EXIST "%JRE%libamd64" SET BITS=64" Stole from Gradle settings cannot be cast error

Categories : Android

Android Studio (0.1.6-0.2.13) non-jumbo instruction error
I've fixed it by going to the Preferences (⌘/Ctrl+,) ➤ Compiler and unchecking the "Use external build". I then went to Build ➤ Rebuild Project and it worked fine. I hope this will help someone else too. Edit: Please note that since Android Studio 0.2.13 (I didn't use anything between 0.2.9 and 0.2.13 so I haven't noticed when it went away) There is no "Use external build" option. To overcome this issue now you need to do this: Go to the Preferences (⌘/Ctrl+,) ➤ Compiler ➤ Android Compilers and check the "Force jumbo mode".

Categories : Java

Android studio fails building, dx.bat error
Here is my own answer, I think I figured it out: 1) To debug the project (at least with Windows). Open CMD.exe, then navigate to your project folder. Then write: "gradlew build --info" 2) This showed me this message: UNEXPECTED TOP-LEVEL EXCEPTION: java.lang.IllegalArgumentException: already added: Landroid/support/v4/app/Activ ityCompatHoneycomb; Following some information on different blogs, I found one solution, I removed this dependency from my project (but kept it in facebook): compile files('libs/android-support-v4.jar') This worked and compiled successfully.

Categories : Java

Error with SupportMapFragment in Android Studio on a Fragment
Lib was imported on libs folder The Play Services SDK is an Android library project, not just a JAR. Remove the JAR from libs/ and add a reference to the Android library project. That way, you will pick up the resources defined by that library project.

Categories : Android

Error in android studio while creating a new project
Go to Gradle Download last version Open grandle location within Android Studio (in my case is: C:Program Files (x86)Androidandroid-studiopluginsgradle" Important: backup your existing Android Studio gradle lib folder (in case things go wrong, as some of the commenters have pointed out) Open download file from 2. Override lib folder within Android Studio with lib folder within downloaded file.

Categories : Java

android studio add library project error
Finally after days of trying i solved it ! In the previous referenced answer in step 8 : Now in Actionbarsherlock module delete android-support-library (because this is second copy of this library - it will cause build errors). Just i ignored this step and it works fine for me.

Categories : Android

xml file in android studio appears an error
This sample code can helps you. Take care on android:shape="rectangle" . <?xml version="1.0" encoding="utf-8"?> <shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle" > <gradient android:angle="180" android:centerColor="@color/Bisque" android:endColor="@color/Red" android:startColor="@color/Red" /> <stroke android:width="1dip" android:color="@color/Black" /> <corners android:radius="3dip" /> <padding android:bottom="10dp" android:left="10dp" android:right="10dp" android:top="10dp" /> </shape> Try this for your code: <?xml version="1.0" encoding="utf-8"?> <shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle"> &

Categories : Android

Android studio permission denied error
I managed to get around it by trying to delete the whole directory. It failed due to not being able to delete strings.xml_jb_old_ so I then rebooted and the file had gone and things work again

Categories : Android

Error: Gradle: Execution failed "Running /Applications/Android Studio.app/sdk/build-tools/android-4.2.2/aapt failed"
This is because one or more of your asset names have unsupported characters present. Replace all capitals with lowercase letters. Replace all spaces and dashes with an under-bar/underscore. AND to be safe, remove all numbers too. Another suggestion I've seen going around is to make sure your SDK is up to date, but from my own experience it has always been the names of imported assets.

Categories : Gradle

transferred computers with Android Studio and now have Gradle error
You can change the dependency to 'com.android.tools.build:gradle:0.5.4'. Also, add a local.properties file in the project root folder with a line pointing to the Android Studio sdk directory. I had to put this line: sdk.dir=/Applications/Android Studio.app/sdk

Categories : Java

Method invocation highlighed error in Android Studio
From what I've seen, Android Studio shows a bit too much warnings about potential NullPointerExceptions, even for methods that will never return null. I simply ignore some of them, but it's useful to carefully check all of them, because sometimes I missed an important one. If you look at the android source code, it's easy to see that getFragmentManager() will never return null : public FragmentManager getFragmentManager() { return mFragments; } Where mFragments is assigned only once through the whole class : final FragmentManagerImpl mFragments = new FragmentManagerImpl();

Categories : Android

android studio launch error: Missing MSCVR100.dll
I had the same problem, download the appropiate file for your version of Windows and just install it: Microsoft Visual C++ 2010 Redistributable Package (x86) Microsoft Visual C++ 2010 Redistributable Package (x64)

Categories : Android

Android studio gives error on compilation, No resource found
In the file styles.xml that is mentioned in the error, if line 24 literally says: 'style/Theme.Sherlock.Light.DarkActionBar' then change it to: '@style/Theme.Sherlock.Light.DarkActionBar' (You just missed the @ symbol)

Categories : Java

Error when importing a Gradle project into Android Studio
I finally found out why this didn't work. There are two ways to include a project from within the settings.gradle file: include ':..:source:compA-api' and include "source:compA-api" project(':source:compA-api').projectDir = new File(settingsDir, 'source/compA/api') I had used the second form and apparently Android Studio didn't like that :)

Categories : Android

Gradle Error: Android Studio, ActionbarSherlock, and SlidingMenu
Unfortunately, this could be happening for a lot of reasons. I'd suggest running gradle build -info from the command line to see if it gives you more information. A common merge failure I've run into is when the minSdkVersions are conflicting. I see that your test project minSdkVersion is 7, are the minimum levels declared in the ActionBarSherlock and SlidingMenu manifests 7 or less?

Categories : Android

Android Studio Gradle with native libs error
This will happen if your copyNativeLibs task fails to find any files, and therefore doesn't create the "build ative-libs" directory. Are you sure that there are .so files in your "libs/armeabi" directory? Also, keep in mind that your script won't actually compile the native code. You still need to do that yourself by running ndk-build to generate the .so libraries. Here is an example of how to get your script to compile your native code. Note, this requires that ndk-build is in your PATH. // Task to run ndk-build task ndkBuild(type: Exec) { commandLine 'ndk-build', '-j', Runtime.runtime.availableProcessors() } task copyNativeLibs(type: Copy) { from(new File(project(':JaCertTest').getProjectDir(), 'libs/armeabi')) { include '**/*.so' } into new File(buildDir, 'native-libs')

Categories : Android

Android Studio: underscores in literals are not supported error
removing the "10_" at the beginning of your files can fix the issue. For the reason why you can't have a resource with a numeric name, read this . If theses drawable ressources are icons, you can use the common naming conventions that you can read here, and begin your icons by "ic_" or "ic_menu" if this is Menu icons and Action Bar icons.

Categories : Gradle

Android Studio Compilation Error from Trying to Create Dependencies
EDIT After looking at your dependencies list, it seems obvious that the problem is there. I suggest you to try to: 1) understand why you choose to include each of those libs. 2) understand the android architecture and build process. (maybe read this) Here are a few remarks: openjdk-6-b14.jar MUST be removed. You are developing an Android app and so it will run against the Android SDK. The Android SDK already define most of the classes of the openjdk (so you will have conflicts when dexing this jar). Additionally lot of classes in this jar are simply not dexable (like javax.swing.*) because they use unsupported features and don't make sence on Android. android-4.2.2_r1.jar is a stub jar (look at the code: all methods throw an exception). This artifact is only usable the build your and

Categories : Android

Android Studio Manifest Missing Error In Gradle
In the android section of your build.gradle file, you can try adding sourceSets with the manifest.srcFile variable. android { sourceSets { main { manifest.srcFile 'ToDoList/src/main/AndroidManifest.xml' } } } That path may need to be adjusted slightly.

Categories : Android

Android Studio could not detect appt even though it is located at position specified by error
I have found that this problem only occures if the name of the layout xml file contains capital letter. This counts for all Files (also drawables etc.) in "res" Folder So in your project under src/main/res/layout/ directory you have the layout xml file, make sure its name doesn't contain capital letter. My setup is: Windows 7 x64 Android Studio AI 130.709792

Categories : Android

Android Studio: Gradle: error: cannot find symbol variable
You shouldn't be importing android.R. That should be automatically generated and recognized. This question contains a lot of helpful tips if you get some error referring to R after removing the import. Some basic steps after removing the import, if those errors appear: Clean your build, then rebuild Make sure there are no errors or typos in your XML files Make sure your resource names consist of [a-z0-9.]. Capitals or symbols are not allowed for some reason. Perform a Gradle sync (via Tools > Android > Sync Project with Gradle Files)

Categories : Android

Android Studio: Error in Layout Files - Header expected
Click on the word with the red line (that causes the mentioned error) Click Alt+Enter and choose Un-inject Language/Reference That's it! At least this worked for me on the same error

Categories : Android



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.