w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Android Studio: disabling "External build" to display error output create duplicate class errors
I've found a question like this that has some replies here: Cannot resolve R.java, duplicate class You can try this: Delete the Build folder generated by Android Studio automatically Also you can try to Rebuild project by clicking Build->Rebuild project after deleting build folder.

Categories : Android

Android Studio: access a listview element in the xml file from the java file.
Assuming you have a layout file mylayout.xml with this <ListView ... android:id="@+id/listView"/> In the onCreate(Bundle savedInstanceState) : public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.mylayout); ... ListAdapter myAdapter = new MyListAdapter(...); ListView listView = (ListView)findViewById(R.id.listView); //use the id specified in the layout file listView.setAdapter(myAdapter);

Categories : Android

How to access a js file from another js file in titanium studio android project
You have to use Alloy to do this, to open the Home controller view just do this: function login_Click(e){ var homeController = Alloy.createController('home'); // If home.xml's container is a Window this will work homeController.getView().open(); }

Categories : Android

Android Studio and ProGuard - can't write resource [META-INF/MANIFEST.MF] (Duplicate zip entry [volley.jar:META-INF/MANIFEST.MF])
A similar problem is reported in this url. Hope it helps. BTW also make sure that you use the latest version of Android SDK.. it will create an empty proguard-project.txt for your project.

Categories : Misc

Android NoClassDefFoundError vs. Error generating final archive: Found duplicate file for APK:
Make sure the JAR is checked as "exported": right-click on the project -> Properties -> Java Build Path -> Order and Export tab -> Make sure the JAR entry (or "Android Private Libraries") is checked. I have a similar setup (with a project containing Libgdx-dependent "common" code that I share among my Libgdx projects). However, instead of building a JAR, I just include the project directly. (Java Build Path -> Projects tab -> Add...). I had to include my CommonProject explicitly in all of the Libgdx project (common, desktop, android, etc), it wasn't "inheriting" from the Libgdx common project into the android one. You may have to do something similar with your JAR file.

Categories : Java

Android Studio issue with R file
Yes this is a known issue in the newest version of android studio. Google has suggested a temporary workaround until they can track down the problem and fix in next release. Turn off external builds in preferences > compiler. It might help. Source: cannot resolve R into variable after Android studio update and R.java not updated after update to 0.1.6 . Hope this helps.

Categories : Android

how to update android studio with .jar file?
Note: There is not a patch update available from 0.1.9 to 0.2. To update from Android Studio 0.1.x to 0.2.x, you must install a new Android Studio bundle from this page. The reason for that is that we have made changes to the bundled SDK such that it includes a pre-configured local Maven repository which can serve up the v4 support library and which is required for creating new projects. From http://developer.android.com/sdk/installing/studio.html#Revisions So why not downloading a new version of Android Studio? Update: If you can't update by network. Try this: java -classpath /path/to/AI-130.687321-130.692269-patch-unix.jar com.intellij.updater.Runner install $PWD From https://code.google.com/p/android/issues/detail?id=56068

Categories : Android

Where is android studio building my .apk file?
When Gradle builds your project, it puts all APKs in build/apk directory. You could also just do a simple recursive find command for *.apk in the top level directory of your project. Here is a better description... View full image at http://i.stack.imgur.com/XwjEZ.png

Categories : Android

Android Studio File Structure
Look at the top toolbar of the Structure tool window, the first two buttons control the sort order. The first button sorts by visibility and the second sorts alphabetically. Ensure that BOTH are unchecked in order to view the structure in the order in which items appear.

Categories : Android

how can I add the aidl file to Android studio (from the in-app billing example)
Just as the error message says, you need to put IInAppBillingService.aidl in the correct directory dictated by it's package (com.android.vending.billing). Within the src/main/aidl/ folder you already have, put the .aidl file in com/android/vending/billing/.

Categories : Android

Android Studio - Unable to open PNG file
Are you using Windows? This error could happen if the generated build file path exceeds the Windows (not NTFS) max path length of 260 characters. Make sure your project path is not too long, use short names as well. More info from MS: Maximum Path Length Limitation In the Windows API (with some exceptions discussed in the following paragraphs), the maximum length for a path is MAX_PATH, which is defined as 260 characters. A local path is structured in the following order: drive letter, colon, backslash, name components separated by backslashes, and a terminating null character. For example, the maximum path on drive D is "D:some 256-character path string" where "" represents the invisible terminating null character for the current system codepage. (The characters < > are used here

Categories : Android

Android Studio Issue - Premature end of file
This happened when I checked out the project in another computer and then back to the first one. I fixed the problem by closing the project and then File > Import Project... from the exect same sources. Android Studio fixed the project while keeping all previous gradle configurations. It drove me crazy too :)

Categories : Android

See database file(content) via Android Studio
This might not be the answer you're looking for, but I don't have a better way for downloading DB from phone. What I will suggest is make sure you're using this mini-DDMS. It will be super hidden though if you don't click the very small camoflage box at the very bottom left of program. (tried to hover over it otherwise you might miss it.) Also the drop down that says no filters (top right). It literally has a ton of different ways you can monitor different process/apps by PPID, name, and a lot more. I've always used this to monitor phone, but keep in mind I'm not doing the type of dev work that needs to be 120% positive the database isn't doing something out of the ordinary. Hope it helps

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

Generating a Pro Guard configuration file with Android Studio
You can copy the default Proguard configuration file to your project. sdk-location/tools/proguard/examples/android.pro — copy and paste it as proguard.cfg in your project. Then choose it when AS asks for the config file path.

Categories : Android

How can I set up custom namespaces in layout file in Android studio?
res-auto uses the current package name, not the library package name. In your case, it translates to net.mypackage. If you want to use the namespace for a library, you need to use its package name. Judging from the class name, you are using the DSLV library from here. So, you'll want to use: xmlns:dslv="http://schemas.android.com/apk/res/com.mobeta.android.dslv"

Categories : Android

no gradle file in eclipse project Android studio
All you need is a simple build.gradle file for your ActionBarSherlock project. Here's one I've created: buildscript { repositories { mavenCentral() } dependencies { classpath 'com.android.tools.build:gradle:0.4.2' } } apply plugin: 'android-library' dependencies { compile 'com.android.support:support-v4:13.0.0' } android { buildToolsVersion "17.0" compileSdkVersion 17 sourceSets { main { manifest.srcFile 'AndroidManifest.xml' java.srcDirs = ['src'] resources.srcDirs = ['src'] aidl.srcDirs = ['src'] renderscript.srcDirs = ['src'] res.srcDirs = ['res'] assets.srcDirs = ['assets'] } } }

Categories : Eclipse

Android Studio: How to create build.gradle file for use on Jenkins?
I ended up creating these build files from scratch. Here's some guidelines: If you have a project with multiple modules, create a settings.gradle file at the root of your project (at the same level as all the modules). Your settings.gradle file should look something like this: include 'ActionBarSherlock' include ':facebook-android-sdk-3.0.1:facebook' include 'google-play-services_lib' include ':SlidingMenu-master:library' include 'Tinder' include 'ViewPagerIndicator' include 'volley' include 'windowed-seek-bar' Within each module, create a build.gradle file. For library projects, your build.gradle file should look something like this: buildscript { repositories { mavenCentral() } dependencies { classpath 'com.android.tools.build:gradle:0.4.2' } } app

Categories : Android

Android Studio ORMLite Configuration File - Could Not Find Raw Directory
I found a decent solution. Use a separate IDE (not Android Studio) to create your configuration file. In my case I used NetBeans IDE 7.3.1 and it worked just fine. run: Writing configurations to G:MachineSoundsProjectMachineSoundssrcmain es awormlite_config.txt Wrote config for class machinesoundandroidorm.RecordedSound Done. BUILD SUCCESSFUL (total time: 0 seconds)

Categories : Java

Android Studio: "could not find method compile<> for arguments [file collection]"
I had the same problem, but I added the dependencies to the wrong build.gradle. You have to add the dependencies to the AndroidStudioProjects/Project/Project/build.gradle, not AndroidStudioProjects/Project/build.gradle.

Categories : Amazon

Android studio file explorer not showing files in data folder
I found a solution based on the answer in stack overflow . How to access data/data folder in Android device? First i rooted the device .Then i modify the access permission of data folder using adb shell. the code is $ adb shell $ su # mount -o rw 1|root@android:/ # chmod -R 777 data/ Now i can access the files.Thank you @param for your valuable comment.

Categories : Android

Visual studio freeze and duplicate
issue
It looks to me that intellisense may be trying to be overactive for all intents and purposes. You could disable it, but you'd be doing yourself a disservice. Instead your best bet is to deal with it, and remove the extra tags on occasion.

Categories : Asp Net

Unable to render the XML attributes when referencing @dimen resource file in Android Studio
I hope this helps someone. Today I faced the same issue as reported above. I am using windows 8.1, 64bit, jdk 1.8.0, android studio 1.2 Beta 3. What I did was; go to dimens.xml file, (location is: res/values/dimens.xml) and open it up. create any arbitrary change, and save the change. In my case, I added a duplicate value with a different name i.e. 16dp Going back to the layout preview, the error notification simply disappears. You may now go back to dimes.xml and undo the arbitrary changes, to restore the original state of the file if you wish to. I don't have any technical reasons why this fixes it, but sure it worked for me. I guess it is a bug or something.

Categories : Android

Create DUPLICATE code window in visual studio 2012
I haven't got a copy installed here to test but I believe the answer you're looking for lies hidden under the Window menu.. Activate the window you wish to duplicate and under Window on the toolbar choose New Window. This will create a duplicate of the active document. Under the Window menu again you should find the option to make the window Floating Update for Visual Studio 2013: Vertical split of cshtml window in VS2013

Categories : Visual Studio 2012

Aptana Studio 3 Cannot create key stroke with duplicate or non-existent modifier key: SHİFT
I solved the problem by just installing the Eclipse plug-in, and using the Aptana web view. Hope that helps, other Turkish keyboard users, by the way just open a ticket for bug, hope they fix it near feature

Categories : Misc

Change project file structure after migrating from Eclipse to Android Studio gradle structure
While migrating your project from Eclipse to Android Studio, no change have been done on project structure. The only that have changed are new .iml and .gradle files. Your java code stays in project/src/ folder, and has not been moved in project/src/main/java folder (like in a new created project from AndroidStudio). Your AndroidManifest file also stays in the project/ folder and has not been moved in project/src/main/ folder (like in a new created project from AndroidStudio). At migration, the build.gradle file is customized in order to be able to compile with the old structure is described in the gradle documentation : Configuring the Structure For a new created project in AndroidStudio, the sourceSets part of the build.gradle file : sourceSets { main.java.srcDirs = ['src/java']

Categories : Android

Is it okay to rely on the MD5 check sum based on the first 1024 bytes of a file for file duplicate comparison?
No; it is not uncommon for web pages to be identical in the first 1024 bytes. For example, many complex sites have JavaScript, CSS, and boilerplate HTML at the top of the HTML file which far exceed the 1024 bytes you have budgeted. Some experimentation with real-life data may reveal a reasonable buffer, but there is simply no way to predict that two otherwise identical files will not differ in the last byte other than by doing a full-file comparison. But if your input data says otherwise (perhaps what you are comparing are individual tweets, for example?) then by all means go by that. Many web servers will include a server-generated ETag: header which might be useful, but it's not standardized, and for all you know, they could easily be spoofing you.

Categories : Python

Perl: Find duplicate in excel/csv file and write an output file with them
Yes. To parse a CSV file: Text::CSV_XS To parse an Excel file: Spreadsheet::ParseExcel To find the common elements of two lists: my %list1 = map { $_ => 1 } @list1; my @common = grep $list1{$_}, @list2;

Categories : String

Android: How can I open an older android project in Android Studio?
Look at this links. How do I open my existing Eclipse projects in Android Studio? http://developer.android.com/sdk/installing/migrate.html

Categories : Android

Make duplicate of same file using batch file in windows
From what you're explaining it seems like you want to iterate over all the images in the folder and then create ten copies of each one. The following should do that: setlocal enabledelayedexpansion set count=10 for %%F in (*.jpg) do ( for /l %%i in (1, 1, %count%) do ( set num=0%%i set num=!num:~-2! copy "%%F" "%%~nF_!num!%%~xF" ) )

Categories : File

Seeing if one line from file is a duplicate in another file Python
You can't just do if line in seen: to search the whole seen file for the given line. Even if you could, it would only search the rest of the file, and since you're at the end of the file, that would mean you're searching over nothing. And, even if you solved that problem, it would still require doing a linear search over the whole file for each line, which would be very slow. The simplest thing to do is to keep track of all the lines seen, e.g., with a set: with open('filetwo.txt') as f: seen = set(f) with open('fileone.txt') as fin, open('filetwo.txt', 'a+') as fout: for line in fin: if line in seen: print(line + 'is a duplicate') else: fout.write(line) seen.add(line) Notice that I'm pre-filling seen with all of the lines in

Categories : Python

Android Studio 0.2.2 + ActionBarSherlock setttings: Could not find class 'android.support.v4.app.FragmentActivity'
As you requested my settings to be shared, I here post my project settings window. Hope that you can help. 1. ActionBarSherlock project. Note that only android-support-v4 is checked to be exported. 2. My personal project settings windows. Nothing special but only ActionBarSherlock project is referenced.

Categories : Android

Android Studio & Gradle: Add outside java classes to Android main project
you might want to make your Dir a own module add include 'Dir' to your settings.gradle create a build.gradle inside your Dir directory with this content apply plugin: java now you can go into your main projects build.gradle and add to dependencies: compile project(':Dir') if your Dir uses android related stuff, you might want to use the New > Module(right click on your project in Android Studio) Function of Android Studio to create an Android Library. But i haven't tested that feature yet. If Android Studio throws an Exception when trying to use the New Module, you should try to update Android Studio, in the latest Version it works for me. You might also want to check the Gradle User Guide and the DSL Reference both are very helpfull in getting into Gradle and understanding i

Categories : Java

How to setup and test an Android Library Project with Gradle and Android-Studio?
i think this tutorial will help you : http://cyrilmottier.com/2013/06/27/a-productive-android-development-environment/ !

Categories : Java

Maven repository and "Android support library", revision 18 for Android Studio 0.2.x
Install fresh Android Studio 0.2.x. Upgrade from pre 0.2 doesn't work as mentioned here http://developer.android.com/sdk/installing/studio.html#Updating Reason is that new Android Studio is shipped with maven repo for serving support libraries. Alternatively edit build.gradle and replace compile 'com.android.support:support-v4:13.0.+' with compile files('/libs/android-support-v4.jar') then copy support jar to libs folder.

Categories : Android

Automatically versioning Android project from git describe with Android Studio/Gradle
After some further reading and several false starts, I ended up with this, added to the bottom of build.gradle in the project directory (that is, MyAppProject/MyApp/build.gradle, not MyAppProject/build.gradle -- confusing, I know, but the former directory is projectDir in Gradle so that's how I refer to it here). It depends on no external utilities other than Git, which is assumed to be in the path, so it should work on any OS (even though I used forward slashes in the paths, they get converted to backslashes on Windows). It could probably stand to be improved, I'm sure, as my understanding of Gradle is pretty rudimentary and my Groovy may not be very idiomatic (though that in particular is less of a concern). I have a feeling that my approach is suboptimal because it involves generatin

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

Android Studio: Android Manifest doesn't exists or has incorrect root tag
I ran into a similar problem. Looks like my .../src directory for whatever reason moved under my .../lib directory. I moved it out of the /lib directory. Now both /lib and /src are at the same level. After a couple of clean rebuilds and restarts of Android studio everything is back to normal. My emulator started up fine. You might want to check your directory structure. Compare the directory structure with a working project. You might be able to see the difference.

Categories : Android

How do I add the library android-support-v7 in IntelliJ IDEA (Not Android Studio/Gradle)?
You just need to add "@string/abc_action_mode_done" in your appcompat/res/values/strings.Do not "set mediarouter as a dependency for appcompat library".(In my case,"@string/abc_action_mode_done" already exists in the appcompat/res/values/strings.I don't know why you miss it.) "add depenency appcompat to mediarouter" is necessary.

Categories : Android

Wrong build being deployed on Android device using Visual Studio 2012 Xamarin.Android
I have no idea why it does this, I had this issue before. I also noticed that the device log was somewhat behind (ie, at 3.30pm, the last record on the device log was 11.00am). Uninstalling the app from the device and re-deploying it seems to correct it. Note: I had this issue in VS, didn't check with XS. I would look at the difference in your deployment settings in VS and XS (I think it may have something to do with the Fast Deployment option).

Categories : Visual Studio 2012



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