Excellent Question. I had exact same problem and recieved same error message. I spent about 3 hrs researching to finding the right resource to find the fix.
What you need to do before you ATTACH this db, is run in query window:
create database adventureworks2012
on (filename = 'C:\Program Files\Microsoft SQL Server\MSSQL11.SQLEXPRESS\MSSQL\DATA\AdventureWorksDW2012_Data.mdf')
for attach_rebuild_log ;
if you're using any other version of adventureworks just rename the file. Also notice, the path of the filename, you may need to edit it to fit you're specfic path.
After you have run this query then you shouldn't get this error when attaching.
Hope this helps.